Matrix $A$ is defined as \begin{pmatrix}2 & 2 & 3\\ 0 & 3 & 3\\ 4& 4 & 4\end{pmatrix}.
The real valued matrix , $B$ satisfies $AB=BA$. Prove that $B=aA^{2}+bA+cI$ for some real numbers $a,b,$ and $c$
$A$ has 3 different eigenvalues, so A is diagonalizable. The following statement appeared in the solution for this problem. $\left \{ B : AB=BA \right \}=\left \{ SDS^{-1} : D \ is \ a\ diagonal \ matrix\right \} $ , so $\left \{ B : AB=BA \right \}$ is 3 dimensional vector space.
I don't know why the two sets are equal and these sets are 3 dimensional vector spaces. Is there any theorem to get the dimension of the multiplication of matrices?
If $D$ is a $n\times n$ diagonal matrix with $n$ distinct entries in the main diagonal, then the only matrices commuting with $D$ are the diagonal matrices. ANd the space of all diagonal matrices is, of course a $n$-dimensional space.
So, in you case, the space of all matrices commuting with $D$ is $3$-dimensional. And, if $A=SDS^{-1}$ a matrix $B$ commutes with $A$ if and only if $SBS^{-1}$ commutes with $D$.