Home›Courses›Linear Algebra›Week 1 · Lecture 4
← Lecture 3
On this pageRecall·Basic Solutions·Notation·Solution Structure·Network Flow·Braess Paradox·Chemical Balancing·Exercises
Lecture 5 →
MATH-120 · Linear Algebra · Lecture 411 June 2026

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.

🔑
The answer to last lecture's question
$A(\mathbf{x}_0 + \mathbf{x}_h) = A\mathbf{x}_0 + A\mathbf{x}_h = b + 0 = b$. So $\mathbf{x}_0 + \mathbf{x}_h$ is also a solution of $AX = b$! Add any homogeneous solution to one particular solution, and you land on another solution of the full system. This is the single most important structural fact about linear systems.

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.

Example 1Splitting a solution by its parameters

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$.

Basic solutions

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)$.

🧬
Why this is profound
The entire infinite solution set of $AX = 0$ — which could be a line, a plane, or a higher-dimensional flat — is completely captured by a handful of vectors. Two basic solutions describe an infinite plane of solutions. This compression is the seed of the idea of a basis, one of the deepest concepts in all of linear algebra, which we will study formally in Chapter 5.
The solution of AX = 0 is a linear combination

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.

ℝ²
(x, y)
$\begin{pmatrix}x\\y\end{pmatrix}$$
ℝ³
(x, y, z)
$\begin{pmatrix}x\\y\\z\end{pmatrix}$$
ℝ⁴
(x₁,x₂,x₃,x₄)
$\begin{pmatrix}x_1\\x_2\\x_3\\x_4\end{pmatrix}$$
Position vectors

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.

Solution structure theorem

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$.

Example 2The picture in 2D — x − y = 2

Consider the single equation $x - y = 2$. Its corresponding homogeneous equation is $x - y = 0$.

xyx − y = 0x − y = 2(0,0)(2,0)xₚ shift

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$.

🛠️
How to compute a particular solution xₚ
Easy recipe: set every free parameter to zero and solve for the rest. In the example above, the parameter was $t$; setting $t = 0$ gives $\mathbf{x}_0 = (0, -2)$ instantly. Any single point on the solution line works as $\mathbf{x}_0$ — setting parameters to zero just picks the most convenient one.
★ Challenge 3Same line, a different particular solution

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.

The junction rule

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.

🚦
In flow = Out flow
This is the same idea as Kirchhoff's current law in circuits and conservation of mass in pipes. One principle, written once per junction, gives one equation per junction. Solve the system and you get every possible flow pattern the network can sustain.
Example 4A four-junction traffic grid (from the lecture)

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:

Junction equations

$$\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}$$

What we expect

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:

Interactive · Network flow — drag the free variables, watch the whole grid respond
f₁220
f₂150
f₃130
f₄ (free)100
f₅ (free)50
f₆ (free)80
f₄100
f₅50
f₆80
✓ All flows ≥ 0 — this is a physically valid traffic pattern.

Three free variables means three "knobs." Every valid setting is one real traffic pattern the grid can carry. The infinitely many solutions are not an abstraction — they are every way cars could actually distribute across these roads.

§6Braess's Paradox — When Adding a Road Makes Traffic Worse

🤯
The paradox that breaks intuition
In 1968 the German mathematician Dietrich Braess discovered something stunning: adding a new road to a congested network can make everyone's travel time longer, even though no one is forced to use the new road. Removing roads can speed traffic up. This is not a quirk — it has been observed in real cities.

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.

🌍
It really happens
When Seoul, South Korea, tore down the Cheonggyecheon highway in 2003 and replaced it with a park, traffic flow in the surrounding area actually improved — a real-world Braess effect. Similar improvements were observed when 42nd Street in New York was closed for an event. The mathematics of selfish routing predicts that more capacity is not always better when every agent optimises only for themselves.
🎲
The power of two choices
The flip side of the paradox is a beautiful positive result with the same name. In load-balancing — assigning jobs to servers, or hashing items into bins — giving each item just two random choices and picking the less-loaded one produces dramatically better balance than one choice. Two options, chosen well, tame randomness. The same "two choices" that can trap a road network can, in the right setting, rescue a computer system.

§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.

Conservation of atoms = linear equations

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.

Example 5Octane combustion — the engine in your car

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}$$

⚗️
Why chemists secretly use linear algebra
Balancing by trial and error works for simple reactions but collapses for complex ones (try balancing a redox reaction with eight species by hand). Every chemistry-software "balance" button runs Gaussian elimination underneath. The null space of the atom-conservation matrix is the set of balanced equations.

Textbook exercises — Nicholson §1.6

Balance each reaction by setting up and solving the atom-conservation system. Try each by hand, then reveal.

Example 1.6.1Burning methane: CH₄ + O₂ → CO₂ + H₂O
Example 1.6.2NH₃ + CuO → N₂ + Cu + H₂O
Example 1.6.3Photosynthesis: CO₂ + H₂O → C₆H₁₂O₆ + O₂
★ Challenge 1.6.4A monster redox: Pb(N₃)₂ + Cr(MnO₄)₂ → Cr₂O₃ + MnO₂ + Pb₃O₄ + NO

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

★ Challenge 1.4.2Irrigation canal network

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?

★ Challenge ConceptualHow many parameters? — counting free variables

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.

Looking ahead

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.

Lecture 4 — complete
MATH-120 · Shoaib Khan · LUMS · June 2026
← Lecture 3Lecture 5 →