If $A$ is nilpotent matrix then $tr(A)=0$ I want to prove if $A$ is nilpotent matrix then $tr(A)=0$. I have seen some answers on MSE about this question but none of them were clear enough to be understood for me. I appreciate if someone explains the proof in mathematical notation rather than a general explanation about it.

I will try to give some explanation of the proofs given earlier. First of all note that trace is cyclic which means $tr(ABC)=tr(CAB)=tr(BCA)$, which gives us following equality $tr(P^{-1}AP)=tr(A)$. So trace is invariant under change of basis.
Now as $A$ is nilpotent, there exist some positive integer $k$ such that $A^k=0$. Now because $A^k=0$, the kernel of $A^k$ is the whole space. Also note that if $v \in \ker(A^j)$ then $v\in \ker (A^{j+1})$, as $A^{j+1}v=AA^jv=0$. So  we have the following relation $\{0\}=\ker A^0\subseteq\ker A^1\subseteq\ker A^2\subseteq\cdots \subseteq \ker A^k=V $. Choosing a basis of $\ker A^1$, then extending to a basis of the next space $\ker A^2$, and so on, eventually gives a basis of the whole space, because $\ker A^k=V$. By construction change of basis of $A$ to this new basis leads to a strictly upper triangular matrix, to see this note that for $v\in \ker A^j$, we have $A^jv=0 \rightarrow A^{j-1}Av=0 \rightarrow Av \in \ker A^{j-1}$. So for any $v \in \cup_{i=1}^j \ker A^i$, we have $Av \in \cup_{i=1}^{j-1} \ker A^i$. And so A is strictly upper triangular matrix in our constructed basis. So in this new basis we have trace equal 0 and because trace is invariant to change of basis, $tr(A)=0$. 
