Find a matrix $A \in M_{2x2}(\mathbb Q)$ which is not diagonalizable over $\mathbb Q $ but is diagonalizable over $\mathbb R$ Can you some tips how do this task differently than by guessing? Because I considered various matrices, but none of them fulfilled both conditions and my work goes to waste, and maybe there is a way to find such a matrix.
 A: Consider $A=\pmatrix{0&2\\ 1&0}=\pmatrix{\sqrt{2}&-\sqrt{2}\\ 1&1}\pmatrix{\sqrt{2}\\ &-\sqrt{2}}\pmatrix{\frac1{2\sqrt{2}}&\frac12\\ -\frac1{2\sqrt{2}}&\frac12}$. Since it has irrational eigenvalues, it is not diagonalisable over $\mathbb Q$. The characteristic polynomial of $A$ is $x^2-2$, which is irreducible over $\mathbb Q$ but splits into a product of distinct linear factors $x-\sqrt{2}$ and $x+\sqrt{2}$ over $\mathbb R$.
A: The eigenvalues of a $2 \times 2$ matrix are the roots of a degree 2 polynomial, which "usually" has irrational roots, so it shouldn't be hard to come up with an example. I considered
$$A=\begin{pmatrix}
1 & 1 \\
1 & 2 \end{pmatrix}$$
Its characteristic polynomial is
$$\det \begin{pmatrix}
1-x & 1 \\
1 & 2-x \end{pmatrix}=(1-x)(2-x)-1=x^2-3x+1$$
which has irrational roots. I used wolfram alpha to help me with this because algebra with irrational numbers is nasty:
$$A=UDU^{-1}, \text{ where }D= \frac{1}{2}\begin{pmatrix}
3+ \sqrt{5}& 0 \\
0 & 3- \sqrt{5}\end{pmatrix}, \; U= \frac{1}{2}\begin{pmatrix}
-1+ \sqrt{5}& -1- \sqrt{5}\\
2 & 2 \end{pmatrix}$$
Note the eigenvalues are always along the main diagonal of $D$, and the eigenvectors are the columns of $U$. This is how you diagonalize a matrix $A$.
