TITLE: If a matrix's eigenvalues are all $1$, is the matrix the identity?
QUESTION [7 upvotes]: It's that time of night when my girl and I bicker about matrices. Tonight we ponder whether a square matrix of dimension $d$ which has a spectrum of $1$'s with multiplicity $d$ must be $I$.
If such a matrix is diagonalizable, then it must be $I$. But we're not sure what would happen if it is not diagonalizable or whether that is even a possibility.
Relatedly, we're having a tough time thinking up a matrix other than $I$ whose spectrum is all $1$'s.

REPLY [3 votes]: To close the question, I'll answer referring to gniourf_gniourf's comments.
No. If the eigenvalues of a matrix are all $1$, then the matrix need not be the identity.
Counterexample: $\begin{pmatrix}1&1\\0&1\end{pmatrix}$
If the eigenvalues of a matrix are all $1$ and it is diagonalizable, then it is the identity.