Problem of diagonalizability and vector space I've been reading the solution and want you to help me understand it.
problem: Let V be a real vector space with 100-by-100 real matrices. Let $A \in V$, $W_A={B \in V | AB=BA}$, and $d_A$ be the dimension of $W_A$.
Assume that $A^4-5A^2+4I=0$. Find the minimum of $d_A$.
solution: From the minimal polynomial of A, A can have eigenvalues 1,-1,2,-2 and let $d_1,d_{-2},d_2,d_{-2}$ be the dimensions of the eigenspaces corresponding to the eigenvalues.(I understand the above)
Let $M_k$ be the vectorspace of k-by-k real matrices. Then $W_A$ is isomorphic to $M_{d_1} \oplus M_{d_{-1}}\oplus M_{d_2}\oplus M_{d_{-2}} $.(Why isomorphic?)
Therefore dim($W_A$)=${d_1}^2 +{d_{-1}}^2 +{d_2}^2+ {d_{-2}}^2$.(why?) 
Thus we have the minimum when $({d_1},{d_{-1}},{d_2},{d_{-2}})=(25,25,25,25)$.

Since $\psi_a(x) = (x-1)(x+1)(x-2)(x+2)$ we see that all Jordan blocks of $A$ are of size one and so $A=V \Lambda V^{-1}$ where $\Lambda$ is diagonal and $\{ [\Lambda]_{kk} \}_k = \{ \pm 1, \pm 2 \}$.
It is straightforward to see that
$W_A = V W_{\Lambda} V^{-1}$, in particular the dimensions of $W_A, W_\Lambda$ are the same. A little more work shows that
$B'\in W_\Lambda$ iff $[\Lambda]_{ii} \neq [\Lambda ]_{jj}$ implies $[B']_{ij} = 0$ for all $i,j$. Hence if $[\Lambda]_{ii} = [\Lambda ]_{jj}$, then $[B']_{ij}$ can be chosen arbitrarily.
In the following let $\lambda, \mu$ take values in $\{ \pm 1 \pm 2 \}$.
Let $I_\lambda = \{ i | [\Lambda]_{ii} = \lambda \}$ and note that
$d_\lambda = \dim \ker (A-\lambda I) = |I_\lambda|$. Then note that
$B'\in W_\Lambda$ iff $[B']_{ij} = 0$ whenever $i \in I_\lambda, j \in I_\mu$ and $\lambda \neq \mu$.
In the following let the summations be over values in $\{ \pm 1 \pm 2 \}$.
If $i,j \in I_\lambda$, then $[B']_{ij}$ can take any value and since
there are $d_\lambda^2$ such elements, we see that
$\dim W_\Lambda = \sum_\lambda d_\lambda^2$.
Hence the problem becomes $\min \{ \sum_\lambda d_\lambda^2 | \sum_\lambda  d_\lambda = 100, d_\lambda  \ge 1\}$.
