# How to diagonalize matrices with repeated eigenvalues?

Consider the matrix $$A=\begin{pmatrix}q & p & p\\p & q & p\\p & p & q\end{pmatrix}$$ with $p,q\neq 0$. Its eigenvalues are $\lambda_{1,2}=q-p$ and $\lambda_3=q+2p$ where one eigenvalue is repeated. I'm having trouble diagonalizing such matrices. The eigenvectors $X_1$ and $X_2$ corresponding to the eigenvalue $(q-p)$ have to be chosen in a way so that they are linearly independent. Otherwise the diagonalizing matrix $S$ becomes non-invertible. What is the systematic way to find normalized linearly independent eigenvectors in this situation?

• There isn't a systematic way. For some matrices, diagonalization is entirely impossible, like with $\left(\begin{smallmatrix}1&1\\0&1\end{smallmatrix}\right)$. – Arthur Apr 10 '18 at 19:52
• Try to use Gauss method to solve $$AX = (p-q)X$$ – Youem Apr 10 '18 at 19:53
• in this example the matrix is symmetric so the eigenvectors can be mutually orthogonal – David Quinn Apr 10 '18 at 19:53
• What's more, as every row has an identical sum $q + 2p$, $(1, 1, 1)$ must be an eigenvector. – Connor Harris Apr 10 '18 at 19:53
• @DavidQuinn "must be" or there exists an orthogonal set of eigenvectors. – Doug M Apr 10 '18 at 20:02

## 2 Answers

The sum of each row of the matrix is $q+2p$ and therefore $(1,1,1)$ is an eigenvector corresponding to the eigenvalue $q+2p$. Now to compute the remaining eigenvectors, these for a basis of th null space of$$A-(q-p)\operatorname{Id}=\begin{pmatrix}p&p&p\\p&p&p\\p&p&p\end{pmatrix}.$$So, take $(1,-1,0)$ and $(0,1,-1)$.

• Is this choice always unique apart from a normalization? – mithusengupta123 Apr 10 '18 at 20:30
• @mithusengupta123 No. Why should it be unique? Instead of $(1,-1,0) and$(0,1,-1)$, you can also take$(1,0,-1)$and$(1,-2,1)$, for instance. – José Carlos Santos Apr 10 '18 at 20:38 In linear algebra, there is a distinction is made between algebraic and geometric multiplicity. The algebraic multiplicity of an eigenvalue is its multiplicity in the characteristic polynomial, and the geometric multiplicity is the dimension of its associated eigenspace. If the geometric multiplicity of the eigenvalues matches their algebraic multiplicities, then we can diagonalize. To find eigenvalues, one can take A-$\lambda\$I and row reduce it, which gives somewhat arbitrary solutions. For instance, here you can first try to get an eigenvector using just the "first" two dimensions, and get (1,-1,0), and then get an eigenvector of the remaining eigenspace. Or you could take (1,-.5,-.5) as your first eigenvector, and end up with a different basis.

If there is an eigenvalue with algebraic multiplicity larger than its geometric multiplicity, then you cannot diagonalize the matrix, but there is a more generalized concept called Jordan Canonical Form that applies to every matrix.