# Explain why the vectors you determined together form a basis for $\mathbb{R}^3$.

Let $$A = \begin{bmatrix} 1 & -1 & 1 \\ 1 & 0 & 2 \\ -1 & 2 & 0 \end{bmatrix}$$ and $$B = \begin{bmatrix} 1 & 0 & 2 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix}$$.

1. Explain why $$0$$ is an eigenvalue of the matrix $$A$$.
$$0$$ is an eigenvalue of $$A$$ because this forces the determinant of $$A$$ to be $$0$$ (as the product of eigenvalues of an $$n\times n$$ matrix is the determinant) which means that $$A$$ is singular (not invertible). This is how we find eigenvalues of $$A$$.
2. Determine the other eigenvalues of the matrix $$A$$.
The characteristic polynomial of $$A$$ is given by $$\begin{equation*} \begin{split} c(\lambda) = \text{det}(A-\lambda I) = \text{det}\begin{bmatrix} 1-\lambda & -1 & 1 \\ 1 & -\lambda & 2 \\ -1 & 2 & -\lambda \end{bmatrix} &= (1-\lambda)\begin{vmatrix} -\lambda & 2 \\ 2 & -\lambda \end{vmatrix} + \begin{vmatrix} 1 & 2 \\ -1 & -\lambda \end{vmatrix} + \begin{vmatrix} 1 & -\lambda \\ -1 & 2 \end{vmatrix} \\ &= -\lambda^3+\lambda^2+2\lambda \\ &= -\lambda(\lambda^2-\lambda-2) \\ &= -\lambda(\lambda+1)(\lambda-2), \end{split} \end{equation*}$$ using cofactor expansion along the first row. The eigenvalues of $$B$$ are the roots of $$c(\lambda)$$, which are $$\lambda = 0$$, $$\lambda = -1$$ and $$\lambda = 2$$.
3. Explain why the vectors you determined in 2. together form a basis for $$\mathbb{R}^3$$.
This is the question I'm having trouble with. Is it because since there are 3 distinct eigenvalues so there are 3 distinct eigenvectors which means the set $$\{v_1,v_2,v_3\}$$ are linearly independent. Hence form a basis for $$\mathbb{R}^3$$? Thanks.

You just find the eigenvectors of matrix A. The eigenvectors corresponding to the eigenvalues $$0,2,-1$$ are $$[-2,-1,1]^T$$, $$[0,1,1]^T$$ and $$[-1,-1,1]^T$$ respectively. You can see easily that the there three elements of $$\mathbb{R}^3$$ are linearly independent, computing the determinant of the matrix $$P$$ $$P=\left[\begin{matrix}-2 & 0 & -1\\-1 & 1 & -1\\1 & 1 & 1\end{matrix}\right]$$ they define, which is $$\text{det}(P)=-2\neq0$$.
Then, using the fact that you correctly stated above, which is that $$n$$ linearly independent vectors of $$\mathbb{R}^n$$ form a basis for $$\mathbb{R}^n$$, you prove that the eigenvectors of $$A$$ form a basis for $$\mathbb{R}^3$$.
The matrix $$A$$ has $$3$$ distinct eigenvalues, hence is diagonalizable: there exists a basis $$\hat{a}=\{a_1,a_2,a_3\}$$ of $$\mathbb{R}^3$$ and a diagonal matrix $$D$$ (with the eigenvalues of $$Α$$ in its diagonal) such that $$(f: \hat{a})= D$$, where $$f$$ is the linear map that corresponds to the matrix $$Α$$. As a result, $$f(a_i)=\lambda_ia_i$$, which shows that the elements of the basis of $$\mathbb{R}^3$$ are just the eigenvectors of $$A$$.