How do I find a matrix $A \in \mathbb{R}^{n * n}$ with all eigenvalues as zero and rank being $n-1$.
Is this possible? Because the number of non-zero eigenvalues is the rank. But this question has cropped up in my assignment.
Any example will do. Thanks!
$A=\begin{bmatrix}0 & 1 \\ 0 & 0\end{bmatrix}$
Edit: a more general example is a matrix with $1$'s just above the diagonal entries, and $0$'s elsewhere. So $$A=\begin{bmatrix}0 & 1 & 0 & ... & 0 & 0\\ 0 & 0 & 1 & ... & 0 & 0\\ ... & ... & ... & ... & ... & ... \\ 0 & 0 & 0 & ... & 0 & 0\end{bmatrix}$$