Is there a closed form expression for the eigenvectors of a 2x2 matrix?

Is there a closed form expression for the eigenvalues/eigenvectors of an arbitrary 2x2 matrix $ \begin{bmatrix} a & b \\ c & d \end{bmatrix} $?

Wolfram|Alpha tries to provide an expression, but it seems wrong since it produces undefined results when $c = 0$, but all matrices have at least one (possibly complex) eigenvector.

WA eigenvectors of 2x2 matrix

Is there an actual closed form expression for the eigenvectors and eigenvalues of a matrix?


You can just multiply the formulas you got by $c$, clearing denominators, and they will work even when $c=0$. The problem is that one of them will produce the "eigenvector" $(0,0)$ in that case.

Let's make the expressions less messy and easier to understand. The eigenvalues $\lambda_1,\lambda_2$ are the roots of $\det(A - \lambda I) = 0$ or $(a-\lambda)(d-\lambda) -bc = 0$. We can use the quadratic formula to solve for $\lambda_1, \lambda_2$, but I won't do that here, I'l write expressions in terms of these two roots directly.

In terms of these roots, and after clearing denominators, the two eigenvectors WolframAlpha gives are $v_i = (\lambda_i -d, c)$, and these can be verified by computing $$ \begin{bmatrix} a & b \\ c & d \end{bmatrix} \begin{bmatrix}\lambda - d \\ c\end{bmatrix} = \begin{bmatrix} a(\lambda-d) + bc \\ c(\lambda-d) + cd \end{bmatrix} = \begin{bmatrix} a(\lambda-d) + (\lambda-a)(\lambda-d) \\ \lambda c \end{bmatrix} = \lambda \begin{bmatrix} \lambda - d\\ c \end{bmatrix}. $$ Unfortunately, we get into a problem. If $c=0$, then one of the eigenvalues is just $d$, which gives us $(0,0)$ as the answer. That doesn't count as an eigenvector.

We can usually rewrite $(a-\lambda)(d-\lambda)-bc=0$ as $\frac{\lambda-a}{c} = \frac{b}{\lambda-d}$, which motivates another formula for the eigenvectors: $v_i = (b, \lambda_i-a)$. Normally, this gives a value for $v_i$ proportional to the first value. But it doesn't fail horribly when $c=0$...

...it fails horribly when $b=0$, in which case one of the eigenvalues is $a$, and it gets the eigenvector $(0,0)$.

So if you wanted a single formula, you could try $$ v_1 = (\lambda_1 - d, c) \qquad v_2 = (b, \lambda_2 - a) $$ with the understanding that when $bc=0$, $\lambda_1 = a$ and $\lambda_2 = d$. (Outside that case, we can use the eigenvalues in either order.)

When $\lambda_1 = \lambda_2$ and one of $b$ or $c$ is $0$, no formula you try will give you two eigenvectors, because there's only one eigenvector. The approach above will give you one nonzero eigenvector in that case. Unfortunately, it still doesn't handle the case when $\lambda_1 = \lambda_2$ and $b=c=0$ gracefully. (In that case, of course, we should get $(1,0)$ and $(0,1)$.)