next | previous | forward | backward | up | top | index | toc | Macaulay2 website
Macaulay2Doc > matrices > determinants and minors

determinants and minors

The command determinant can be used to compute the determinant of a square matrix.
i1 : R = ZZ[a..d];
i2 : f = matrix{{a,b},{c,d}}

o2 = | a b |
     | c d |

             2       2
o2 : Matrix R  <--- R
i3 : det f

o3 = - b*c + a*d

o3 : R
The command minors can be used to construct the ideal generated by the n by n minors of a matrix. Recall that the n by n minors of a matrix are the determinants of the n by n submatrices of a matrix.
i4 : R = QQ[x,y,z];
i5 : f = matrix{{x,y,z},{y,z,x^2}}

o5 = | x y z  |
     | y z x2 |

             2       3
o5 : Matrix R  <--- R
i6 : I = minors(2,f)

               2         3         2     2
o6 = ideal (- y  + x*z, x  - y*z, x y - z )

o6 : Ideal of R