The algebraic multiplicity of \(\lambda\) is its multiplicity as a root of the characteristic polynomial
\[
p(t)=\det(tI-A).
\]
For example, if \(p(t)=(t-2)^2(t+1)\), then \(\lambda=2\) has algebraic multiplicity 2.
In general, when \(\lambda\) is an eigenvalue,
\[
1\le \mathrm{geo}(\lambda)\le \mathrm{alg}(\lambda).
\]
If \(\mathrm{geo}(\lambda) < \mathrm{alg}(\lambda)\), the matrix is defective at \(\lambda\).
The difference
\[
\mathrm{defect}(\lambda)=\mathrm{alg}(\lambda)-\mathrm{geo}(\lambda)
\]
counts how many independent eigenvectors are “missing” compared to the algebraic repetition of the eigenvalue.
A defective eigenvalue is a common reason a matrix fails to be diagonalizable.
Example (a classic defective case):
\[
A=\begin{bmatrix}2&1\\0&2\end{bmatrix},\quad \lambda=2.
\]
Then
\[
A-2I=\begin{bmatrix}0&1\\0&0\end{bmatrix}
\]
and solving \((A-2I)\mathbf{v}=\mathbf{0}\) forces \(v_2=0\), with \(v_1\) free. So the eigenspace is
\(\mathcal{E}_2=\mathrm{span}\left\{\begin{bmatrix}1\\0\end{bmatrix}\right\}\),
which has geometric multiplicity 1 even though \((t-2)^2\) shows algebraic multiplicity 2.
Practical note: for numeric matrices, an “algebraic multiplicity estimate” can be sensitive to rounding. The null space test
\((A-\lambda I)\mathbf{v}=\mathbf{0}\) is the most direct confirmation that \(\lambda\) is an eigenvalue.