<s>[INST] Finding eigenvalues and eigenvectors, $2\times2$ matrices 
Find all eigenvalues and eigenvectors:
a.) $\pmatrix{i&1\\0&-1+i}$
b.) $\pmatrix{\cos\theta & -\sin\theta \\ \sin\theta & \cos\theta}$

For a I got: 
$$\operatorname{det} \pmatrix{i-\lambda&1\\0&-1+i-\lambda}= \lambda^{2} - 2\lambda i + \lambda - i - 1
$$
For b I got:
$$\operatorname{det} \pmatrix{\cos\theta - \lambda & -\sin\theta \\ \sin\theta & \cos\theta - \lambda}= \cos^2\theta + \sin^2\theta + \lambda^2 -2\lambda \cos\theta = \lambda^2 -2\lambda \cos\theta +1$$
But how can I find the corresponding eigenvalues for a and b? 
 [/INST] Basic tools
For $2 \times 2$ matrices the characteristic polynomial is:
$$
 p(\lambda) = \lambda^{2} - \lambda\, \text{tr }\mathbf{A} + \det \mathbf{A}
$$
The roots of this function are the eigenvalues, $\lambda_{k}$, k=1,2$.
The eigenvectors solve the eigenvalue equation
$$
 \mathbf{A} u_{k} = \lambda_{k} u_{k}
$$

Case 1
$$
\mathbf{A} =
%
\left(
\begin{array}{cc}
 i & 1 \\
 0 & -1+i \\
\end{array}
\right)
$$
The trace and determinant are
$$
 \text{tr } \mathbf{A} = -1 + 2 i, \qquad \det \mathbf{A} = -1 - i
$$
The characteristic polynomial is 
$$
  p(\lambda) = \lambda ^2+(1-2 i) \lambda +(-1-i)
$$
The roots of this polynomial are the eigenvalues:
$$ \lambda \left( \mathbf{A} \right) = \left\{
i, -1 + i
\right\}
$$
First eigenvector:
$$
\begin{align}
  \left( \mathbf{A} - \lambda_{1} \mathbf{I}_{2} \right) u_{1} &= \mathbf{0} \\[3pt]
%
\left(
\begin{array}{cc}
 i & 1 \\
 0 & -1+i \\
\end{array}
\right) - 
\left( -1 + i \right)
%
\left(
\begin{array}{cc}
 1 & 0 \\
 0 & 1 \\
\end{array}
\right)
\left(
\begin{array}{cc}
 u_{x} \\
 u_{y} \\
\end{array}
\right)
&=
\left(
\begin{array}{c}
 0 \\
 0 \\
\end{array}
\right) \\
%
\left(
\begin{array}{cc}
 u_{x} + u_{y}\\
 0 \\
\end{array}
\right)
&=
\left(
\begin{array}{c}
 0 \\
 0 \\
\end{array}
\right) 
%
\end{align}
$$
The result  is
$$
 u_{1} = 
\left(
\begin{array}{cc}
 u_{x} \\
 u_{y} \\
\end{array}
\right)
=
\alpha
\left(
\begin{array}{r}
  1 \\
 -1 \\
\end{array}
\right), \quad \alpha \in \mathbb{C}
$$
Second eigenvector:
$$
\begin{align}
  \left( \mathbf{A} - \lambda_{2} \mathbf{I}_{2} \right) u_{2} &= \mathbf{0} \\[3pt]
%
\left(
\begin{array}{cr}
 0 & 1 \\
 0 & -1 \\
\end{array}
\right)
%
\left(
\begin{array}{cc}
 u_{x} \\
 u_{y} \\
\end{array}
\right)
&=
\left(
\begin{array}{c}
 0 \\
 0 \\
\end{array}
\right) \\
%
\end{align}
$$
The result  is
$$
 u_{2} = 
\alpha
\left(
\begin{array}{c}
  1 \\
  0 \\
\end{array}
\right), \quad \alpha \in \mathbb{C}
$$

Case 2
$$
\mathbf{A} =
%
\left(
\begin{array}{cr}
 \cos (\theta ) & -\sin (\theta ) \\
 \sin (\theta ) & \cos (\theta ) \\
\end{array}
\right)
$$
The trace and determinant are
$$
 \text{tr } \mathbf{A} = 2 \cos \theta, \qquad \det \mathbf{A} = \cos^{2} \theta + \sin^{\theta} = 1
$$
The characteristic polynomial is 
$$
  p(\lambda) = \lambda ^2+(1-2 i) \lambda +(-1-i)
$$
The roots of this polynomial are the eigenvalues:
$$ \lambda \left( \mathbf{A} \right) = \left\{
\cos \theta -i \sin \theta ,\cos \theta +i \sin \theta 
\right\}
$$
First eigenvector:
$$
\begin{align}
  \left( \mathbf{A} - \lambda_{1} \mathbf{I}_{2} \right) u_{1} &= \mathbf{0} \\[3pt]
%
\left(
\begin{array}{cr}
 i \sin \theta  & -\sin \theta  \\
 \sin \theta  & i \sin \theta  \\
\end{array}
\right)
%
\left(
\begin{array}{cc}
 u_{x} \\
 u_{y} \\
\end{array}
\right)
&=
\left(
\begin{array}{c}
 0 \\
 0 \\
\end{array}
\right) \\
%
\left(
\begin{array}{cc}
-u_{y} \sin \theta +i u_{x} \sin \theta \\
 u_{x} \sin \theta +i u_{y} \sin \theta
\end{array}
\right)
&=
\left(
\begin{array}{c}
 0 \\
 0 \\
\end{array}
\right) 
%
\end{align}
$$
The result  is
$$
 u_{1} = 
\left(
\begin{array}{cc}
 u_{x} \\
 u_{y} \\
\end{array}
\right)
=
\alpha
\left(
\begin{array}{r}
  i \\
 -1 \\
\end{array}
\right), \quad \alpha \in \mathbb{C}
$$
Second eigenvector:
$$
\begin{align}
  \left( \mathbf{A} - \lambda_{2} \mathbf{I}_{2} \right) u_{2} &= \mathbf{0} \\[3pt]
%
\left(
\begin{array}{rr}
 -i \sin \theta & -\sin \theta  \\
  \sin \theta & -i \sin \theta \\
\end{array}
\right)
%
\left(
\begin{array}{c}
 u_{x} \\
 u_{y} \\
\end{array}
\right)
&=
\left(
\begin{array}{c}
 0 \\
 0 \\
\end{array}
\right) \\
%
\end{align}
$$
The result  is
$$
 u_{2} = 
\alpha
\left(
\begin{array}{c}
  i \\
  1 \\
\end{array}
\right), \quad \alpha \in \mathbb{C}
$$
</s>