# Real matrix for endomorphism of 4-dimensional vector space

Let $V$ be a real vector space of dimension $4$, let $f: V \to V$ be an endomorphism such that, as a $\mathbb{R}[X]$-module (with $X$ acting as $f$), $V \cong \mathbb{R}[X]/(X^2 - aX + b)^2$ where $a^2 < 4b$. This means that the minimal polynomial of $f$ is $(X^2 - aX + b)^2$.

Does there always exist an $\mathbb{R}$-basis of $V$ such that $f$ has matrix

\begin{pmatrix} 0 & 1 & 1 & 0 \newline -b & a & 0 & 1 \newline 0 & 0 & 0 & 1 \newline 0 & 0 & -b & a \end{pmatrix}

with respect to this basis?

-

Let $A$ be the given matrix, $$A=\begin{pmatrix} 0 & 1 & 1 & 0 \newline -b & a & 0 & 1 \newline 0 & 0 & 0 & 1 \newline 0 & 0 & -b & a \end{pmatrix}.$$
The rational canonical form of $f$ is $R$, where $R$ is the companion matrix of $(X^2 -aX + b)^2$, $$R=\left(\begin{array}{rrrc} 0 & 0 & 0 & -b^2\\ 1 & 0 & 0 & 2ab\\ 0 & 1 & 0 & a^2-2b\\ 0 & 0 & 1 & 2a \end{array}\right).$$ The characteristic polynomial of the matrix $A$ is also $(t^2-at+b)^2$. Evaluating $A^2-aA + bI$, the $(1,4)$ coordinate of $A^2$ is $2$, the $(1,4)$ coordinate of $-aA$ is $0$, and the $(1,4)$ coordinate of $bI$ is $0$, so $A^2-aA+bI \neq \mathbf{0}$. Hence, the minimal polynomial of the matrix you have is also $(X^2 -aX + b)^2$. So the rational canonical form of $A$ is also equal to $R$.
Therefore, there is an invertible matrix $P$ such that $P^{-1}AP = R$.
If you fix a basis $\beta$ for $V$, and you let $B$ be the coordinate matrix of $f$ with respect to $\beta$, $[f]_{\beta}$, then there is an invertible matrix $Q$ such that $Q^{-1}BQ=R$ (we obtain $Q$ by finding a rational canonical basis for $f$). So we have that $Q^{-1}BQ = R = P^{-1}AP$. Therefore, $$A = (PQ^{-1})[f]_{\beta}(PQ^{-1})^{-1},$$ and interpreting $PQ^{-1}$ as a suitable change-of-basis matrix gives you (an explicit way to obtain) a basis $\gamma$ for $V$ (in terms of $\beta$) such that $[f]_{\gamma}=A$.