Question: congruent not diagonalizing

I apologize for revisiting this question many months later. What I meant with the example was not diagonalizing but congruence. For a field that is not characteristic 2, a symmetric matrix is congruent to a diagonal matrix.

with(LinearAlgebra[Modular]);

A:=Matrix([[2,2,2],[2,0,1],[2,1,0]]);

C:=Matrix([[1,0,0],[2,1,0],[1,1,1]]);

CC:=Transpose(3,C);

C.A.CC mod 3;

The output is Diag(2,1,0)

The invariant in this case is 2 which is not a square mod 3. Is there a way in maple (in the modular Linear Algebra package) to find such a diagonal matrix?

Thanks,

Please Wait...