## 41 Reputation

14 years, 196 days

## Thanks for the suggestion. I...

Thanks for the suggestion. I tried this for lower rank matrices and it sometimes gives 0. Given A symmetric of rank r, I want to find Q invertible such that QAQ^t = diag(a_1,...,a_r,0,..,0), and then find the quadratic residue of a_1a_2...a_r Example: p:=3; with(LinearAlgebra[Modular]): M:=Matrix(3, 3, [[0, 1, 2], [1, 0, 2], [2, 2, 2]]): # this diagonalizes to Diag(2,1,0) IntegerCharacteristicPolynomial(M,x); discrim(%,x); % mod p; # output = 0 expecting 2 On the other hand, the pseudodeterminant in RowReduce is not exactly what I need since I do not know a priori if the first rows are independent, and the row reduction is not symmetric.

## Thanks for the suggestion. I...

Thanks for the suggestion. I tried this for lower rank matrices and it sometimes gives 0. Given A symmetric of rank r, I want to find Q invertible such that QAQ^t = diag(a_1,...,a_r,0,..,0), and then find the quadratic residue of a_1a_2...a_r Example: p:=3; with(LinearAlgebra[Modular]): M:=Matrix(3, 3, [[0, 1, 2], [1, 0, 2], [2, 2, 2]]): # this diagonalizes to Diag(2,1,0) IntegerCharacteristicPolynomial(M,x); discrim(%,x); % mod p; # output = 0 expecting 2 On the other hand, the pseudodeterminant in RowReduce is not exactly what I need since I do not know a priori if the first rows are independent, and the row reduction is not symmetric.

## Yes I meant A symmetric and...

Yes I meant A symmetric and I indeed I am not interested in the char 2 case. Thanks for the link. In principle I can immitate this in the LinearAlgebra/modular package?

## Yes I meant A symmetric and...

Yes I meant A symmetric and I indeed I am not interested in the char 2 case. Thanks for the link. In principle I can immitate this in the LinearAlgebra/modular package?

## Thanks for the reply. Given...

Thanks for the reply. Given n by n matrix A with entries in a finite field, I am interested in finding diagonal matrix D such that Q^tAQ=D for some invertible matrix Q. That is, the output should be a diagonal matrix and not just a matrix on row echelon form.

## Thanks for the reply. Given...

Thanks for the reply. Given n by n matrix A with entries in a finite field, I am interested in finding diagonal matrix D such that Q^tAQ=D for some invertible matrix Q. That is, the output should be a diagonal matrix and not just a matrix on row echelon form.
 Page 1 of 1
﻿