next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
Kronecker :: rationalNormalForm

rationalNormalForm -- rational normal form of a matrix

Synopsis

Description

This function produces a matrix B in rational normal form, and invertible matrices P and Q such that P*Q = I and B = P*A*Q.
i1 : R = ZZ/101[x]

o1 = R

o1 : PolynomialRing
i2 : M = R^4

      4
o2 = R

o2 : R-module, free
i3 : A = random(M,M)

o3 = | 25  -27 -23 9   |
     | 21  23  -50 30  |
     | 20  -27 -18 -23 |
     | -19 -29 -24 -24 |

             4       4
o3 : Matrix R  <--- R
i4 : factor det(x*id_M - A)

       2             2
o4 = (x  + 4x + 12)(x  - 10x - 7)

o4 : Expression of class Product
i5 : (B,P,Q) = rationalNormalForm A

o5 = (| -4  1 0  0 |, | 36  -39 -43 -7  |, | 49 44  -25 -9  |)
      | -12 0 0  0 |  | 3   46  -27 -20 |  | 14 -33 -10 -12 |
      | 0   0 10 1 |  | 26  -45 -3  33  |  | 36 1   25  1   |
      | 0   0 7  0 |  | -30 -42 35  -48 |  | -4 0   -10 0   |

o5 : Sequence
i6 : B - P*A*Q == 0

o6 = true
i7 : P*Q - id_M == 0

o7 = true

Ways to use rationalNormalForm :