# How to use the basis in order to diagonalize the matrix

Find a basis of eigenvectors of $\mathbb{R}^2$ for the matrix: $$A=\begin{pmatrix} 2 & -1 \\ -1 & 2 \end{pmatrix}$$ Use that basis in order to diagonalize the above matrix.

My try:

I found the basis of $\begin{pmatrix} 2 & -1 \\ -1 & 2 \end{pmatrix}=2\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}-1\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$

So, the required basis are $\begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}$ and $\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$

I know that to diagonalize the matrix, I need $P^{-1}AP$

My question is how should I use these basis for the diagonalization.

• That's not what a "basis of eigenvectors" is. What you are asked to do is to find eigenvectors of $A$, then make a basis for $\Bbb R^2$ using those eigenvectors. – Arthur Jul 19 '18 at 15:22

## 2 Answers

My guess is that what you're after is a basis of eigenvalues. One such basis would be $\bigl((1,-1),(1,1)\bigr)$. And, since the correspondent eigenvalues are $3$ and $1$, you have$$\begin{pmatrix}1&1\\-1&1\end{pmatrix}^{-1}\begin{pmatrix}2&-1\\1&2\end{pmatrix}\begin{pmatrix}1&1\\-1&1\end{pmatrix}=\begin{pmatrix}3&0\\0&1\end{pmatrix}.$$

• So, I need to find $det(A-\lambda I)=0$ to get the eigenvalues and then use those values – user572932 Jul 19 '18 at 15:26
• Yes, that's what you should do. – José Carlos Santos Jul 19 '18 at 15:27
• The eigenvalues are correct, but what you should do after is to compute eigenvectors. I got $(1,-1)$ and $(1,1)$ and so I worked with the matrix$$\begin{pmatrix}1&1\\-1&1\end{pmatrix},$$whose columns are those eigenvectors. – José Carlos Santos Jul 19 '18 at 15:32
• Can you please tell how to compute eigenvectors? Do I need to find Nullspace in order to get those? – user572932 Jul 19 '18 at 15:33
• Yes, you need to find the nullpsaces of the matrices$$\begin{pmatrix}2-\lambda&-1\\-1&2-\lambda\end{pmatrix},$$with $\lambda\in\{3,1\}$. – José Carlos Santos Jul 19 '18 at 15:34

The columns of $P$ will be the eigenvectors of $A$, and then this will give $P^{-1}AP$ as a diagonal matrix whose $i$-th diagonal entry is the eigenvalue of $A$ corresponding to the $i$-th column of $P$ (which is an eigenvector of $A$).

Note: if the eigenvectors of $A$ are linearly dependent, then $P^{-1}$ does not exist, and in fact $A$ is not diagonalizable in this case.

• I got eigenvalues $\lambda=1,3$ and when I plug in those values I got the matrices as $\begin{pmatrix} 1 & -1 \\ -1 & 1 \end{pmatrix},\begin{pmatrix} -1 & -1 \\ -1 & -1 \end{pmatrix}$ – user572932 Jul 19 '18 at 15:32
• The eigenvectors for $A$ are $e_1+e_2$ and $e_1-e_2$, so we have $$P=\begin{pmatrix}1&1\\1&-1\end{pmatrix}$$ to get the diagonal matrix $\operatorname{diag}(1,3)$. – Dave Jul 19 '18 at 15:34