Guides / Linear algebra

Matrix exponentials and linear systems of ODEs: x(t) = eAtx(0), diagonalize as VeΛtV⁻¹, and read stability off the eigenvalues

One linear equation x′ = ax has the solution x(t) = eatx(0). A system x′ = Ax, with a vector x and a square matrix A, has the same solution, x(t) = eAtx(0), once the exponential of a matrix is defined by the same power series. Computing eAt by hand is an eigenvalue problem, and the eigenvalues also say at a glance whether every solution dies out. The usual mistakes come from treating a matrix like a table of separate numbers.

Short answer

Definition: eAt = I + At + (At)2/2! + …, and x(t) = eAtx(0) solves x′ = Ax. Distinct eigenvalues: with the eigenvectors as the columns of V, eAt = VeΛtV−1, or x(t) = Σ cieλitvi with c = V−1x(0). One repeated eigenvalue, one eigenvector: A = λI + N with N2 = 0, and eAt = eλt(I + Nt). Complex α ± βi: eαt times cosines and sines of βt. Stability: every solution goes to 0 exactly when every eigenvalue has negative real part.

Why it works

Differentiate the series term by term: the derivative of I + At + A2t2/2 + … is A + A2t + …, which is A times the original series. So eAt satisfies the equation, and at t = 0 it is I, which makes eAtx(0) start at x(0). The trouble is only computing it.

Along an eigenvector the matrix acts like a number: Av = λv, so x(t) = eλtv is a solution that stays on the line through v and grows or shrinks at rate λ. When there is a full set of eigenvectors, split x(0) into them, let each piece evolve on its own, and add the pieces back up; written with matrices, that is VeΛtV−1, where V−1 does the splitting and V the adding. The part of each piece that matters for large t is |eλt| = e(Re λ)t, which is why stability depends only on the real parts.

Example 1: solving x′ = Ax from the eigenvectors

Solve x′ = Ax with A = −211−2 and x(0) = (3, 1).

  1. λ2 + 4λ + 3 = 0The trace is −4 and the determinant 4 − 1 = 3, so det(A − λI) = λ2 + 4λ + 3.
  2. λ = −1, λ = −3(λ + 1)(λ + 3) = 0.
  3. v1 = (1, 1), v2 = (1, −1)A + I has rows (−1, 1), so x = y; A + 3I has rows (1, 1), so y = −x.
  4. c1 = 2, c2 = 1Solve c1(1, 1) + c2(1, −1) = (3, 1): the sum and difference give 2c1 = 4 and 2c2 = 2.
  5. x = 2e−tv1 + e−3tv2That is x(t) = (2e−t + e−3t, 2e−t − e−3t), which is (3, 1) at t = 0. Both eigenvalues are negative, so every solution decays; the e−3t part dies first, and solutions end up moving in along (1, 1).

Example 2: the whole matrix eAt

For the matrix A of Example 1, compute eAt = VeΛtV−1.

  1. V = 111−1The eigenvectors as columns, in the order of the eigenvalues −1, −3.
  2. V−1 = ½ 111−1The 2 × 2 inverse: swap the diagonal, negate the corners, divide by det V = −2.
  3. eΛt = e−t00e−3tThe exponential of a diagonal matrix is taken entry by entry: this is the one case where that is right.
  4. eAt = ½ a + ba − ba − ba + bWith a = e−t and b = e−3t. Checks: at t = 0 it is I, and times (3, 1) it gives (2a + b, 2a − b), the answer of Example 1.

Example 3: a repeated eigenvalue with one eigenvector

Solve x′ = Ax with A = 2102 and x(0) = (0, 1).

  1. λ = 2, twiceA is triangular, so its eigenvalues are the diagonal entries.
  2. A − 2I = 0100 = NIts null space is only the line through (1, 0): one eigenvector, so A cannot be diagonalized.
  3. N2 = 0So the series for eNt stops after two terms: I + Nt.
  4. eAt = e2t(I + Nt)2I commutes with N, and only then may the exponential of the sum be split into a product.
  5. x(t) = e2t(t, 1)I + Nt has rows (1, t) and (0, 1), applied to (0, 1). Check: x′ = e2t(2t + 1, 2), and Ax = e2t(2t + 1, 2).

Example 4: complex eigenvalues and a decaying spiral

Compute eAt for A = −14−1−1, and describe the solutions.

  1. λ2 + 2λ + 5 = 0Trace −2, determinant 1 + 4 = 5.
  2. λ = −1 ± 2iThe quadratic formula: (−2 ± √(4 − 20))/2.
  3. A = −I + M, M2 = −4IM has rows (0, 4) and (−1, 0); squaring it gives −4 on the diagonal and 0 off it.
  4. eMt = cos 2t I + (sin 2t/2) MWith M2 = −4I, the even terms of the series add up to cos 2t and the odd terms to sin 2t over 2, as in eiθ = cos θ + i sin θ.
  5. eAt = e−tcos 2t2 sin 2t−½ sin 2tcos 2t−I commutes with M, so eAt = e−teMt. The real part −1 makes every solution spiral in to the origin, turning at angular speed 2. Check: det eAt = e−2t = et · tr A.

Common mistakes, and the exact line they happen on

1. Exponentiating entry by entry

The matrix of Example 2.

  1. At = −2ttt−2tRight so far.
  2. eAt = e−2tetete−2tThis is the mistake. At t = 0 this is the matrix of all ones, not I, so it does not even start at x(0), and its et entries grow while every true solution decays. The matrix exponential mixes the entries through the powers A2, A3, …; only a diagonal matrix exponentiates entry by entry.

2. Treating a repeated eigenvalue as diagonal

The matrix of Example 3.

  1. λ = 2, twiceRight so far.
  2. x(t) = e2t(0, 1)This is the mistake. This treats A as 2I. Then x′ = e2t(0, 2), but Ax = e2t(1, 2): the equation fails. With only one eigenvector the solution needs the te2t term from I + Nt.

3. Reading stability off the diagonal

Is the origin stable for A = −141−1?

  1. diagonal −1, −1Right so far as a fact about A, and the trace is −2.
  2. so every solution decaysThis is the mistake. The diagonal entries are the eigenvalues only for a triangular matrix. Here det A = 1 − 4 = −3 < 0, a saddle: the eigenvalues are 1 and −3, and the solutions along the eigenvector for 1 grow like et. A negative trace is needed for stability, not enough on its own.

Practice

  1. Find eAt for A = 100−2.

    Show answer

    The diagonal matrix with entries et and e−2t.

  2. Solve x′ = 0100x with x(0) = (1, 2).

    Show answer

    The matrix is N with N2 = 0, so x(t) = (I + Nt)x(0) = (1 + 2t, 2).

  3. Classify the origin for A = 1331.

    Show answer

    A saddle: det A = −8 < 0, and the eigenvalues are 4 and −2.

  4. For the matrix of Example 4, what is det eAt, and is eAt ever singular?

    Show answer

    et · tr A = e−2t, never zero; the inverse of eAt is e−At.

  5. For which k is every solution of x′ = −1k1−1x decaying to 0?

    Show answer

    k < 1. The trace is −2, so it is stable exactly when det = 1 − k > 0. The eigenvalues are −1 ± √k.