Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is probably a question that does not admit a simple answer. However, I'd like to know whether there exist criteria that determine when two diagonal matrices are congruent. I have the suspicion that, if such criteria exist, they depend strongly from the base field. In fact, over a quadratically closed field two diagonal matrices are congruent iff they have the same rank and over real closed fields Sylvester theorem answers completely the question. But over other fields?

By Witt decomposition, we can restrict ourselves to consider only the case in which $A$ and $B$ are anisotropic. Hence the question is:

Let $\mathbb{K}$ be a field and let $A = \mathrm{diag}(a_1, \dots, a_n)$ and $B = \mathrm{diag}(b_1,\dots,b_n)$ be two diagonal matrices over the field $\mathbb{K}$ such that $^t x A x \neq 0$ and $^t x B x \neq 0$ for all $x \in \mathbb{K}^n \setminus \{ 0 \}$. (In particular $a_i \neq 0$ and $b_i \neq 0$). What are necessary or sufficient conditions to have that $A$ and $B$ are congruent?

share|cite|improve this question

One necessary condition is that $\prod_ia_i=c^2\prod_ib_i$, for some $c\in\mathbb{K}$. When $\mathbb{K}$ is a finite field, this condition is also sufficient.

Over $\mathbb{Q}$, things are more complicated, but the answer is known: the problem reduces to the same problem over the $p$-adic fields $\mathbb{Q}_p$ (see

Over the $p$-adic fields $\mathbb{Q}_p$ there are known necessary and sufficient conditions (see, e.g., this book:

I don't know anything else about general fields.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.