Commutative Matrix Problem What are values of $a,b,c$ such that matrix $A$ and $B$ commutes, i.e. $AB=BA$, where $A$ and $B$ are (3,3) matrix such that $A=\pmatrix{a_0 & b_0 &c_0\\ a_1 & b_1 & c_1\\ a_2 & b_2 & c_2}$
$$B=\pmatrix{1 & 1 &1\\ 1 & \omega & \omega^2\\ 1 & \omega^2 & \omega}$$
where $\omega+\omega^2+1=0$
 A: Yes, as the other answer notes, B has distinct eigenvalues. Therefore, anything commuting with it must be a polynomial in B. (Degrees no higher than 2 suffice.)
In some detail: let T be a matrix so that $TBT^{-1}$ is diagonal, with distinct diagonal entries $b_1, b_2, b_3$. Since $AB=BA$, $(TAT^{-1})(TBT^{-1})=(TBT^{-1})(TAT^{-1})$. For any matrix $M$, the $ij$ entry of $M(TBT^{-1})$ is $m_{ij}b_j$, while the $ij$ entry of $(TBT^{-1})M$ is $b_im_{ij}$. Thus, a matrix commuting with $TBT^{-1}$ is diagonal. Use Lagrange interpolation to find a quadratic polynomial $P$ so that $P(TBT^{-1})=TAT^{-1}$ is that other polynomial. Happily, $P(TBT^{-1})=T.P(B).T^{-1}$, so $A=P(B)$.
A: It turns out that $B$ has three different eigenvalues, so in a suitable basis it assumes diagonal form $D$. If $\hat A$ is the correspondingly transformed matrix $A$ then $AB=BA$ iff $\hat A D=D\hat A$. Now you have a simpler problem.
As you can see in Paul Garrett's answer you don't even have to compute the eigenvectors of $B$ and get a parametric representation of all $A$'s commuting with $B$ for free.
