Diagonalizable Matrix real values Let $A=\begin{pmatrix}
        a & -b  \\
        b & a \\
        \end{pmatrix}$. For which real values of $a$ and $b$ is $A$ a diagonalizable matrix?
 A: The characteristic equation of $A$ is
$$(a-\lambda)^2+b^2=0\ .$$
If $b\ne0$ then this equation has two different solutions and the matrix is diagonalisable.  On the other hand, if $b=0$ then $A=aI$ which is already diagonal.  So the matrix is always diagonalisable.
However there is a proviso: if $b\ne0$, you will need to use complex numbers in the diagonalisation.  If you are looking for a real diagonalisation, this is possible only when $b=0$.
A: Although David's answer already provides a sufficient algebraic explanation, I'd like to give a bit of a geometric one. Consider where this matrix sends the standard orthonormal basis 
$$ \begin{pmatrix} a &- b\\ b & a \end{pmatrix}\begin{pmatrix} 1\\ 0\end{pmatrix} = \begin{pmatrix} a\\ b  \end{pmatrix} =v_1, \begin{pmatrix} a &- b\\ b & a \end{pmatrix}\begin{pmatrix} 0\\ 1\end{pmatrix} = \begin{pmatrix} -b\\ a  \end{pmatrix} =v_2 $$
Note that $v_1, v_2$ are orthogonal with lengths $\sqrt{a^2 + b^2}$. If you look at some cases youu'll probably notice that $v_2$ is always 90 degrees counterclockwise from $v_1$. This, is because if we write $a/b = \tan(\theta)$, and thus have $\sin(\theta) = b/\sqrt{a^2 + b^2}$, and $cos(\theta) = a/\sqrt{a^2 + b^2}$ then we can rewrite
$$ \begin{pmatrix} a &- b\\ b & a \end{pmatrix} = \sqrt{a^2 + b^2}\begin{pmatrix} \cos\theta & -\sin\theta\\ \sin\theta & \cos \theta  \end{pmatrix} $$ 
Which shows that our matrix is the composition of a scaling and a rotation. A rotation has real eigenvectors only if it is by $2\pi, \pi$ (half rotation or full/no rotation) in which case it already diagonal. The scaling of course, will not affect our analysis of diagonalizability.
As a final note, there is a beautiful reason why we should care about matrices of this form. They form a subring of all two by two matrices (that is, they are closed under addition, subtraction and multiplication). And in fact this subring is isomorphic to the complex numbers by the map $$a+bi \mapsto \begin{pmatrix} a &- b\\ b & a \end{pmatrix}$$
And even moreso, the map $\mathbb{R}^2 \to \mathbb{R}^2$ given by these matrices, is the same as the map of multiplication by $a+bi$ from $\mathbb{C} \to \mathbb{C}$. 
