Macaulay2 » Documentation
Packages » DirectSummands » Example: symbolic diagonalization
next | previous | forward | backward | up | index | toc

Example: symbolic diagonalization

Another application of the package is symbolic diagonalization: by decomposing the cokernel of a parameterized matrix, one can recover block-diagonal or diagonal normal forms after an appropriate field extension.

i1 : S = QQ[a,b,c,d];
i2 : m = matrix "a,b,c,d;d,a,b,c;c,d,a,b;b,c,d,a"

o2 = | a b c d |
     | d a b c |
     | c d a b |
     | b c d a |

             4      4
o2 : Matrix S  <-- S
i3 : presentation directSum summands coker m
 -- try using changeBaseField with (QQ[a]/(a^2+42*a+442))[]

o3 = | a+b+c+d 0       0    0   |
     | 0       a-b+c-d 0    0   |
     | 0       0       a-c  b-d |
     | 0       0       -b+d a-c |

             4      4
o3 : Matrix S  <-- S
i4 : factor det m

                                     2    2           2           2
o4 = (a - b + c - d)(a + b + c + d)(a  + b  - 2a*c + c  - 2b*d + d )

o4 : Expression of class Product
i5 : K = toField(QQ[i]/(i^2+1));
i6 : T = K[a,b,c,d];
i7 : m = matrix "a,b,c,d;d,a,b,c;c,d,a,b;b,c,d,a"

o7 = | a b c d |
     | d a b c |
     | c d a b |
     | b c d a |

             4      4
o7 : Matrix T  <-- T
i8 : prune directSum summands coker m

o8 = cokernel | a+b+c+d 0       0         0         |
              | 0       a-b+c-d 0         0         |
              | 0       0       a-ib-c+id 0         |
              | 0       0       0         a+ib-c-id |

                            4
o8 : T-module, quotient of T
i9 : factor det m

o9 = (a - b + c - d)(a + b + c + d)(a - i*b - c + i*d)(a + i*b - c - i*d)

o9 : Expression of class Product

Over $\QQ$, this matrix decomposes into fewer summands than it does over $\QQ(i)$. The refinement after base change reflects the further factorization of the symbolic matrix over the larger field.

See also


The source of this document is in /build/reproducible-path/macaulay2-1.26.06+ds/M2/Macaulay2/packages/DirectSummands/docs.m2:680:0.