Prove that $A$ is diagonalizable iff $\mbox{tr} A\neq 0$

Prove that $A$ is diagonalizable if and only if $\mbox{tr} A\neq 0$.

$A$ is an $n\times n$ matrix over $\mathbb{C}$, and $\mbox{rk} A=1$.

If $p(t)$ is the characteristic polynomial of $A$, I know that $a(n-1)\neq0$ because $\mbox{tr} A = (-1)^{n+1}a(n-1).$
I also know that $\dim\ker(A-0\cdot I)=\dim\ker A=n-\mbox{rk} A=n-1$ (so the geometric multiplicity of $t=0$ as an eigenvalue is $n-1$).
Though I don’t know how to continue from here (on both directions).

Any suggestions?
Thanks

Solutions Collecting From Web of "Prove that $A$ is diagonalizable iff $\mbox{tr} A\neq 0$"

$A$ is diagonalizable $\implies$ $trA\neq 0$

$A=PDP^{-1}$ where
$$ D=\begin{pmatrix}
\alpha & 0 & \cdots & 0 \\
0 & 0 & \cdots & 0 \\
\vdots & \vdots & \ddots & \vdots \\
0 & 0 & \cdots & 0
\end{pmatrix}$$
with $\alpha\in\mathbb{C}^*$

so $$tr(A)= tr(PDP^{-1}) = tr(P^{-1}PD) = tr(D) = \alpha \neq 0$$

$trA\neq 0$ $\implies$ $A$ is diagonalizable
Since $rk(A)=1$, the first $n-1$ eigenvalues of A are $0$. The last one is different from $0$ since $trA\neq 0$ and fulfill the eigenspace since $dim(E_\alpha)=rk(A)=1$. Therefore, A is diagonalizable.

Since $\mbox{rk}A=1 $ you have that 0 is an eigenvalue with geometric multiplicity $n-1$. Your eigenvalues are thus $\lambda_{1}=\dots=\lambda_{n-1}=0$ and $\lambda_n=\mu$ where $\mu$ is a certain complex number. First of all notice that since $\mbox{tr} A=\sum_{i=1}^{n}\lambda_{i}$ you have that $\mbox{tr} A=\mu$.

$A$ diagonalizable $\Rightarrow$ $\mbox{tr} A\neq0$

Assume now $\mbox{tr} A=0$, then $\mu=0$ and thus 0 would be an eigenvalue with algebraic multiplicity $n$, but geometric multiplicity $n-1$ (since $\mbox{rk} A=1$). Hence $A$ would not be diagonalizable.

$\mbox{tr} A\neq0$ $\Rightarrow$ $A$ diagonalizable

Conversely assume $\mbox{tr} A\neq0$, then $\mu\neq 0$. Hence algebraic and geometric multiplicity of $\mu$ coincide since they are 1, and algebraic and geometric multiplicity of 0 coincide since $\mbox{rk} A=1$.

Diagonalizable over $\mathbb{C}$ implies there is a basis of eigenvectors, and conversely. Rank one implies nullity ( ie dimension of kernel = dimension of $0$-eigenspace- is $n-1$). Trace $0$ (in this situation) happens if and only if $0$ is the only eigenvalue. But if $0$ is the only eigenvalue, there is no basis of eigenvectors, as $0$-eigenspace is not big enough. Trace non-zero implies that there is an eigenvalue $\lambda \neq 0$, so there are $n-1$ linearly independent vectors with eigenvalue $0$ and a non-zero eigenvector with eigenvalue $\lambda$, so there is a basis of eigenvectors.