Let $A \in R^{n \times n}$
Show that if $A =\alpha I$ for some $\alpha \in R$, then for all $B \in R^{n \times n}$ we have $AB = BA$
I proved this by:
$$AB = \begin{bmatrix} \alpha & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & \alpha\end{bmatrix}\begin{bmatrix} b_{11} & \cdots & b_{1n} \\ \vdots & \ddots & \vdots \\ b_{n1} & \cdots & b_{nn}\end{bmatrix} = \begin{bmatrix} \alpha b_{11} & \cdots & \alpha b_{1n} \\ \vdots & \ddots & \vdots \\ \alpha b_{n1} & \cdots & \alpha b_{nn}\end{bmatrix}$$
$$BA = \begin{bmatrix} b_{11} & \cdots & b_{1n} \\ \vdots & \ddots & \vdots \\ b_{n1} & \cdots & b_{nn}\end{bmatrix}\begin{bmatrix} \alpha & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & \alpha\end{bmatrix} = \begin{bmatrix} \alpha b_{11} & \cdots & \alpha b_{1n} \\ \vdots & \ddots & \vdots \\ \alpha b_{n1} & \cdots & \alpha b_{nn}\end{bmatrix}$$
$$AB = BA$$
How do I prove the opposite case? Show that if $B \in R^{n \times n}$ we have $AB = BA$, then there exists a $\alpha \in R$ such that $A = \alpha I$?
The opposite is false. To see this consider two linear transformations $A$ and $B$ with $A$ the orthogonal projection onto the span of $(0,1)$ and B the orthogonal projection onto the span of $(1,0)$. Then $AB=BA=O$ but neither $A$ or $B$ is of the form $\alpha I$.