Prove that ::
If $A$ is an $n\times n$ matrix such that $AB = BA$ for any $n\times n$ matrix $B$, then $A=\lambda I_n$
Prove that ::
If $A$ is an $n\times n$ matrix such that $AB = BA$ for any $n\times n$ matrix $B$, then $A=\lambda I_n$
Let $AB=BA$ for all matrices $B$.
To show that $A=\lambda I$.
Let $v(\neq 0)\in V$ be fixed.
Then $\{v,Av\}$ is linearly dependent.Otherwise if not then $\{v,Av\}$ can be extended to form a basis of $V$ say $\{v,Av,u_1,u_2\ldots u_n\}$.
Define $B$ as \begin{bmatrix}0 & 1& 0\ldots 0\\0 & 0&0\ldots 0\\0 &0 &0\ldots 0\\\ldots\\\ldots \\0&0&0\ldots 0\end{bmatrix}
Note that $BA(v)=v $ and $B(v)=0$.
Since $AB=BA$ so $v=0$ which is false.
So $\{v,Av\}$ is linearly dependent. Hence $Av=a_v v$
Now to show that $a_v$ is independent of $v$.
Let us consider two vectors $v,w\neq 0$. Then $Av=a_vv,Aw=a_ww$
CASE I:$\{v,w\}$ is linearly dependent.
Then $v=bw\implies Av=bAw=ba_w w=a_wv\implies a_vv=a_wv$ which is false as $v\neq 0$.
CASE II:
$\{v,w\}$ is linearly independent.
Then $a_vv+a_wv=Av+Aw=A(v+w)=a_{v+w}(v+w)=a_{v+w}v+a_{v+w}w$. (Try to claim that this is also not possible.)
Hence $a_v$ is independent of $v$. So $Av=\lambda v\forall v$
So $A=\lambda I_n$