Finding all complex entries? Find all complex triples $(x, y, z) $such that the following matrix is diagonalizable  
$A = \begin{bmatrix}1&x&y \\ 0&2 & z \\0&0&1\end{bmatrix}$
my attempts :
matrix A is an upper triangular matrix.
so the the eigenvalues of A are diagonal entries $1,2,1$
This implies that $A$ is diagonalizable.
Case 1: if $x=y= z= 0$ 
case 2 : if $x\neq y \neq z \neq 0$
Now Im confused that How can  i find all complex triples $(x, y, z) $such that the following matrix is diagonalizable
 A: This is equivalent to the fact that 
$$
A-I_3 = 
\begin{bmatrix} 
0 &x&y \\ 
0&1 & z \\
0&0&0
\end{bmatrix}
$$
is such that $dim(ker(A-I_3))=2$ which is, in turn, equivalent to 
$$
dim(Im(A-I_3))=1
$$
and the fact that the two columns 
$$ 
\begin{bmatrix} 
x&y \\ 
1 & z \\
0&0
\end{bmatrix}
$$
are proportional. You finally find 
$$
xz=y
$$
A: Diagonalizable means the minimal polynomial is squarefree. The full characteristic polynomial is $(\lambda - 1)^2 (\lambda - 2).$
Diagonalizable if and only if
$$ (A - I)(A - 2I) = 0.  $$
This gives a restriction on the triple $x,y,z.$ And, when we do have $y = xz,$ we have
$$
\left(
\begin{array}{ccc}
1&-x&-xz \\
0&1&z \\
0&0&1 \\
\end{array}
\right)
\left(
\begin{array}{ccc}
1&x&xz \\
0&2&z \\
0&0&1 \\
\end{array}
\right)
\left(
\begin{array}{ccc}
1&x&0 \\
0&1&-z \\
0&0&1 \\
\end{array}
\right) =
\left(
\begin{array}{ccc}
1&0&0 \\
0&2&0 \\
0&0&1 \\
\end{array}
\right)
$$
On the other hand, if $y =  xz + t$ with $t \neq 0$ we have
$$
\frac{1}{t}
\left(
\begin{array}{ccc}
0&t&zt \\
1&-x&-xz \\
0&0&t \\
\end{array}
\right)
\left(
\begin{array}{ccc}
1&x&xz +t \\
0&2&z \\
0&0&1 \\
\end{array}
\right)
\left(
\begin{array}{ccc}
x&t&0 \\
1&0&-z \\
0&0&1 \\
\end{array}
\right) =
\left(
\begin{array}{ccc}
2&0&0 \\
0&1&1 \\
0&0&1 \\
\end{array}
\right)
$$
A: Guide:
The eigenvalues are $1$ and $2$.
We want the algebraic multiplicity to be equal to the geometric multiplicity for each eigenvalue. Hence for eigenvalue $1$, we have to make sure the geometric multiplicity is $2$.
Make sure $A-1\cdot I=A-I$ has nullity $2$.
A: As you say, the eigenvalues are 1, 2, and 1. For $A$ to be diagonalizable, it must be the case that the $\lambda = 2$ eigenspace has dimension 1 and the $\lambda = 1$ eigenspace has dimension 2. Let’s find the eigenvectors with eigenvalue 1. $Av =\lambda v$ becomes
$$
\begin{bmatrix}
v_1  + v_2 x + v_3 y \\
2 v_2 + v_3 z \\
v_3
\end{bmatrix} = \lambda 
\begin{bmatrix} v_1 \\ v_2 \\ v_3 \end{bmatrix}.
$$
If $\lambda = 1$, this implies no restriction on $v_1$ (accounting for one dimension of the $\lambda= 1$ eigenspace) and the relation
$$
\begin{bmatrix}
x & y \\
1 & z
\end{bmatrix}
\begin{bmatrix} v_2 \\ v_3 \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix} 
$$
among $v_2, v_3$. The latter matrix must have a one-dimensional kernel to account for the other dimension of the $\lambda = 1$ eigenspace. By the rank-nullity theorem, this implies a one-dimensional image (or column space). That linear dependence among the columns implies $x = a y$ and $1 = az$ for some $a$. Solving, we get $a = 1/z$, hence $x = y / z$, or $xz = y$.
