# What Is a Nilpotent Matrix?

An $n\times n$ matrix $A$ is nilpotent if $A^k =0$ for some positive integer $k$. A nonzero nilpotent matrix must have both positive and negative entries in order for cancellation to take place in the matrix powers. The smallest $k$ for which $A^k =0$ is called the index of nilpotency. The index does not exceed $n$, as we will see below.

Here are some examples of nilpotent matrices. \notag \begin{aligned} A_1 &= \begin{bmatrix}0 & 1 \\ 0 & 0 \end{bmatrix}, \quad A_1^2=0,\\ A_2 &= \begin{bmatrix}0 & 1 & 1\\ 0 & 0 & 1\\ 0 & 0 & 0 \end{bmatrix}, \quad A_2^3 = 0,\\ A_3 &= \begin{bmatrix}1 & -1 \\ 1 & -1 \end{bmatrix}, \quad A_3^2 = 0,\\ A_4 &= \begin{bmatrix}2 & 2 & 4\\ -4 & -4 & -8\\ 1 & 1 & 2 \end{bmatrix}, \quad A_4^2 = 0. \end{aligned}

Matrix $A_1$ is the $2\times 2$ instance of the upper bidiagonal $p\times p$ matrix $\notag N = \begin{bmatrix} 0 & 1 & & \\ & 0 & \ddots & \\ & & \ddots & 1 \\ & & & 0 \end{bmatrix}, \qquad (1)$

for which $\notag N^2 = \begin{bmatrix} 0 & 0 & 1 & & \\ & 0 & \ddots & \ddots & \\ & & & \ddots & 1 \\ & & & \ddots & 0 \\ & & & & 0 \end{bmatrix}, \quad \dots, \quad N^{p-1} = \begin{bmatrix} 0 & 0 & \dots & 0 & 1 \\ & 0 & \ddots & & 0 \\ & & \ddots & \ddots & \vdots \\ & & & 0 & 0 \\ & & & & 0 \end{bmatrix}$

and $N^p = 0$. The superdiagonal of ones moves up to the right with each increase in the index of the power until it disappears off the top right corner of the matrix.

Matrix $A_4$ has rank $1$ and was constructed using a general formula: if $A = xy^T$ with $y^Tx = 0$ then $A^2 = xy^T xy^T = (y^Tx) xy^T = 0$. We simply took orthogonal vectors $x =[2, -4, 1]^T$ and $y = [1, 1, 2]^T$.

If $A$ is nilpotent then every eigenvalue is zero, since $Ax = \lambda x$ with $x\ne 0$ implies $0 = A^nx = \lambda^n x$ or $\lambda = 0$. Consequently, the trace and determinant of a nilpotent matrix are both zero.

If $A$ is nilpotent and Hermitian or symmetric, or more generally normal ( $A^*A = AA^*$), then $A = 0$, since such a matrix has a spectral decomposition $A = Q \mathrm{diag}(\lambda_i)Q^*$ and the matrix $\mathrm{diag}(\lambda_i)$ is zero. It is only for nonnormal matrices that nilpotency is a nontrivial property, and the best way to understand it is with the Jordan canonical form (JCF). The JCF of a matrix with only zero eigenvalues has the form $A = XJX^{-1}$, where $J = \mathrm{diag}(J_{m_1},J_{m_2}, \dots, J_{m_p})$, where $J_{m_i}$ is of the form (1) and hence $J_{m_i}^{m_i} = 0$. It follows that the index of nilpotency is $k = \max\{\,m_i : i=1\colon p\,\} \le n$.

What is the rank of an $n\times n$ nilpotent matrix $A$? The minimum possible rank is $0$, attained for the zero matrix. The maximum possible rank is $n-1$, attained when the JCF of $A$ has just one Jordan block of size $n$. Any rank between $0$ and $n-1$ is possible: rank $j$ is attained when there is a Jordan block of size $j+1$ and all other blocks are $1\times 1$.

Finally, while a nilpotent matrix is obviously not invertible, like every matrix it has a Moore–Penrose pseudoinverse. The pseudoinverse of a Jordan block with eigenvalue zero is just the transpose of the block: $N^+ = N^T$ for $N$ in (1).