\documentclass[a4paper,12pt]{article}
\begin{document}


{\bf Question}

Given that $$A = \left( \begin{array}{rrr} 0 & 1 & 0 \\ 1 & 0 & 1
\\ 0 & 1 & 0 \end{array} \right)$$

and $B$ is such that $AB = BA$, show that $B$ must have the form
$$ \left( \begin{array}{ccc} a & b & c \\ b & {a+c} & b
\\ c & b & a \end{array} \right)$$ where $a$, $b$ and $c$ are
arbitrary. (HINT: Let $$B = \left( \begin{array}{ccc} a & b & c \\
d & e & f \\ g & g & i \end{array} \right)$$ and calculate both
$AB$ and $BA$.  Compaire the entries in these two matricies to
show that $d = f = h = b$ etc...)

{\bf Answer}

$AB=\left(\begin{array} {ccc} 0 & 1 & 0\\ 1 & 0 & 1\\ 0 & 1 & 0
\end{array} \right) \left(\begin{array} {ccc} a & b & c\\ d & e & f\\ g & h &
i \end{array} \right)= \left(\begin{array} {ccc} d & e & f\\ {a+g}
& {b+h} & {c+i}\\ d & e & f
\end{array} \right)$

$BA=\left(\begin{array} {ccc} a & b & c\\ d & e & f\\ g & h & i
\end{array} \right)\left(\begin{array} {ccc} 0 & 1 & 0\\ 1 & 0 &
1\\ 0 & 1 & 0
\end{array} \right) = \left(\begin{array} {ccc} b & {a+c} & b\\ e
& {d+f} & e\\ h & {g+i} & h
\end{array} \right)$

and so $d=h=f=b$.

Also: $e=a+c=g+i=a+g=c+i$ when
\begin{eqnarray*} a+c = c+i & \Longrightarrow & a=i \\
                  a+c = a+g & \Longrightarrow & c=g
\end{eqnarray*}
Therefore, $d,\ e,\ f,\ g,\ h$ and $i$ are uniquely determined by
a choice of $a,\ b$ and $c$.  Hence $B$ must have the form:

$$B=\left(\begin{array} {ccc} a & b & c\\ b & {a+c} & b\\ c & b &
a
\end{array} \right).$$



\end{document}
