TITLE: Algebraic multiplicity = geometric multiplicity?
QUESTION [6 upvotes]: I was wondering if algebraic multiplicity was equal to the geometric multiplicity. If the matrix (of size $n\times n$) is diagonalisable, i.e. the characteristic polynomial is of the form $$p(x)=(x-\lambda_1)^{m_1}\cdot ...\cdot (x-\lambda_k)^{m_k}$$
with $m_1+...+m_k=n$, I think that indeed algebraic multiplicity of $\lambda_i$ (i.e. $m_i$) and geometric multiplicity are the same. But is there cases where it doesn't hold ?

REPLY [9 votes]: Sure, I can give a simple example:
$$
A=\begin{pmatrix}
1 & 1\\
0 & 1
\end{pmatrix}.
$$
The characteristic polynomial is $(\lambda - 1)^2$, so the algebraic multiplicity os $2$, however, geometric multiplicity is $1$, indeed $dim Ker(A-I)=1$.

REPLY [5 votes]: If $M$ is diagonalizable, then,
$$V=E_1\oplus...\oplus E_k.$$
If it's not diagonalisable, then 
$$V\supset E_1\oplus...\oplus E_k$$
but $$V\neq E_1\oplus...\oplus E_k.$$
Therefore, $$m_1+...+m_k=n:=\dim(V)>\dim(E_1)+...+\dim(E_k),$$
and thus $$(m_1-\dim(E_1))+...+(m_k-\dim (E_k))>0.$$
You can easily show by induction that $m_k\geq \dim(E_k)$ for all $k$. But you can't say more.