Find a and b such that the matrix is diagonalizable Find a and b such that the matrix 
$$
\left( \begin{array}{ccc}
1 & a \\
0 & b \\
\end{array} \right)
$$
is diagonalizable.
I know that 
$$
D = S^{-1} A S
$$
where S is a matrix made of the eigenvectors and A is the original matrix.
I can't seem to find the eigenvectors properly, but I think I have the eigenvalues correct.
$$
det(
\left( \begin{array}{ccc}
1-\lambda & a \\
0 & b-\lambda \\
\end{array} \right)) = 0 \\
(1-\lambda)(b-\lambda)=0 \\
\lambda = 1 \\
\lambda = b
$$
I'm not really sure how to find the eigenvectors from here or how to invert S afterward.
 A: If $b$ is anything other than 1 then the matrix is diagonalizable. If $b=1$ then the matrix is diagonalizable only if $a=0$ (its already in diagonal form when this is true, in fact), since if $a \neq 0$ then \begin{equation} A-I=\begin{bmatrix} 0 & a \\ 0 & 0 \end{bmatrix},\end{equation} the space of solutions of the homogenous system associated with the matrix above is then spanned by a single vector, namely
\begin{equation} \begin{bmatrix} 1 \\ 0 \end{bmatrix}, \end{equation}
so that the eigenspace associated with eigenvalue 1 only has dimension 1 and is therefore not the full vector space (which is dimension 2).
A: If $b \ne 1$, the matrix
$A = \begin{bmatrix} 1 & a \\ 0 & b \end{bmatrix} \tag{1}$
is always diagonalizable, since it has distinct eigenvalues $1$ and $b$; thus as is well-known eigenvectors $v_1$, $v_b$ corresponding to $1$ and $b$ respectively are linearly independent, so the matrix $S$, the columns of which may be take to be such $v_1$ and $v_b$,
$S = [v_1 \; v_b], \tag{2}$
is non-singular; $S^{-1}$ exists, and the construction of
$D = S^{-1}AS \tag{3}$
proceeds in the usual manner.
In the case $b = 1$, the matrix $A$ may be diagonalized if and only if $a = 0$; indeed, when $a = 0$, we have
$A = I, \tag{4}$
diagonal as given.  For general $a$, set
$N = \begin{bmatrix} 0 & a \\ 0 & 0 \end{bmatrix} \tag{5}$
so that
$A = I + N; \tag{6}$
if there existed a nonsingular $S$ and diagonal $D$ such that (3) applied, we would have to have
$D = I, \tag{7}$
since the characteristic polynomial of $A$ is in this case $(\lambda - 1)^2$, with only one root $1$ (of multiplicity 2); $D$, having the eigenvalues of $A$ on it's diagonal, can only be the identity matrix.  Applying the similarity transfomation $A \mapsto S^{-1}AS$ to (6) thus yields
$I = D = S^{-1}AS = S^{-1}IS + S^{-1}NS = I + S^{-1}NS, \tag{8}$
whence
$S^{-1}NS = 0; \tag{9}$
thus
$N = 0, \tag{10}$
which in turn implies $a = 0$, a necessary condition for (3) to bind.
