# Showing that two real matrices are not congruent over $\mathbb{Q}$

Maybe it is a stupid question but I will still ask it here.

How can I prove that the following matrices are not congruent over $\mathbb{Q}$?

\begin{pmatrix} -1 & 0\\ 0 & 2\\ \end{pmatrix}

\begin{pmatrix} -1 & 0\\ 0 & 1\\ \end{pmatrix}

-
you can read the eigenvalues off any diagonal matrix. can you see how this helps? – citedcorpse Jun 12 '13 at 10:56
@exitingcorpse actually no. How does it help me ? – wantToLearn Jun 12 '13 at 11:03
@exitingcorpse I don't see how that helps in this case, since we want to show congruence over $\mathbb{Q}$. All the eigenvalues tell is is whether or not they will be congruent over $\mathbb{R}$. – Tom Oldfield Jun 12 '13 at 11:05
@exitingcorpse not sure that is in general so simple see here>> math.stackexchange.com/questions/92735/… – al-Hwarizmi Jun 12 '13 at 11:05
i misinterpreted "congruence" for "similarity", woops. – citedcorpse Jun 12 '13 at 11:06

Fi $B=Q^TAQ$ then $\det(B)=\det(Q^T)\det(A)\det(Q)$, i.e. $\frac{\det(B)}{\det(A)}=\det^2(Q)$ must be a square.

-
Thanks!! very elegant answer. – wantToLearn Jun 12 '13 at 11:18

Hint:

Suppose that there is some invertible matrix $P$ such that:

$\begin{pmatrix} -1 & 0\\ 0 & 2\\ \end{pmatrix} = P^T \begin{pmatrix} -1 & 0\\ 0 & 1\\ \end{pmatrix} P$

Then write out $P$ in component form, i.e. write $P=\begin{pmatrix} a & b\\ c & d\\ \end{pmatrix}$ (with all entries in $\mathbb{Q}$) and multiply out the right hand side. This will give you some simultaneous equations in terms of $a,b,c$ and $d$. With enough manipulation, you should be able to find a relation between $a$ and $d$ that contradicts them both being in $\mathbb{Q}$.

-

If your matrices are $A$ and $B$ then you should prove whether there exists an invertible matrix $Q$ such that the equation holds: $$Q^TAQ=B$$

$$\left( \begin{array}{cc} q_{11}^{2}a_{11} + q_{21}^{2}a_{22} & q_{11}q_{12}a_{11} + q_{21}q_{22}a_{22} \\ q_{11}q_{12}a_{11} + q_{21}q_{22}a_{22} & q_{12}^{2}a_{11} + q_{22}^{2}a_{22}\end{array}\right) = \left( \begin{array}{cc} b_{11} & 0 \\ 0 & b_{22} \end{array}\right).$$
Let $q_{12}=q_{21}=0$ for example and look for whether/when: $b_{jj} = a_{jj}q_{jj}^{2}$
Put your matrices and make the relevant multiplication by keeping elements of $Q$ variable. Your matrices are diagonal and you see from the resulting equation, whether $Q$ existent or not. – al-Hwarizmi Jun 12 '13 at 11:04