Solution Structure & Real-World Applications
Basic solutions, the particular-plus-homogeneous picture, and how linear systems run traffic grids and chemistry
§1Picking Up Where We Left Off
Last lecture ended with a question hanging in the air: if $\mathbf{x}_0$ solves $AX = b$ and $\mathbf{x}_h$ solves the homogeneous system $AX = 0$, what is $A(\mathbf{x}_0 + \mathbf{x}_h)$? Let us answer it immediately, because the answer is the spine of this entire lecture.
We will make this precise in §4. But first we need to understand the homogeneous solutions $\mathbf{x}_h$ themselves — their internal structure — because they turn out to have a beautiful skeleton built from a small number of fixed vectors.
§2Basic Solutions of a Homogeneous System
When we solved $AX = 0$ last lecture and found infinitely many solutions, we wrote the answer with parameters. Watch what happens when we split that answer apart by parameter.
Suppose solving a homogeneous system $AX = 0$ gives the general solution
$$X = \begin{pmatrix} 2s + \tfrac{1}{5}t \\ s \\ \tfrac{3}{5}t \\ t \end{pmatrix}.$$
There are two free parameters, $s$ and $t$. Split the vector into the part multiplied by $s$ and the part multiplied by $t$:
$$X = s\underbrace{\begin{pmatrix} 2 \\ 1 \\ 0 \\ 0 \end{pmatrix}}_{\mathbf{v}_1} + t\underbrace{\begin{pmatrix} \tfrac{1}{5} \\ 0 \\ \tfrac{3}{5} \\ 1 \end{pmatrix}}_{\mathbf{v}_2}.$$
Every solution of $AX = 0$ is a linear combination of just two fixed vectors, $\mathbf{v}_1$ and $\mathbf{v}_2$. Set $s=1, t=0$ to read off $\mathbf{v}_1$; set $s=0, t=1$ to read off $\mathbf{v}_2$.
The vectors obtained by setting one parameter to $1$ and the rest to $0$ are called the basic solutions of the homogeneous system $AX = 0$. Every solution is a linear combination of the basic solutions. The number of basic solutions equals the number of free variables, which is $n - \operatorname{rank}(A)$.
In words: the complete solution set of a homogeneous system is the span of its basic solutions. If $\mathbf{v}_1, \dots, \mathbf{v}_k$ are the basic solutions, then every solution has the form $\mathbf{x}_h = t_1 \mathbf{v}_1 + \cdots + t_k \mathbf{v}_k$ for scalars $t_1, \dots, t_k$.
§3Notation — Vectors From Here On
We are about to use vectors constantly, so let us fix notation once and for all.
A point $(x, y)$ in the plane and the column vector $\begin{pmatrix}x\\y\end{pmatrix}$ are two notations for the same object. We call it a position vector: an arrow from the origin to the point. From here on we write vectors in column form, because the column is what multiplies cleanly against a matrix. The tuple form $(x,y)$ and the column form are interchangeable — use whichever reads better, but compute with columns.
§4The Structure of a General Solution
Now we assemble the big picture. We saw the homogeneous solution set is a span of basic solutions. We saw adding a homogeneous solution to a particular one gives another full solution. Combine these and a clean theorem appears.
If $\mathbf{x}_0$ is any one particular solution of $AX = b$, then every solution has the form
$$\mathbf{x} = \underbrace{\mathbf{x}_0}_{\text{particular}} + \underbrace{\mathbf{x}_h}_{\text{homogeneous}},$$
where $\mathbf{x}_h$ ranges over all solutions of the corresponding homogeneous system $AX = 0$. The full solution set is a translated copy of the homogeneous solution set, shifted by $\mathbf{x}_0$.
Consider the single equation $x - y = 2$. Its corresponding homogeneous equation is $x - y = 0$.
The dashed teal line $x - y = 0$ passes through the origin — it is the homogeneous solution set. Parametrise it: let $x = t$, then $y = t$, so $\mathbf{x}_h = t\begin{pmatrix}1\\1\end{pmatrix}$.
The solid amber line $x - y = 2$ is the full solution set. Parametrise: let $x = t$, then $y = t - 2$, so
$$\begin{pmatrix}x\\y\end{pmatrix} = \begin{pmatrix}t\\t-2\end{pmatrix} = \underbrace{\begin{pmatrix}0\\-2\end{pmatrix}}_{\mathbf{x}_0\ \text{(particular)}} + \;t\underbrace{\begin{pmatrix}1\\1\end{pmatrix}}_{\mathbf{x}_h\ \text{(homogeneous)}}.$$
The amber line is exactly the teal line shifted by the particular solution $\mathbf{x}_0 = (0,-2)$. Same direction, moved off the origin. That shift is the role of $b$.
We could equally pick $x = 2, y = 0$ — also on $x - y = 2$. Then $\mathbf{x}_0 = (2, 0)$ and
$$\begin{pmatrix}x\\y\end{pmatrix} = \begin{pmatrix}2\\0\end{pmatrix} + t\begin{pmatrix}1\\1\end{pmatrix}.$$
This looks different from Example 2's answer, yet describes the same line. Both are correct. The particular solution is not unique — only the direction part $\mathbf{x}_h$ is forced. This is why two students can get "different" answers to the same system and both be right: they chose different $\mathbf{x}_0$.
§5Application 1 — Network & Traffic Flow
Here is where the infinitely-many-solutions story stops being abstract. Traffic engineers, water authorities, and electrical engineers all solve homogeneous-style systems every day, and the free parameters are real choices they get to make.
At every junction in a network, the total flow in equals the total flow out. Nothing accumulates and nothing vanishes at a node — cars, water, or current that enter must leave. This single conservation principle turns any network into a system of linear equations.
Cars per hour enter and leave a network through junctions A, B, C, D. Internal road flows are $f_1, \dots, f_6$. Applying inflow = outflow at each junction:
$$\begin{aligned} A:&\quad 500 = f_1 + f_2 + f_3 \\ B:&\quad f_1 + f_4 + f_6 = 400 \\ C:&\quad f_3 + f_5 = 100 + f_6 \\ D:&\quad f_2 = f_4 + f_5 \end{aligned}$$
Four equations, six unknown flows. We anticipate $6 - \operatorname{rank}$ free parameters — meaning the network has genuine flexibility in how traffic distributes.
Drag the three free flows below and watch the whole grid rebalance in real time. Notice how some settings drive a flow negative — physically impossible on a one-way street:
§6Braess's Paradox — When Adding a Road Makes Traffic Worse
The setup: drivers travel from start to finish, choosing the route that is fastest for them. Some road segments have a fixed travel time (say 20 minutes regardless of traffic); others have a time that grows with the number of drivers on them (like $T/10$ minutes, where $T$ is the traffic volume). Each driver, acting in pure self-interest, picks the route that looks fastest. The "power of two choices" — having two route options at a junction — is what creates the trap.
§7Application 2 — Balancing Chemical Equations (§1.6)
Every balanced chemical equation is the solution of a homogeneous linear system. The unknowns are the molecule counts; the equations say each element's atoms are conserved.
Assign an unknown coefficient $x_i$ to each molecule. For each element, the total atoms on the left must equal the total on the right. This gives one linear equation per element. The system is homogeneous (everything moves to one side $= 0$), so it always has the trivial solution $\mathbf{0}$ — chemically meaningless — and we seek the smallest positive integer non-trivial solution.
Balance $x_1\,\mathrm{C_8H_{18}} + x_2\,\mathrm{O_2} \to x_3\,\mathrm{CO_2} + x_4\,\mathrm{H_2O}$ (this is what burns in a petrol engine).
Conservation per element:
$$\begin{aligned} \text{C}:&\quad 8x_1 = x_3 \\ \text{H}:&\quad 18x_1 = 2x_4 \\ \text{O}:&\quad 2x_2 = 2x_3 + x_4 \end{aligned}$$
Textbook exercises — Nicholson §1.6
Balance each reaction by setting up and solving the atom-conservation system. Try each by hand, then reveal.
Six species, five elements (Pb, N, Cr, Mn, O). This is where hand-balancing breaks down and linear algebra shines.
§8More Exercises — Nicholson §1.4
A network of irrigation canals has junctions A, B, C, D. At peak demand the external flows are: $55$ in at A, $20$ out at B, $15$ out at C, $20$ out at D. Internal canal flows are $f_1, \dots, f_5$. (a) Find the possible flows. (b) If canal BC is closed ($f_3 = 0$), what range of flow on AD keeps every canal under 30?
A non-trivial homogeneous system $AX = 0$ has six variables and four equations. Determine the number of parameters in the solution for each case:
(a) $\operatorname{rank}(A) = 2$ \quad (b) $\operatorname{rank}(A) = 8$ \quad (c) $A$ has 3 rows of zeros in echelon form \quad (d) $A$ has a row of zeros.
We can now solve any linear system and describe its full solution set. But what is a matrix really doing to a vector?
So far a matrix has been bookkeeping for a system. Next week we flip the perspective: a matrix is a machine that transforms vectors — rotating, stretching, projecting space itself. Matrix multiplication, the identity, and the inverse all become geometric operations. The algebra you have built is about to come alive as geometry.