Let $x$ be a nilpotent element of a commutative ring $R$. Prove that $x$ is either zero or a zero divisor.
My attempt : I got the answer here but i didn't understand the answer
My proof :since $x$ is nilpotent , so there exist some index $ m$ with $x^m=0.$
if $m=1 $ then $x=0$
if $m\neq 1$ ,then $x\neq 0$ i,e $xx^{m-1}=0$ where $x^{m-1}=0$ but $x\neq 0$
for example take $x= \begin{bmatrix} 0&1\\0&0\end{bmatrix} \neq0$ but $x^{m-1}= \begin{bmatrix} 0&0\\0&0\end{bmatrix}$ where $m-1 >0$
Is my proof is correct or not ?