Prove if $M^2 =0$, then $\operatorname{rank}(M+M^T)=2\operatorname{rank}(M)$.
I have used the rank nullity theorem and the fact that rank of matrix and its transpose is same to prove it but I am not sure if it correct or not. I do not how to exactly use the fact of $M^2=0$. I can think of it means that $M$ is nilpotent and square matrix. In my answer I get less than or equal to but it I have to prove it as equal. Help would be highly appreciated. I am using real square matrices.
$\operatorname{rank}(M + M^T)\le\operatorname{rank}(M) +\operatorname{rank}(M^T)$
$\operatorname{rank}(M + M^T)\le2\operatorname{rank}(M)$
Split $\mathbb R^n$ into the orthogonal sum $V\oplus W$, where $V=\operatorname{range}(M)$ and $W=V^\perp=\ker(M^T)$. Since $M^2=0$, we have $\langle M^Tx,My\rangle=\langle x,M^2y\rangle=0$ for all $x,y\in\mathbb R^n$. Hence $$ \operatorname{range}(M^T)\perp\operatorname{range}(M). $$ In turn, $V=\operatorname{range}(M)\subseteq\operatorname{range}(M^T)^\perp=\ker(M)$. It follows that $$ MV=0. $$ By the definition of $W$, we also have $$ M^TW=0. $$ Therefore $$ \begin{aligned} \operatorname{range}(M+M^T) &=(M+M^T)(V+W)\\ &=(M+M^T)V+(M+M^T)W\\ &=M^TV+MW\\ &=M^T(V+W)+M(V+W)\\ &=\operatorname{range}(M^T)\oplus\operatorname{range}(M)\\ \end{aligned} $$ and the conclusion follows.
Remark. In terms of block matrices, the proof above essentially says that up to a change of orthonormal basis, $M$ can be expressed in the form of $$ \pmatrix{0&X_{r\times(n-r)}\\ 0&0} $$ where $r$ is the rank of $M$ and $X$ is an $r\times (n-r)$ matrix of full row rank. Therefore $M+M^T=\pmatrix{0&X\\ X^T&0}$ has rank $2r$.