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}
Thanks in advance

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$$
For your and others convenience:
$$\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}$
Saw your comment: general case going deeper see here
When are two diagonal matrices congruent?
