# Diagonalization

As matrices go, diagonal matrices are easy to work with. Sometimes this ease can be exploited with matrices that are not themselves diagonal.

Let A be a square, n×n matrix. If x is a scalar, then the corresponding eigenspace of A is the nullspace of the n×n matrix xI - A. Evidently the eigenspace is the trivial vector space unless det(xI - A) = 0.

The polynomial

det(xI - A)

(which is of degree n in the variable x) is the characteristic polynomial of A; its zeros are the eigenvalues of A. An eigenvector is a nonzero member of an eigenspace.

The square matrix A is diagonalizable if

AP = PD

for some invertible matrix P, where D is a diagonal matrix; note then A = PDP-1.

Theorem. Let A be an n×n matrix. The following are equivalent:
1. A has n linearly independent eigenvectors.
2. A is diagonalizable.

To prove this theorem, suppose P is the matrix

(p1 p2 ... pn),

where each column pi is in Rn. Then

AP = (Ap1 Ap2 ... Apn)

If D is a diagonal matrix, with diagonal entries xi, then

D = (x1e1 x2e2 ... xnen) = (x1e1 x2e2 ... xnen)T,

and therefore

PD = (x1p1 x2p2 ... xnpn).

Therefore, AP = PD if and only if Api = xipi for each i from 1 to n inclusive.

## Application to differential equations

As noted earlier, a linear polynomial is the result of applying to variables the operations of addition and scalar multiplication; these operations obey the same algebraic rules as they do in vector spaces. In a linear differential polynomial, the operation of differentiation may be applied as well: from a polynomial f, the operation produces a polynomial f' (read `eff-prime'), and it satisfies the following algebraic rules:

• (af)' = af' when a is a scalar;
• (f + g)' = f' + g'.
The differential equation y' = ay is equivalent to the homogeneous linear differential equation

y' - ay = 0 ;

from calculus its solution is known to be y = ceax (also written y = c exp(ax)). Here c is the value of y when x = 0; so we can write the solution thus:

y = y(0)eax .

Therefore the system of equations

y1' - a1y1 = 0, y2' - a2y2 = 0, ..., yn' - anyn = 0

has the solution

y1 = y1(0)e(a1x), y2 = y2(0)e(a2x), ..., yn = yn(0)e(anx) .

We can write the last conclusion in matrix form:

The equation y' - Dy = 0 has the solution y = e(xD)y(0), where
• y is the vector (y1 y1 ... yn)T of variables;
• D is the diagonal matrix whose diagonal entries are a1, a2, ..., an respectively;
• e(xD) is the diagonal matrix whose diagonal entries are e(a1x), e(a2x), ..., e(anx) respectively.
More generally, we can form the differential system y' - Ay = 0, where A is an arbitrary n×n matrix. If this matrix is diagonalizable, say A = PDP-1, then the system has the solution

y = Pe(xD)P-1y(0) .

If one is required to solve such a system, given numerical values for the entries of A, then one need not actually calculate the inverse of P unless the initial conditions y(0) are specified; even then, to find the vector P-1y(0), one need only solve for c the equation

Pc = y(0) ,

and then the solution of the original system is y = Pe(xD)c. (Even if the matrix A is not diagonalizable, the original system is still soluble, but by a more complicated procedure.)