4.6.21 · D2Ordinary Differential Equations

Visual walkthrough — Systems of first-order linear ODEs — matrix method

1,799 words8 min readBack to topic

Step 0 — What are the objects on the page?

WHAT. Before any equation, meet the two characters.

  • A vector is just an arrow pointing from the origin to the dot at coordinates . Two numbers = one arrow.
  • A matrix is a machine: you feed it an arrow, it spits out a different arrow. It can stretch, shrink, and rotate.

WHY. The whole subject is "an arrow that moves over time." We must see the arrow and the machine before we can watch them interact.

PICTURE. On the left: the input arrow (black). On the right: what the machine did to it (the red arrow points somewhere new — rotated and longer).

Figure — Systems of first-order linear ODEs — matrix method

Step 1 — What does actually say?

WHAT. Read the equation left to right, symbol by symbol:

So: "the velocity of the tip is the machine applied to the current position." Tell me where I am, and tells me which way to move next.

WHY. This is the rule of motion. It is a flow field: at every point in the plane, pins a little velocity arrow. A solution is a path that always follows the local arrow.

PICTURE. The plane is peppered with small black velocity arrows (the field ). One red curve threads through them, tangent to every arrow it touches — that red curve is a solution .

Figure — Systems of first-order linear ODEs — matrix method

Step 2 — The scalar warm-up we already trust

WHAT. Forget matrices for one line. A single equation (one number ) has solution .

  • is the growth rate,
  • is the starting value ,
  • is the self-reproducing function: its slope equals itself times .

WHY. We reach for the exponential because it is the only shape whose steepness at every instant is proportional to its own height — exactly what demands. (See Second-Order Linear ODEs where the same trick appears.) We want to smuggle this success into the vector world.

PICTURE. Three curves: shoots up, stays flat, decays to zero. The red one is the decaying case — later this becomes a stable direction.

Figure — Systems of first-order linear ODEs — matrix method

Step 3 — The one guess that could possibly work

WHAT. Copy the scalar shape but keep a direction fixed. Guess

The arrow always lies on the same line through the origin; only its length breathes in and out as changes.

WHY. If we can find directions in which the machine does not rotate the arrow — only scales it — then along those directions the vector problem collapses back to the scalar problem of Step 2, which we already solved.

PICTURE. A single dashed line through the origin. The red arrow slides out and in along it as runs, but its direction never changes. That fixedness is the whole gamble.

Figure — Systems of first-order linear ODEs — matrix method

Step 4 — Plug the guess in and watch it simplify

WHAT. Differentiate the guess (the direction is constant, so only the clock moves):

Set them equal (that is what the ODE demands) and cancel the clock , which is never zero:

\boxed{\,A\mathbf v=\lambda\mathbf v\,}$$ Term by term: $A\mathbf v$ = machine acting on the direction; $\lambda\mathbf v$ = same direction, just scaled. **They must be equal.** **WHY.** Dividing out $e^{\lambda t}$ is legal precisely because an exponential is never $0$. What remains is *no longer about time* — it is a pure geometry condition on the arrow $\mathbf v$. **PICTURE.** Left: $\mathbf v$ (black) and $A\mathbf v$ (red) point the *same way* — this $\mathbf v$ works. Right: a generic arrow where $A\mathbf v$ swings off to the side — that one is rejected. ![[deepdives/dd-maths-4.6.21-d2-s05.png]] > [!definition] Eigenvector / eigenvalue > A direction $\mathbf v\ne\mathbf 0$ that the machine only ==scales== (never rotates) is an > **eigenvector**. The scaling factor $\lambda$ is its **eigenvalue**. See > [[Eigenvalues and Eigenvectors]]. --- ## Step 5 — How do we *find* those special directions? **WHAT.** Rewrite $A\mathbf v=\lambda\mathbf v$ as $$(A-\lambda I)\,\mathbf v=\mathbf 0,\qquad I=\text{the do-nothing machine.}$$ We want a **nonzero** $\mathbf v$ sent to the zero arrow. A machine can crush a nonzero arrow to $0$ only if it *flattens the plane onto a line* — i.e. it has **zero area-scaling**. That area factor is the ==determinant==: $$\boxed{\;\det(A-\lambda I)=0\;}$$ **WHY.** If $A-\lambda I$ were invertible (area factor $\ne 0$) the *only* solution would be $\mathbf v=\mathbf 0$ — useless. Demanding determinant $=0$ is demanding the machine be degenerate enough to have a genuine null direction. **PICTURE.** A unit square (black) fed through $A-\lambda I$. For a generic $\lambda$ it maps to a tilted parallelogram with area. As $\lambda$ hits an eigenvalue, the red image **collapses to a segment** — area $0$ — and the crushed direction is the eigenvector. ![[deepdives/dd-maths-4.6.21-d2-s06.png]] --- ## Step 6 — Superpose: mix the simple motions **WHAT.** Suppose we found two independent eigenpairs $(\lambda_1,\mathbf v_1)$ and $(\lambda_2,\mathbf v_2)$. Because the rule $\mathbf{x}'=A\mathbf{x}$ is **linear** (no squares, no products), adding two solutions gives another solution: $$\mathbf{x}(t)=c_1\,e^{\lambda_1 t}\,\mathbf v_1+c_2\,e^{\lambda_2 t}\,\mathbf v_2.$$ - $e^{\lambda_1 t}\mathbf v_1$ = pure breathing along line 1, - $e^{\lambda_2 t}\mathbf v_2$ = pure breathing along line 2, - $c_1,c_2$ = how much of each, fixed by the start point $\mathbf x(0)$. **WHY.** Two independent directions span the whole plane, so *every* start point is some $c_1\mathbf v_1+c_2\mathbf v_2$. Two free constants exactly match a 2-D system — nothing is missing. **PICTURE.** Two dashed eigen-lines. A generic red trajectory is the tip of the diagonal of a moving parallelogram whose two sides breathe independently along the eigen-lines. ![[deepdives/dd-maths-4.6.21-d2-s07.png]] > [!recall]- Quick self-check on Steps 3–6 > Why can we cancel $e^{\lambda t}$? ::: Because an exponential is never zero, so dividing by it is legal. > What geometric fact forces $\det(A-\lambda I)=0$? ::: A nonzero arrow can map to $\mathbf 0$ only if the machine crushes area to zero. > Why exactly two free constants in 2-D? ::: Two independent eigenvectors span the plane, matching a 2-parameter solution family. --- ## Step 7 — Edge case: complex $\lambda$ (no real fixed line → spiral) **WHAT.** Sometimes $\det(A-\lambda I)=0$ gives $\lambda=\alpha\pm i\beta$. There is **no real direction** the machine merely scales — every real arrow gets rotated. Using [[Euler's Formula]], $e^{(\alpha+i\beta)t}=e^{\alpha t}(\cos\beta t+i\sin\beta t)$, split into real motions: $$\mathbf{x}_1=e^{\alpha t}\big(\mathbf p\cos\beta t-\mathbf q\sin\beta t\big),\qquad \mathbf{x}_2=e^{\alpha t}\big(\mathbf p\sin\beta t+\mathbf q\cos\beta t\big).$$ - $\alpha$ = the ==breathing== rate (grow if $>0$, decay if $<0$), - $\beta$ = the ==spin== rate (how fast it circles). **WHY.** No fixed line means the pure "slide in and out" picture of Step 4 cannot exist for real arrows — the arrow must turn. The $\cos,\sin$ are precisely a rotating arrow; $e^{\alpha t}$ resizes it. **PICTURE.** Three panels of one red trajectory: $\alpha<0$ inward spiral (**stable**), $\alpha=0$ closed circle (**center**), $\alpha>0$ outward spiral (**unstable**). See [[Phase Portraits and Stability]]. ![[deepdives/dd-maths-4.6.21-d2-s08.png]] --- ## Step 8 — Degenerate case: repeated $\lambda$, only one eigen-line **WHAT.** A double root $\lambda$ can leave you with **only one** eigenvector $\mathbf v$ — too few to span the plane. We manufacture a second solution with a hidden partner $\mathbf w$ (the **generalized eigenvector**) solving $(A-\lambda I)\mathbf w=\mathbf v$: $$\mathbf{x}_2=e^{\lambda t}\big(t\,\mathbf v+\mathbf w\big).$$ - the extra factor $t$ = the ==missing direction== the plain exponential could not supply. **WHY.** With one eigen-line you can only reach a line, not the plane. The linear-in-$t$ term drifts the arrow *off* that line, restoring the second degree of freedom. (This mirrors the repeated-root $t\,e^{\lambda t}$ trick in [[Second-Order Linear ODEs]].) **PICTURE.** One dashed eigen-line. The plain solution stays glued to it; the red generalized solution peels away along the arrow $\mathbf v$ as $t$ grows — a shear-like flow. ![[deepdives/dd-maths-4.6.21-d2-s09.png]] --- ## The one-picture summary Everything at once: guess $e^{\lambda t}\mathbf v$ → cancel the clock → land on $A\mathbf v=\lambda\mathbf v$ → force $\det(A-\lambda I)=0$ → superpose. The three possible personalities of a 2-D system (two real lines = node, complex = spiral, repeated = degenerate shear) are shown as three portraits growing from the same seed equation. ![[deepdives/dd-maths-4.6.21-d2-s10.png]] > [!recall]- Feynman retelling of the whole walkthrough > A matrix is a little machine that grabs an arrow and throws it somewhere else. Our equation says: > *wherever your arrow's tip is, the machine tells it which way to slither next.* We guessed the > laziest possible motion — an arrow that stays on one line and just grows or shrinks like a balloon. > Plugging that guess in, the time-part ($e^{\lambda t}$) cancels because it is never zero, and we are > left with the demand "machine only stretches this arrow, doesn't twist it." Those non-twisting > arrows are eigenvectors; the stretch factor is the eigenvalue. To hunt them we ask when the machine > crushes area to nothing (determinant zero). Once we have two such lines we mix motions along them to > reach any starting point. If the machine insists on twisting *every* real arrow, we get spirals > (complex case). If it hands us only one non-twisting line, we glue on a $t$ to drift off it and fill > the plane (repeated case). Same seed equation, three flavours of flow. > [!mnemonic] Guess · Cancel · Crush · Combine > **Guess** $e^{\lambda t}\mathbf v$ → **Cancel** the nonzero clock → **Crush** area: > $\det(A-\lambda I)=0$ → **Combine** solutions by superposition.