If $A$ has only one eigenvalue, what is the dimension of the corresponding eigenspace? I'm confused about how to find the possible dimension of an eigenspace given that a matrix has exactly one eigenvalue. 
Suppose $A$ is a $3\times 3$ matrix, with exactly one eigenvalue $\lambda$. I assume I'm working over $\mathbb{R}$, so $\lambda$ is the only real root of the characteristic polynomial of $A$. Since this is a cubic, $\lambda$ has multiplicity $1$ or $3$. 
Since the dimension of the eigenspace is at most the algebraic multiplicity of the eigenvalue, I think the dimension is either $0$ or $1$, or $0,1,2$ or $3$.
But the possible answers (it is a multiple choice question) are 


*

*$1$

*$2$

*$3$

*$1$ or $2$

*$1$, $2$, or $3$


How can I more precisely determine the dimension?

The case that there is a non real root is simple since then $A$ is
similar to $diag(\alpha,\lambda,\overline{\lambda})$ where $\alpha$
is the real eigenvalue and $\lambda$ is a non-real eigenvalue.
In this case it is clear that the dimension equals to algebraic multiplicity
in the characteristic polynomial hence it is $1$.
The other case is that the characteristic polynomial is $(x-\alpha)^{3}$
where $\alpha\in\mathbb{R}$.
In this case we can have some options, for example, we can have $A=diag(\alpha,\alpha,\alpha)$
hence the dimension of the eigenspace is $3$.
We can also have $$A=\begin{pmatrix}\alpha & 1\\
 & \alpha\\
 &  & \alpha
\end{pmatrix}$$ and it is straightforward to check that the dimension of the eigenspace
is $2$
We can also have $$A=\begin{pmatrix}\alpha & 1\\
 & \alpha & 1\\
 &  & \alpha
\end{pmatrix}$$ and it is straightforward to check that the dimension of the eigenspace
is $1$
Finally, we can never have it that the dimension is $0$ since if
$\alpha$ is an eigenvalue than by definition there is $v\neq0$ that
is a corresponding eigenvector, since the span of $v$ is of dimension
$1$ (because $v\neq0$) and since the span of $v$ is contained by
definition, in the eigenspace of $\alpha$ we have that the dimension
of the eigenspace is at least $1$.
So the correct answer is the last one.
