$$ A = \begin{bmatrix}2&0&-2\\0&3&0\\0&0&3\end{bmatrix}$$ I know the eigenvalues are $\lambda= 2,3,3$
I solved for: $$\begin{bmatrix} {2-\lambda}&0&-2\\ 0&{3-\lambda}&0\\ 0&0&3-\lambda \end{bmatrix}x = 0$$ for each eigenvalue. I got $x = \begin{bmatrix}3\\0\\0\end{bmatrix}$ for $\lambda=2$ and $\begin{bmatrix}-2\\1\\1\end{bmatrix}$ for $\lambda=3$
I have two bases now for each eigenspace put that means my P matrix has only 2 vector columns. Can someone help me figure out a matrix P with the X columns I found? Since 3 is listed twice, how does that affect my matrix P? I just learned about diagonalization so I appreciate the help.
Let $A$ be a square matrix of order $n$. Assume that $A$ has $m$ distinct eigenvalues. Then A is diagonalizable if the algebraic multiplicity of each eigenvalue is equal to the geometric multiplicity, Moreover, if P is the matrix with the columns $C_1, C_2,\dots, C_n$, the $n$ independent eigenvectors of A, then the matrix $P^{-1}AP$ is a diagonal matrix. In other words, the matrix $A$ is diagonalizable.
So basically just find the eigenvectors corresponding to the eigenvalues then you will get $P$, In this problem you will have two eigenvectors corresponding to the eigenvalue $3$ and $1$ eigenvector corresponding to the eigenvalue $2$
For eigenvalue $3$ we have $(-2,1,1)$ and $(-2,0,1)$ as two independent eigenvectors and for eigenvalue equal to $2$ we have $(3,0,0)$ as an eigenvector
So make these $3$ independent vectors the columns of $P$, then you will get your required matrix.