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

congruenceDiagonalize -- diagonalizing 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 : congruenceDiagonalize(M)

o2 = | 7 0  |
     | 0 -8 |

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

See also

Ways to use congruenceDiagonalize :

For the programmer

The object congruenceDiagonalize is a method function.