Let $A ∈ \mathbb{R}^{n \times n}$ have eigenvalues $λ_1, \ldots , λ_k$. Prove that $\operatorname{ker}(A − λiI) = \operatorname{ker}((A − λiI)^2)$ for each $i = 1,\ldots, k$ if and only if $A$ is diagonalizable.
I have seen a similar question (for the rank). But how do I proceed to prove the only if direction using the Jordan normal form? Also, I would appreciate the proof for the if direction too. Thanks.
Hint: all you need is to do it for a Jordan block.