Answer: The matrix is \(\mathbf{A}=\begin{pmatrix}-1&2&-2\\0&1&1\\0&0&2\end{pmatrix}\).
Let the eigenvectors be \(v_1=\begin{pmatrix}1\\0\\0\end{pmatrix}\), \(v_2=\begin{pmatrix}1\\1\\0\end{pmatrix}\), and \(v_3=\begin{pmatrix}0\\1\\1\end{pmatrix}\), corresponding to eigenvalues \(-1\), \(1\), and \(2\) respectively.
Since \(A v = \lambda v\) for each eigenpair, we can write the columns of \(A\) in terms of these eigenvectors by forming the matrix \(P\) whose columns are the eigenvectors and the diagonal matrix \(D\) of eigenvalues:
\(P=\begin{pmatrix}1&1&0\\0&1&1\\0&0&1\end{pmatrix}, \qquad D=\begin{pmatrix}-1&0&0\\0&1&0\\0&0&2\end{pmatrix}.\)
Then \(A=PD P^{-1}\). First, \(P\) is upper triangular with determinant \(1\), so it is invertible. Its inverse is
\(P^{-1}=\begin{pmatrix}1&-1&1\\0&1&-1\\0&0&1\end{pmatrix}.\)
Now calculate \(PD\):
\(PD=\begin{pmatrix}1&1&0\\0&1&1\\0&0&1\end{pmatrix}\begin{pmatrix}-1&0&0\\0&1&0\\0&0&2\end{pmatrix}=\begin{pmatrix}-1&1&0\\0&1&2\\0&0&2\end{pmatrix}.\)
So
\(A=(PD)P^{-1}=\begin{pmatrix}-1&1&0\\0&1&2\\0&0&2\end{pmatrix}\begin{pmatrix}1&-1&1\\0&1&-1\\0&0&1\end{pmatrix}=\begin{pmatrix}-1&2&-2\\0&1&1\\0&0&2\end{pmatrix}.\)
Therefore \(\mathbf{A}=\begin{pmatrix}-1&2&-2\\0&1&1\\0&0&2\end{pmatrix}\).