Transformation restriction to commutative matrices Let $T: \Bbb M_{3x3}(\Bbb R) \rightarrow \Bbb M_{3x3}(\Bbb R)$ be a linear transformation such that $T(B) = AB$ where:
$$ A=
    \begin{pmatrix}
    2 & -1 & -1 \\
    -1 & 2 & -1 \\
    -1 & -1 & 2 \\
    \end{pmatrix}
$$
now let $W = \{B|AB=BA\}$ be the group of all matrices that commute with $A$.
I want to


*

*find the minimal polyonimal for $T|_w$.

*prove that $W$ is the direct sum of two spaces $W = W_1 \oplus W_2$



my idea so far was:


*

*Let P be any matrix:$$ P =\begin{pmatrix}
    a & b & c \\
    d & e & f \\
    g & h & i \\
    \end{pmatrix} $$
then we could look at the transformation as $\Bbb R^9 \rightarrow \Bbb R^9$ like that:
$$ T\begin{pmatrix}
    a \\
    d \\
    g \\
b \\
e \\
h \\
c \\
f \\
i \\
    \end{pmatrix} = \begin{pmatrix}
    \begin{pmatrix}
    2 & -1 & -1 \\
    -1 & 2 & -1 \\
    -1 & -1 & 2 \\
    \end{pmatrix} &  &  \\
     & \begin{pmatrix}
    2 & -1 & -1 \\
    -1 & 2 & -1 \\
    -1 & -1 & 2 \\
    \end{pmatrix} &  \\
     &  & \begin{pmatrix}
    2 & -1 & -1 \\
    -1 & 2 & -1 \\
    -1 & -1 & 2 \\
    \end{pmatrix} \\
    \end{pmatrix}     \begin{pmatrix}
    a \\
    d \\
    g \\
b \\
e \\
h \\
c \\
f \\
i \\
    \end{pmatrix} $$

*Also, since A is real and symmetric - then it is similar to the diagonal matrix $$ [A]_o=
    \begin{pmatrix}
    0 & 0 & 0 \\
    0 & 3 & 0 \\
    0 & 0 & 3 \\
    \end{pmatrix}
$$
which implies that the minimal polynomial for the transformation $T$ is $m_A(x) = x(x-3)$
my idea was that the restriction to $W$ is in fact any matrix that commute with $A$, which means that $T|_w = A$, therefore this is a direct sum of 2 different eigenspace, but i'm not sure about it...
Can you help me to better understand the restriction?
Thanks..

$W$ is a vector space and not a group. Note that $T=A\otimes I_3$ -if we stack the matrices row by row-. It is easy to see that $T(W)\subset W$. Moreover $spectrum(T)=\{0,0,0,3,3,3,3,3,3\}$; cf. 
https://en.wikipedia.org/wiki/Kronecker_product
We may assume that $A=diag(0,3,3)$ -because $(P\otimes I)(A\otimes I)(P\otimes I)^{-1}=(PAP^{-1})\otimes I$-. 
Thus $W=\{diag(a,R);a\in\mathbb{R},R\in M_2\}$ has dimension $5$. Moreover $W=W_1\oplus W_2$ where $W_1=span(E_{1,1}),W_2=span(E_{2,2},E_{2,3},E_{3,2},E_{3,3})$ and  $T_{|W_1}=0,T_{|W_2}=3I$. 
Finally, $T_{|W}$ has $2$ eigenvalues $0,3$ and $spectrum(T_{|W})=\{0,3,3,3,3\}$; its minimal polynomial divides $x(x-3)$; conclusion: its minimal polynomial is $x(x-3)$ again.
