7.7 The Matrix Method: n Equations
Real systems rarely stop at two unknowns. Three tanks in series, a building with three floors, a circuit with three loops, a chain of radioactive decays: each leads to a system with a (or larger) matrix. The good news is that the method of Section 7.6 extends almost word for word. Eigenvalues still give exponentials, complex pairs still give sines and cosines, and missing eigenvectors are still replaced by generalized eigenvectors. Only two things change: the characteristic polynomial now has degree , and a repeated eigenvalue can be "short" by more than one eigenvector, which leads to chains.
We study
with most examples for . At the end of the section we add two short tools that complete the picture: the matrix exponential and variation of parameters for nonhomogeneous systems.
The eigenvalue method for equations
Exactly as in Section 7.6, solves if and only if (Theorem 7.6.1; the proof never used ). To get the general solution we need independent solutions. By Section 7.8, solutions are independent exactly when their Wronskian (the determinant of the matrix having the solutions as columns) is nonzero at one point. For eigenvector solutions, at that determinant is just . This gives:
Suppose has linearly independent eigenvectors with eigenvalues (not necessarily distinct). Then the general solution of is
This is always the case when the eigenvalues are distinct (Theorem 7.5.4).
Getting the eigenvalues of a matrix
The characteristic equation is now a cubic. Exam and textbook problems are designed to have simple roots, and a few habits make them easy to find:
- Expand along a row or column with zeros. If a column has only one nonzero entry, the determinant factors immediately (Example 7.7.2).
- Look for a common factor before multiplying out. Adding one row (or column) of to another sometimes produces a row like , from which can be pulled out (Example 7.7.3).
- Rational root test. The constant term of is , and the leading coefficient is . So for an integer matrix every integer eigenvalue divides . Test those divisors, then divide out the factor, as in Section 4.2.
- Check. The eigenvalues add up to and multiply to .
Distinct real eigenvalues
Solve , , where .
Solution
- Characteristic polynomial. Expand along the first row:
- Roots. Group the terms: . So . Check: .
- . : The third gives ; substituting into the first, . So , : .
- . : , , . So : .
- . : , , . Adding twice the second to the first gives , so and : .
- General solution.
- Initial condition. At : The first minus the second gives ; then and .
- Answer. , , .
Complex eigenvalues
Theorem 7.6.3 (real and imaginary parts of a complex solution are real solutions) holds for any real matrix, with the same proof. So each pair of complex conjugate eigenvalues with eigenvector for contributes the two real solutions
and the conjugate eigenvalue is not used separately. Since the characteristic polynomial of a real matrix is a real cubic, it always has at least one real root; so a matrix has either three real eigenvalues or one real eigenvalue and one complex pair.
Solve , , where .
Solution
- Characteristic polynomial. Column 2 of has only one nonzero entry, , in position (sign ). Expanding along it,
- Eigenvalues. and .
- . forces , then , while is free: .
- . Row 3: , so . Take , . Row 2: , so and . Row 1 checks: . So
- Real solutions from the pair (, ):
- General solution. .
- Initial condition. At : . So , , .
- Answer.
The geometry is worth a look. The real eigenvalue is more negative than the real part of the complex pair, so the component along dies out first. Every trajectory therefore drops quickly onto the plane spanned by and and then spirals into the origin inside that plane (Figure 7.7.1). In the graphs against (Figure 7.7.2) the term in is visible only at the start.
Repeated eigenvalues
Let be an eigenvalue of algebraic multiplicity . Everything depends on how many independent eigenvectors it has (its geometric multiplicity, Definition 7.5.6).
Enough eigenvectors
If has independent eigenvectors, nothing new is needed: each gives an exponential solution and Theorem 7.7.1 applies. To find them, solve ; the number of free unknowns equals the number of independent eigenvectors, which is . This always happens, for instance, when is symmetric (): a real symmetric matrix has real eigenvalues and independent eigenvectors.
Find the general solution of for .
Solution
- A common factor. In , add row 2 to row 1. The new first row is , and the determinant does not change. Pull out :
- Simplify. Subtract column 1 from column 2: Since , we get .
- Eigenvalues. (double) and . Check: .
- . : all rows are multiples of , so the rank is and there are free unknowns. The single equation gives, with and , the eigenvectors and .
- . : , , . So , : .
- General solution.
Not enough eigenvectors: chains
If has fewer than independent eigenvectors, we extend the idea of Section 7.6. There we found with . If one more solution is still missing, we go one step further.
Vectors form a chain of length for the eigenvalue if and
Each step "goes down" one level: maps every vector of the chain to the one before it, and the first one to .
A chain for gives three linearly independent solutions of :
In general, a chain of length gives solutions, the last being .
Why works. Differentiate with the product rule:
On the other side, using , and (the chain equations rewritten),
The two expressions are identical. Independence follows at , where the three solutions equal , and the vectors of a chain are always independent (apply to a relation to get , so ; then apply to get ; then ).
Are there always enough chains? Yes. A theorem of linear algebra (the Jordan canonical form) guarantees that for every matrix the eigenvectors and generalized eigenvectors can be arranged in chains containing independent vectors altogether, and an eigenvalue of algebraic multiplicity always contributes exactly of them. Collecting the solutions from all chains gives a fundamental set. Moreover, solutions from different eigenvalues are automatically independent.
Find the general solution of for .
Solution
- Characteristic polynomial. In add column 3 to column 1. The new column 1 is ; pull out , then subtract row 1 from row 3:
- . . Rows 2 and 3 are opposite. Adding rows 1 and 2: , so , and then row 2 gives : .
- , eigenvectors. . Row 2 gives ; row 1 then gives , so . Only one free unknown: one eigenvector . We need a chain of length .
- Generalized eigenvector. Solve : row 2 says , row 1 says (row 3 is the same). Choosing : and , so . Thus .
- General solution.
Solve , , for .
Solution
- Characteristic polynomial. In add column 3 to column 2; the new column 2 is . Pull out and subtract row 2 from row 3: So with algebraic multiplicity . Check: .
- Eigenvectors. . Row 1: ; row 2: . One free unknown: . We need a chain of length .
- First link. : and . So , ; take .
- Second link. : and . So , ; take : .
- Three solutions. By Theorem 7.7.2,
- Initial condition. , so , , .
- Answer. :
Although the only eigenvalue is , the solution in Example 7.7.5 does not simply decay like . The powers of produce a temporary rise: grows from to its maximum at before it decays (Figure 7.7.3). Such transient growth is typical of defective matrices and matters in practice: a system can be stable in the long run and still produce a large overshoot.
A triple eigenvalue with two eigenvectors
One case needs care. If has multiplicity but two independent eigenvectors, we need one chain of length and one of length . The trap is that may have no solution for a carelessly chosen eigenvector . The right must lie in the column space of . Since in this situation, any nonzero column of is such an eigenvector.
Find the general solution of for , given that .
Solution
- Eigenvectors. has rank : one equation and two free unknowns. Eigenvectors: for example and .
- The trap. Trying fails: every row of is the same, so the left side always has three equal components, while does not.
- The right eigenvector. Each column of is a multiple of . It is an eigenvector, since (indeed ). Now reads ; take .
- Three solutions. , , . At the determinant of is , so they are independent.
- General solution.
- Find all eigenvalues of with their algebraic multiplicities (they must add up to ).
- For each real eigenvalue of multiplicity , find the independent eigenvectors ( of them).
- If there are of them, each gives .
- If there are fewer, build chains , until you have vectors, and use Theorem 7.7.2. If a chain equation has no solution, choose a different eigenvector (one in the column space of ).
- For each complex pair (simple), take one eigenvector and use , .
- Check that you have solutions, combine them with , and use to find the constants if an initial condition is given.
The solver below does all of this for matrices: characteristic polynomial, eigenvalues with multiplicities, eigenvectors, chains when they are needed, and the general solution. Enter the examples above, then try your own matrices.
Stability works as in Section 7.6. If every eigenvalue has a negative real part, all solutions tend to (the powers of from chains cannot beat a decaying exponential). If some eigenvalue has a positive real part, some solutions grow without bound. In Examples 7.7.2 and 7.7.5 the origin is asymptotically stable; in Examples 7.7.1, 7.7.3, 7.7.4 and 7.7.6 it is unstable.
A short note on the matrix exponential
For a single equation the solution with is . Is there a matrix version? Yes. Define, for any square matrix ,
One can show that this series converges for every (entry by entry) and may be differentiated term by term. Then
So each column of solves , and
is the solution with , exactly as in the scalar case. In the language of Section 7.8, is the fundamental matrix that equals at . Two practical ways to compute it:
- From any fundamental matrix. If has independent solutions as its columns (found by the eigenvalue method), then (proved in Section 7.8).
- Nilpotent shortcut. If with for some , then, because and commute, a finite sum. This applies whenever has a single eigenvalue , since then satisfies (Cayley–Hamilton).
The rule holds when , but it is false in general for matrices that do not commute. The shortcut above works because commutes with every matrix.
Compute for (the matrix of Example 7.6.5) and use it to solve , .
Solution
- Split. The only eigenvalue is . Put . Then
- Exponential. With :
- Solve. the same answer as in Example 7.6.5, now without eigenvectors or constants.
A short note on nonhomogeneous systems
Forced systems are handled as in Chapter 4: the general solution is the general solution of the homogeneous system plus one particular solution (Section 7.8 proves this). A particular solution can always be found by variation of parameters. Let be a fundamental matrix, so the homogeneous solutions are with a constant vector . Replace by an unknown vector function and try . Since ,
So is a solution exactly when . Because we can solve for and integrate.
Let be constant (or, more generally, continuous on an interval ), let be continuous on , and let be a fundamental matrix of . Then
is a particular solution of , and the general solution is .
Find a particular solution of (the compartments of Example 7.6.2, with material fed into compartment 2 at a decaying rate).
Solution
- Fundamental matrix. From Example 7.6.2,
- Inverse (swap, change signs, divide by the determinant):
- Integrand. (Constants of integration can be dropped: they only add a homogeneous solution.)
- Particular solution.
- Remark. The forcing has the same exponent as the eigenvalue , a kind of resonance. That is why the factor appears. With undetermined coefficients you would need the trial form with two unknown vectors; variation of parameters finds it automatically.
Exercises
In Exercises 1–8 find the general solution of .
-
Answer
; - ; also solve the initial-value problem with .
Answer
; IVP: , , . -
Answer
: ; , eigenvector ; -
Answer
: ; , eigenvector ; -
Answer
(double, two eigenvectors), ; -
Answer
: ; (double, one eigenvector , ); -
Answer
(triple), chain , , ; -
Answer
(triple, two eigenvectors); eigenvectors , ; chain , ; - Compute for .
Answer
double, , : - Find the general solution of . (Hint: look for a constant particular solution, or use Theorem 7.7.3.)
Answer
- Use variation of parameters to find a particular solution of .
Answer
, - For the three solutions of Example 7.7.1 compute and compare with .
Answer
, and , : they agree (this is Liouville's formula, Section 7.8).