Systems in
Matrix Form
Learn how to rewrite systems of differential equations as a single compact matrix equation \(\mathbf{x}' = A\mathbf{x}\), unlocking powerful techniques for analysis and solution.
What Is a System of Differential Equations?
A system of differential equations involves two or more unknown functions and their derivatives, all linked together. For example, the rates of change of two quantities \(x_1\) and \(x_2\) might each depend on both quantities simultaneously.
Systems like these arise naturally when modeling coupled phenomena: interacting populations, electrical circuits with multiple loops, or chemical reactions with several species.
Why Write Systems in Matrix Form?
The Key Ingredients
Together these produce the elegant equation \(\mathbf{x}' = A\mathbf{x}\), which encodes the entire system in one line.
The Matrix Equation: Formal Statement
Adding a Forcing Term
When external forces or inputs act on the system, we add a vector-valued function \(\mathbf{g}(t)\) to get the non-homogeneous form:
No external input. All terms involve the unknowns.
External forcing terms present on the right side.
Scalar vs. Matrix Form
| Scalar Form | Matrix Form | |
|---|---|---|
| Notation | \(x_1' = \ldots,\; x_2' = \ldots\) | \(\mathbf{x}' = A\mathbf{x}\) |
| Number of equations | \(n\) separate equations | 1 matrix equation |
| Coefficients stored | Scattered across equations | Organized in matrix \(A\) |
| Solution method | Substitution / elimination | Eigenvalues & eigenvectors |
| Scales to large \(n\) | Unwieldy | Elegant |
How to Convert: Step by Step
Example 1: A \(2 \times 2\) System
Example 2: A \(3 \times 3\) System
Key observation: Missing variables contribute a coefficient of \(0\). Equation 1 has no \(x_2\) term, and equation 3 has no \(x_1\) or \(x_3\) term.
Example 3: Non-Homogeneous System
Higher-Order to First-Order Systems
A single higher-order ODE can be rewritten as a system of first-order ODEs by introducing new variables. This lets us apply matrix methods to equations like \(y'' + 3y' - 2y = 0\).
Notice row 1 is always \((0, 1, 0, \ldots)\) because \(x_1' = x_2\) by definition. The coefficients from the original ODE appear in the last row.
The Conversion Pattern
Both pathways converge at the same result: the compact matrix equation \(\mathbf{x}' = A\mathbf{x}\).
The Companion Matrix
When converting an \(n\)-th order ODE to a first-order system, the resulting matrix has a special structure called a companion matrix.
The last row holds the negatives of the original ODE coefficients. All other rows have a single \(1\) on the superdiagonal and \(0\)s everywhere else.
Common Mistakes
Summary of Matrix Forms
| Scenario | Matrix Form | Key Feature |
|---|---|---|
| Homogeneous system | \(\mathbf{x}' = A\mathbf{x}\) | No forcing term |
| Non-homogeneous system | \(\mathbf{x}' = A\mathbf{x} + \mathbf{g}(t)\) | External input \(\mathbf{g}(t)\) |
| 2nd order ODE | \(\begin{pmatrix}0&1\\-b&-a\end{pmatrix}\) | Companion matrix |
| \(n\)-th order ODE | \(n \times n\) companion matrix | Last row: negated coefficients |
| Initial value problem | \(\mathbf{x}' = A\mathbf{x},\;\mathbf{x}(0) = \mathbf{x}_0\) | Unique solution guaranteed |
Question 1 of 5
Write the system \(x_1' = 5x_1 + 2x_2\), \(x_2' = -x_1 + 3x_2\) in matrix form \(\mathbf{x}' = A\mathbf{x}\). What is \(A\)?
Question 2 of 5
Given the system \(x_1' = 3x_2\), \(x_2' = -7x_1\), what is entry \(a_{12}\) (row 1, column 2) of the coefficient matrix?
Question 3 of 5
Convert the ODE \(y'' - 6y' + 8y = 0\) to a first-order system. Using \(x_1 = y\), \(x_2 = y'\), what is the coefficient matrix?
Question 4 of 5
For the system \(x_1' = x_1 - 2x_2 + \cos t\), \(x_2' = 4x_1 + t^2\), what is the forcing vector \(\mathbf{g}(t)\)?
Question 5 of 5
The companion matrix for the third-order ODE \(y''' + 2y'' - 5y' + 3y = 0\) has its original ODE coefficients in which location?