I know that $A$ is an $n\times n$ real matrix of rank $r>0$ and that $1$ is an eigenvalue of $A$. I also know that the geometric multiplicity of $1$ is equal to $r$ (the rank of $A$). I am asked to show that $A$ is diagonalizable.
I have been able to use what I know about eigenvalues (and eigenspaces) in addition to the Rank-Nullity Theorem, in order to show that we must have $r=n$. That is, $A$ must be full rank and is therefore invertible. This tells us that $0$ is not an eigenvalue of $A$. I am thinking that from here I should be able to show that $A$ is similar to a diagonal matrix (maybe with the eigenvalue of $A$ along its main diagonal). But I am struggling to make that leap. Any guidance is appreciated.
As said in the comments, $A$ doesn't have to be invertible - a matrix $A$ of size $n\times n$ is diagonalizable if and only if it has $n$ linearly independent eigenvectors.
The geometric multiplicity of $1$ is $r$, so $A$ has $r$ linearly independent eigenvectors with eigenvalue $1$. We also know that $r$ is the rank of $A$, so from the rank-nullity theorem $\dim(\ker(A)) = n - \text{rank}(A) = n-r$.
This gives us an additional $n-r$ independent eigenvectors with eigenvalue $0$, and $n$ linearly independent eigenvectors overall, as needed.
Note that we did not use the fact that the eigenvalue is $1$, it could be any number. The more general statement is that if $\forall \lambda$ eigenvalue of $A$, the geometric multiplicity of $\lambda$ is equal to its algebraic multiplicity, then $A$ is diagonizable.