LINEAR-ALGEBRA Β· Interactive Practice | Unit 22 Β· Video 4

From One Big Equation to a Matrix: The Companion Matrix Trick

IKey Formulas

Formula Name Description
yβ€²β€²+byβ€²+ky=0y'' + b y' + k y = 0 Second-order linear ODE The original scalar equation
u=(yβ€²y)\mathbf{u} = \begin{pmatrix} y' \\ y \end{pmatrix} State vector Highest derivative on top
uβ€²=Au,A=(βˆ’bβˆ’k10)\mathbf{u}' = A\mathbf{u}, \quad A = \begin{pmatrix} -b & -k \\ 1 & 0 \end{pmatrix} Companion matrix system Row 1 = physics, Row 2 = bookkeeping
det⁑(Aβˆ’Ξ»I)=Ξ»2+bΞ»+k\det(A - \lambda I) = \lambda^2 + b\lambda + k Characteristic polynomial Same as the ODE's characteristic equation

IIVisualization 1 β€” Building the Companion Matrix

The ODE's coefficients bb and kk drop into AA's top row; its characteristic polynomial is Ξ»2+bΞ»+k\lambda^2 + b\lambda + k.

πŸ’‘ Those x-intercepts are the eigenvalues of AA β€” computed a second way in the next visualization.

IIIVisualization 2 β€” Eigenvalues Are the Characteristic Roots

The eigenvalues of AA are exactly the roots of Ξ»2+bΞ»+k\lambda^2 + b\lambda + k, whether real or complex.

πŸ’‘ For any b,kb, k the two eigenvalues sum to βˆ’b-b (the trace of AA) and multiply to kk (its determinant).

IVVisualization 3 β€” The Higher-Order Pattern

For an nn-th order ODE, one physics row sits atop a subdiagonal of bookkeeping 11's.

πŸ’‘ The eigenvalues of this matrix are the roots of the degree-nn characteristic polynomial β€” the same trick, one order higher.

VQuiz Questions

Question 1

Consider the second-order ODE yβ€²β€²+4yβ€²+3y=0.y'' + 4y' + 3y = 0.

Using the convention u=(yβ€²,y)T\mathbf{u} = (y', y)^T (highest derivative on top), what is the companion matrix AA such that uβ€²=Au\mathbf{u}' = A\mathbf{u}?

βœ… Correct! The top row is the negated ODE coefficients (βˆ’b,βˆ’k)=(βˆ’4,βˆ’3)(-b, -k) = (-4, -3), and the bottom row (1,0)(1, 0) encodes yβ€²=yβ€²y' = y'.

❌ Sign error. When you solve yβ€²β€²+4yβ€²+3y=0y'' + 4y' + 3y = 0 for yβ€²β€²y'', you get yβ€²β€²=βˆ’4yβ€²βˆ’3yy'' = \mathbf{-}4 y' \mathbf{-} 3 y. The coefficients flip sign.

❌ Order mistake. With u=(yβ€²,y)T\mathbf{u} = (y', y)^T, the top row acts on yβ€²y' first, then yy. So the entries are (βˆ’b,βˆ’k)=(βˆ’4,βˆ’3)(-b, -k) = (-4, -3), not (βˆ’k,βˆ’b)(-k, -b).

❌ That's the matrix you'd get from the reversed convention u=(y,yβ€²)T\mathbf{u} = (y, y')^T. Our convention puts the highest derivative on top, which puts the physics row on top.

❌ Not quite. Try again β€” the hints above can help.

Show solution

Solution:

With u=(yβ€²,y)T\mathbf{u} = (y', y)^T, we differentiate: uβ€²=(yβ€²β€²yβ€²).\mathbf{u}' = \begin{pmatrix} y'' \\ y' \end{pmatrix}.

From the ODE: yβ€²β€²=βˆ’4yβ€²βˆ’3yy'' = -4y' - 3y. The bottom entry is just yβ€²=yβ€²y' = y'. So uβ€²=(βˆ’4yβ€²βˆ’3yyβ€²)=(βˆ’4βˆ’310)(yβ€²y).\mathbf{u}' = \begin{pmatrix} -4 y' - 3 y \\ y' \end{pmatrix} = \begin{pmatrix} -4 & -3 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} y' \\ y \end{pmatrix}.

Hence A=(βˆ’4βˆ’310)A = \begin{pmatrix} -4 & -3 \\ 1 & 0 \end{pmatrix}.

Question 2

For the ODE yβ€²β€²+3yβ€²+2y=0y'' + 3y' + 2y = 0, the companion matrix is A=(βˆ’3βˆ’210).A = \begin{pmatrix} -3 & -2 \\ 1 & 0 \end{pmatrix}.

What are the eigenvalues of AA?

βœ… Correct! The characteristic polynomial Ξ»2+3Ξ»+2=(Ξ»+1)(Ξ»+2)\lambda^2 + 3\lambda + 2 = (\lambda+1)(\lambda+2) has roots βˆ’1,βˆ’2-1, -2.

❌ Sign error. The polynomial Ξ»2+3Ξ»+2=0\lambda^2 + 3\lambda + 2 = 0 factors as (Ξ»+1)(Ξ»+2)=0(\lambda+1)(\lambda+2) = 0, giving Ξ»=βˆ’1,βˆ’2\lambda = -1, -2, not +1,+2+1, +2.

❌ You read off the diagonal entries of AA. That doesn't give eigenvalues β€” only the trace (βˆ’3-3) and the determinant (22). You need to solve Ξ»2+3Ξ»+2=0\lambda^2 + 3\lambda + 2 = 0.

❌ Not quite. These are the absolute values of the ODE coefficients, not the eigenvalues. Solve Ξ»2+3Ξ»+2=0\lambda^2 + 3\lambda + 2 = 0 to get Ξ»=βˆ’1,βˆ’2\lambda = -1, -2.

❌ Not quite. Try again β€” the hints above can help.

Show solution

Solution:

Compute the characteristic polynomial: det⁑(Aβˆ’Ξ»I)=det⁑(βˆ’3βˆ’Ξ»βˆ’21βˆ’Ξ»)=(βˆ’3βˆ’Ξ»)(βˆ’Ξ»)βˆ’(βˆ’2)(1)=Ξ»2+3Ξ»+2.\det(A - \lambda I) = \det\begin{pmatrix} -3 - \lambda & -2 \\ 1 & -\lambda \end{pmatrix} = (-3-\lambda)(-\lambda) - (-2)(1) = \lambda^2 + 3\lambda + 2.

This is exactly the characteristic polynomial of the ODE. Factor: Ξ»2+3Ξ»+2=(Ξ»+1)(Ξ»+2)=0.\lambda^2 + 3\lambda + 2 = (\lambda + 1)(\lambda + 2) = 0.

So Ξ»=βˆ’1\lambda = -1 and Ξ»=βˆ’2\lambda = -2. Note these are the same exponents you'd get from the ansatz y=eΞ»ty = e^{\lambda t}.

Question 3

True or False: The companion-matrix trick adds new information to the original ODE. The system uβ€²=Au\mathbf{u}' = A\mathbf{u} has more solutions than the scalar equation yβ€²β€²+byβ€²+ky=0y'' + b y' + k y = 0.

βœ… Correct! The bookkeeping rows are trivial identities β€” they don't add constraints. The matrix system has exactly the same solution set as the scalar ODE.

❌ Not quite. The companion-matrix trick is purely a repackaging. The trivial rows like yβ€²=yβ€²y' = y' add no new constraints; they only unpack derivatives into named variables.

❌ Not quite. Try again β€” the hints above can help.

Show solution

Solution:

False. The video stresses this point: the companion-matrix trick adds no new information. The bookkeeping rows of AA encode trivial identities like yβ€²=yβ€²y' = y', which impose no new constraints. They only rename the higher derivatives as new state variables.

The set of solutions to uβ€²=Au\mathbf{u}' = A\mathbf{u} is in one-to-one correspondence with the set of solutions to yβ€²β€²+byβ€²+ky=0y'' + b y' + k y = 0. Same solutions, new clothing.

Question 4

Consider the fourth-order ODE y(4)+5yβ€²β€²β€²+6yβ€²β€²+2yβ€²+7y=0.y^{(4)} + 5 y''' + 6 y'' + 2 y' + 7 y = 0.

Using the convention u=(yβ€²β€²β€²,yβ€²β€²,yβ€²,y)T\mathbf{u} = (y''', y'', y', y)^T, what is the top row of the 4Γ—44 \times 4 companion matrix AA?

βœ… Correct! The top row is the ODE coefficients negated and listed in the same order as the entries of u\mathbf{u} β€” from yβ€²β€²β€²y''' down to yy.

❌ Sign error. When you solve for y(4)y^{(4)}, every coefficient flips sign: y(4)=βˆ’5yβ€²β€²β€²βˆ’6yβ€²β€²βˆ’2yβ€²βˆ’7yy^{(4)} = -5 y''' - 6 y'' - 2 y' - 7 y.

❌ Order is reversed. Since u\mathbf{u} lists derivatives from highest to lowest, the row entries must match: coefficient of yβ€²β€²β€²y''' first, then yβ€²β€²y'', yβ€²y', yy β€” giving (βˆ’5,βˆ’6,βˆ’2,βˆ’7)(-5, -6, -2, -7).

❌ That's a bookkeeping row, not the physics row. The top row carries the ODE coefficients; the 11's appear on the subdiagonal below.

❌ Not quite. Try again β€” the hints above can help.

Show solution

Solution:

Solve the ODE for the highest derivative: y(4)=βˆ’5yβ€²β€²β€²βˆ’6yβ€²β€²βˆ’2yβ€²βˆ’7y.y^{(4)} = -5 y''' - 6 y'' - 2 y' - 7 y.

The top entry of uβ€²\mathbf{u}' is y(4)y^{(4)}. Since u=(yβ€²β€²β€²,yβ€²β€²,yβ€²,y)T\mathbf{u} = (y''', y'', y', y)^T, the top row of AA must produce this linear combination, reading off the coefficients in the same order: RowΒ 1=(βˆ’5,β€…β€Šβˆ’6,β€…β€Šβˆ’2,β€…β€Šβˆ’7).\text{Row 1} = (-5, \; -6, \; -2, \; -7).

The remaining three rows are the bookkeeping subdiagonal of 11's, giving A=(βˆ’5βˆ’6βˆ’2βˆ’7100001000010).A = \begin{pmatrix} -5 & -6 & -2 & -7 \\ 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \end{pmatrix}.

Solved: 0 / 4