The dimension of the class of matrices that suffice a diagonalization property. Let $A$ be a $2\times 2$ real matrix with distinct real eigenvalues. For a $2\times 2$ real matrix $B$, let $C(B)$ denote the $4\times 4$ matrix whose block form is
    \begin{equation*}
 \begin{bmatrix}
 A & B\\
 0 & A
 \end{bmatrix}_.
 \end{equation*}
I need to prove that the subset of $M_{2\times 2}(\mathbb{R})$ consisting of all $B$ for which the corresponding $C(B)$ is diagonalizable forms a two dimensional subspace of $M_{2\times 2}(\mathbb{R})$.
Any suggestions?
 A: 
Disclaimer: I tried to keep this as low level as possible and it took a fair bit of work. There are probably more slick ways to do this with more advanced theory.

Let $x$ and $y$ denote the eigenvalues of $A$. Then the eigenvalues of $C(B)$ are also $x$ and $y$ (its characteristic polynomial is $(\lambda - x)^2(\lambda-y)^2$). $C(B)$ will be diagonalizable if and only if its minimal polynomial splits into distinct linear factors. In this case, that means that $C(B)$ is diagonalizable if and only if its minimal polynomial is $(\lambda - x)(\lambda - y)$. Therefore we need to have:
\begin{align*}
0 &= \begin{bmatrix}
A - xI & B \\ 0 & A - xI
\end{bmatrix} \begin{bmatrix} A-yI & B \\ 0 & A-yI\end{bmatrix} \\
&= \begin{bmatrix} (A - xI)(A-yI) & (A - xI)B + B(A-yI) \\ 0 & (A - xI)(A-yI) \end{bmatrix} \\
&= \begin{bmatrix} 0 & (A - xI)B + B(A-yI) \\ 0 & 0  \end{bmatrix}_.
\end{align*}
Note that $(A-xI)(A-yI) = 0$ because $(\lambda - x)(\lambda - y)$ is the minimal polynomial of $A$. Anyway, cleaning up the top right entry and setting it to zero yields:
$$ AB + BA = (x + y)B.$$
Define $T: M_{2\times 2}(\mathbb{R}) \to M_{2\times 2}(\mathbb{R})$ by $T(X) = AX + XA$. What we have discovered is that $C(B)$ is diagonalizable if and only if $B$ is an eigenvector of $T$ corresponding to the eigenvalue $x+y$. We now will show that the eigenspace of $T$ corresponding to $x+y$ is $2$-dimensional.
Let $P$ be the matrix such that $D := P^{-1}AP = \begin{bmatrix} x & 0 \\ 0 & y \end{bmatrix}_.$ Define $U(X) = DX + XD$. Then
\begin{align*}
P^{-1}T(X) P &= P^{-1}(AX + XA) P \\ 
&= P^{-1}AXP + P^{-1}XAP \\
&= (P^{-1}AP)(P^{-1}XP) + (P^{-1}XP)(P^{-1}AP) \\
&= D(P^{-1}XP) + (P^{-1}XP)D \\
&= U(P^{-1}XP).
\end{align*}
So if $T(B) = (x+y)B$, then:
\begin{align*}
(x+y)P^{-1}BP &= P^{-1}T(B)P \\
&= U(P^{-1}BP).
\end{align*}
Similarly if $U(X) = (x+y)X$, then you can verify that:
\begin{align*}
(x+y)PXP^{-1} &= PU(X)P^{-1} \\
&= T(PXP^{-1}).
\end{align*}
Therefore we have shown that the eigenspaces corresponding to $x+y$ for $T$ and $U$ are isomorphic (conjugation is an isomorphism and we showed that the map to each other under conjugation).
Finally we get to the easy part. We can now work with the much simpler $U$.
$$U\left( \begin{bmatrix} a & b \\ c & d \end{bmatrix}\right) = \begin{bmatrix} 2ax & b(x+y) \\ c(x+y) & 2dy \end{bmatrix}_.$$
Now to have $$ (x+y) \begin{bmatrix} a & b \\ c & d \end{bmatrix} = U\left( \begin{bmatrix} a & b \\ c & d \end{bmatrix}\right) = \begin{bmatrix} 2ax & b(x+y) \\ c(x+y) & 2dy \end{bmatrix} $$
we must have $a(x+y) = 2ax$ and $d(x + y) = 2dy$. Thus $a(x-y) = ax - ay = 0$. So $a = 0$ or $x-y=0$. But $x \neq y$, so $a = 0$. Similarly $d=0$. Note that $b$ and $c$ have not constraints on them. Therefore the eigenspace of $U$ corresponding to $x+y$ is $2$-dimensional, which implies that the eigenspace of $T$ corresponding to $x+y$ is $2$-dimensional. Finally we are done!
