Alejandro Morales

41 Reputation

6 Badges

15 years, 70 days

MaplePrimes Activity


These are questions asked by Alejandro Morales

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...

I was wondering if there is a way to compute the discriminant of a rank r quadratic form in maple? Alternatively, is there a way to diagonalize, via symmetric row and col operations, a symmetric matrix A over Z_p? For instance, modifying RowReduce in LinearAlgebra[Modular]. If I can do this then I can obtain the discriminant. Example: >with(LinearAlgebra[Modular]): >p:=5; >Matrix(4,4,[[0, 1, 1, 4], [1, 0, 1, 0], [1, 1, 0, 1], [4, 0, 1, 0]]); >RowReduce(p,A,4,4,0,0,0,0,0,0,0); # would like a symmetric row and column reduction
I would like to do a nested sequence (or for loop) but the number of iterations is not necessarily fixed: I tried doing the following: nestedseq:=proc(numtimes,middle) return cat(seq(`seq(`,i=1..numtimes),middle,seq(`,j[i]=[1,2,3]) `,i=1..numtimes)); end proc; But then I get a string with the desired command but I cannot evaluate it. Is there a better way to do these iterated sequences? Thanks a lot,
Page 1 of 1