Macaulay2 » Documentation
Packages » A1BrouwerDegrees :: diagonalizeViaCongruence
next | previous | forward | backward | up | index | toc

diagonalizeViaCongruence -- diagonalizes a symmetric matrix via congruence

Synopsis

Description

Given a symmetric matrix $M$ over any field, this command gives a diagonal matrix congruent to $M$. Note that the order in which the diagonal terms appear is not specified.

i1 : M = matrix(GF(17), {{7,9},{9,6}});

                   2            2
o1 : Matrix (GF 17)  <-- (GF 17)
i2 : diagonalizeViaCongruence M

o2 = | 7 0  |
     | 0 -8 |

                   2            2
o2 : Matrix (GF 17)  <-- (GF 17)

See also

Ways to use diagonalizeViaCongruence:

For the programmer

The object diagonalizeViaCongruence is a method function.