Historical Context & Motivation
Scientists and mathematicians have long encountered situations where several quantities change simultaneously and depend on one another. Think of a predator-prey ecosystem: the wolf population affects the deer population, and the deer population affects the wolves right back. Each species' rate of change is described by its own differential equation, but these equations are tangled together. Writing them out one by one becomes messy and hard to manage, especially when you have three, four, or even dozens of interacting quantities.
The idea of organizing numbers into rectangular arrays — matrices — developed over centuries. By the mid-1800s, mathematicians realized matrices could do much more than store data; they could represent entire systems of equations in compact form. This breakthrough transformed how we solve coupled differential equations, turning pages of algebra into a single, clean expression.
The central question this lesson answers is straightforward: given a system of differential equations where multiple unknowns depend on each other, how do we rewrite it as a single matrix equation? Mastering this translation step is the gateway to every technique you will learn for solving systems of differential equations.
Core Principles & Definitions
Before you can write a system in matrix form, you need a few foundational ideas. A system of differential equations is a collection of equations in which two or more unknown functions (like x(t) and y(t)) and their derivatives appear together. When every equation is linear — meaning no unknown is squared, cubed, or multiplied by another unknown — the system can be expressed using matrices.
State Vector x(t)
Coefficient Matrix A
Derivative Vector x′(t)
Matrix Equation x′ = Ax
Visual Explanation — From Equations to Matrix
The diagram below shows the translation process for a 2×2 system. On the left you see two separate differential equations. In the center, the coefficients are extracted and placed into the matrix A, while the unknowns are stacked into the vector x. On the right, the compact matrix equation emerges.
Notice how the first row of A (the numbers 3 and 2) comes directly from the right-hand side of the first equation, and the second row (−1 and 4) comes from the second equation. The order of the unknowns in the state vector x must match the order of the columns in A. If you multiply the matrix A by the vector x by hand, you recover exactly the two original equations — nothing is lost in the translation.
Mathematical Framework
Let's formalize the translation. Suppose you have n unknown functions x₁(t), x₂(t), …, xₙ(t), each satisfying a first-order linear differential equation. The general form of such a system is shown below.
The key skill is reading each equation, identifying which coefficient belongs to which unknown, and slotting it into the correct row and column of A. When there is no term for a particular unknown in a given equation, the corresponding matrix entry is simply 0.
Step-by-Step Translation Process
Here is a reliable four-step recipe you can follow every time you need to convert a system of first-order linear differential equations into matrix form.
- Step 1 — List the unknowns. Identify every unknown function in the system and assign them a consistent order: x₁, x₂, …, xₙ. This order defines the columns of A and the entries of x.
- Step 2 — Isolate each derivative. Rewrite each equation so that the derivative stands alone on the left side, with only unknown-function terms (and possibly forcing terms) on the right.
- Step 3 — Read off the coefficients. For each equation (row i), read the coefficient of each unknown xⱼ. If xⱼ does not appear, write 0.
- Step 4 — Assemble the matrix equation. Build x′, A, x, and (if needed) g(t), then write x′ = Ax or x′ = Ax + g(t).
The verification step is worth the extra 30 seconds. If you perform the matrix-vector multiplication Ax and each row matches the right-hand side of the original equation, you know your matrix is correct. If even one entry disagrees, recheck that row and column.
Worked Example
Let's work through a complete 3 × 3 system to see every step in action.
x₁′ = 2x₁ − x₂ + 3x₃
x₂′ = x₁ − x₃
x₃′ = −4x₁ + 2x₂
Our goal is to express this system in the form x′ = Ax.[ 2 −1 3 ]
[ 1 0 −1 ]
[−4 2 0 ]Advantages & Common Pitfalls
Writing systems in matrix form is not just cosmetic — it unlocks powerful solution methods and helps you spot structure. But there are also traps that trip up beginners. The table below summarizes both sides.
| Advantages | Common Pitfalls |
|---|---|
| Compactness — n equations become one expression x′ = Ax, making systems easier to read and communicate. | Sign errors — forgetting to carry a negative sign from the equation into the matrix entry. |
| Eigenvalue methods — you can directly compute eigenvalues of A to find general solutions without guessing. | Column order mismatch — the columns of A must follow the same ordering as the entries of x. |
| Computer-friendly — software like MATLAB and Python can solve x′ = Ax in a single command. | Missing zero entries — when a variable doesn't appear in an equation, you must still put 0 in the matrix. |
| Generalization — the same framework works for 2, 3, or 100 equations. | Non-isolated derivatives — if x₁′ + 2x₁ = x₂ isn't rearranged first, you'll read the wrong coefficients. |
Connection to Advanced Theory
Writing a system in matrix form is the first step in a larger toolkit. Once you have x′ = Ax, you can apply eigenvalue and eigenvector techniques to find the general solution. The table below previews how this concept connects to topics you'll encounter next.
| This Lesson | Next Steps |
|---|---|
| Identify the coefficient matrix A from a system of equations. | Compute eigenvalues by solving det(A − λI) = 0. |
| Write x′ = Ax for a homogeneous system. | Use eigenvalues and eigenvectors to build the general solution x(t) = c₁v₁eᵏ¹ᵗ + c₂v₂eᵏ²ᵗ + … |
| Recognize a non-homogeneous system x′ = Ax + g(t). | Apply variation of parameters or undetermined coefficients in matrix form. |
| Handle constant coefficient matrices. | Explore the matrix exponential eᴬᵗ as the most general solution operator. |
Every one of these advanced methods relies on having the system correctly written in matrix form. If A is wrong by even one entry, your eigenvalues will be off and your entire solution collapses. That is why mastering the conversion process now pays dividends throughout the course.
Practice Problems
Summary — Writing Systems in Matrix Form
A system of first-order linear differential equations can always be rewritten as the compact matrix equation x′ = Ax. The coefficient matrix A is built row by row: row i contains the coefficients from the i-th equation, with each column corresponding to one unknown function in the state vector x. Missing variables produce zero entries. When external forcing is present, the system becomes x′ = Ax + g(t).
The four-step process — list unknowns, isolate derivatives, read off coefficients, and assemble the matrix equation — works for systems of any size. Always verify by multiplying Ax to confirm each row reproduces the original equation. This matrix form is the essential starting point for eigenvalue-based solution methods, matrix exponentials, and computational approaches used throughout differential equations and engineering.