I have to make an argument that the characteristic polynomial of an idempotent matrix A is precisely (maybe a constant multiple of) $\lambda^{n-r}(1-\lambda)^{r}$, where r is the rank of A. I know that for an idempotent matrix A, the eigenvalue is either 0 or 1 and that the 1-eigenspace of A is the image of A. Furthermore, I was given the hint to use the geometric multiplicity of the eigenvalue 1 and to entertain the questions: What is the geometric multiplicity of 0 as an eigenvalue? What is the sum of these two multiplicities? Is it possible that either eigenspace is deficient?
Update: Following Steven's suggestions, I tackled the problem as follows:
I found that geometric multiplicities as follows: $$ \begin{align*} gmu(0)&=dim(ker(A-(0)I)) \\ &=dim(ker(A)) \\ &=n-rank(A-I) \\ &=n-r \end{align*} $$ and $$ \begin{align*} gmu(1)&=dim(ker(A-(1)I)) \\ &=dim(E_{1}) \\ &=dim(im(A)) \\ &=n \end{align*} $$
I then use these multiplicities to argue that the minimal polynomial must be of the form: $$ f_{A}(\lambda)=(\lambda)^{n-r}(1-\lambda)^{r} $$ where the roots are either 0 or 1, as suggested by the answer below. Then, matrix A is diagonalizable and similar to a diagonal matrix D with r $1$'s and (n-r) $0$'s as its diagonal entries.