---
title: Solution Sets and Applied Linear Systems
module: Linear Equations in Linear Algebra
moduleNumber: 1
lessonNumber: 3
order: 103
summary: >
  A homogeneous system Ax = 0 has a solution set that is a span through the
  origin; a consistent Ax = b has that same span translated by any one particular
  solution. Parametric vector form writes both explicitly. The structure shows up
  in applied systems with many solutions: equilibrium prices, balanced chemical
  reactions, network flows, weight-loss diets, and migration models.
topics: [Linear Equations in Linear Algebra]
sources:
  - book: Lay
    ref: "Ch. 1 — Linear Equations; §1.5 Solution Sets of Linear Systems"
  - book: Lay
    ref: "§1.6 Applications of Linear Systems; §1.10 Linear Models in Business, Science, and Engineering"
---

The [reduced echelon form](/linear-algebra/linear-systems/systems-and-echelon-forms)
delivers a general solution as a list of formulas. Written instead as a vector
equation — the **parametric vector form** — that solution exposes its geometry.
Solution sets are flat objects (lines, planes, and their higher-dimensional
analogues), passing through the origin when the system is homogeneous and shifted
off it when it is not. The same structure organizes applied systems that carry
many solutions.

## Homogeneous systems

A system is **homogeneous** if it has the form $A\mathbf{x} = \mathbf{0}$. Every
such system has the **trivial solution** $\mathbf{x} = \mathbf{0}$, so the only
question of interest is whether it has any others.

> **Theorem (Nontrivial solutions of $A\mathbf{x} = \mathbf{0}$).** The
> homogeneous equation $A\mathbf{x} = \mathbf{0}$ has a nontrivial solution if and
> only if the system has at least one free variable.

This is the [existence and uniqueness
theorem](/linear-algebra/linear-systems/systems-and-echelon-forms) applied to a
system that is automatically consistent: a solution always exists, so only
uniqueness is in question, and uniqueness fails exactly when a variable is free.

### Parametric vector form

> **Worked example.** Write the solution set of the homogeneous system
>
> $$
> \begin{aligned}
> 3x_1 + 5x_2 - 4x_3 &= 0 \\
> -3x_1 - 2x_2 + 4x_3 &= 0 \\
> 6x_1 + x_2 - 8x_3 &= 0
> \end{aligned}
> $$
>
> in parametric vector form. Clear column 1 of $[\,A\ \mathbf{0}\,]$, then reduce
> to reduced echelon form:
>
> $$
> \begin{bmatrix} 3 & 5 & -4 & 0 \\ -3 & -2 & 4 & 0 \\ 6 & 1 & -8 & 0 \end{bmatrix}
> \;\longrightarrow\;
> \begin{bmatrix} 3 & 5 & -4 & 0 \\ 0 & 3 & 0 & 0 \\ 0 & -9 & 0 & 0 \end{bmatrix}
> \;\longrightarrow\;
> \begin{bmatrix} 1 & 0 & -\tfrac43 & 0 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{bmatrix}.
> $$
>
> This leaves $x_1 = \tfrac43 x_3$, $x_2 = 0$, with $x_3$ free. Pulling the free
> variable out as a scalar,
>
> $$
> \mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix}
> = \begin{bmatrix} \tfrac43 x_3 \\ 0 \\ x_3 \end{bmatrix}
> = x_3 \begin{bmatrix} \tfrac43 \\ 0 \\ 1 \end{bmatrix}
> = x_3 \mathbf{v}.
> $$

Every solution is a scalar multiple of the single vector $\mathbf{v}$, so the
solution set is $\operatorname{Span}\{\mathbf{v}\}$ — a line through the origin. A
homogeneous system with two free variables produces two vectors and a plane
through the origin. The general statement:

> **Definition (Parametric vector form).** The solution set of $A\mathbf{x} =
> \mathbf{0}$ is written in **parametric vector form** as
> $$
> \mathbf{x} = t_1 \mathbf{v}_1 + t_2 \mathbf{v}_2 + \cdots + t_k \mathbf{v}_k,
> \qquad t_1, \dots, t_k \in \mathbb{R},
> $$
> one vector $\mathbf{v}_i$ per free variable. This exhibits the solution set as
> $\operatorname{Span}\{\mathbf{v}_1, \dots, \mathbf{v}_k\}$.

## Nonhomogeneous systems: particular plus homogeneous

When $A\mathbf{x} = \mathbf{b}$ has many solutions, its general solution splits
into a fixed part and a varying part.

> **Worked example.** Write the general solution of $A\mathbf{x} = \mathbf{b}$ in
> parametric vector form, where
>
> $$
> A = \begin{bmatrix} 3 & 5 & -4 \\ -3 & -2 & 4 \\ 6 & 1 & -8 \end{bmatrix},
> \qquad
> \mathbf{b} = \begin{bmatrix} 7 \\ -1 \\ -4 \end{bmatrix}.
> $$
>
> The coefficient matrix is the one from the homogeneous example. Reducing
> $[\,A\ \mathbf{b}\,]$,
>
> $$
> \begin{bmatrix} 3 & 5 & -4 & 7 \\ -3 & -2 & 4 & -1 \\ 6 & 1 & -8 & -4 \end{bmatrix}
> \;\longrightarrow\;
> \begin{bmatrix} 1 & 0 & -\tfrac43 & -1 \\ 0 & 1 & 0 & 2 \\ 0 & 0 & 0 & 0 \end{bmatrix},
> $$
>
> gives $x_1 = -1 + \tfrac43 x_3$, $x_2 = 2$, with $x_3$ free, so
>
> $$
> \mathbf{x}
> = \begin{bmatrix} -1 \\ 2 \\ 0 \end{bmatrix} + x_3 \begin{bmatrix} \tfrac43 \\ 0 \\ 1 \end{bmatrix}
> = \mathbf{p} + x_3 \mathbf{v}.
> $$

The vector $\mathbf{p}$ is one **particular solution** (set $x_3 = 0$), and
$x_3\mathbf{v}$ traces out the solution set of the homogeneous equation from
before. The solution set of $A\mathbf{x} = \mathbf{b}$ is the homogeneous line
$\operatorname{Span}\{\mathbf{v}\}$ translated by $\mathbf{p}$.

> **Theorem (Structure of solutions).** Suppose $A\mathbf{x} = \mathbf{b}$ is
> consistent and $\mathbf{p}$ is one solution. Then the solution set is the set of
> all vectors $\mathbf{p} + \mathbf{v}_h$, where $\mathbf{v}_h$ ranges over the
> solutions of $A\mathbf{x} = \mathbf{0}$.

The proof is one line each way. If $A\mathbf{p} = \mathbf{b}$ and $A\mathbf{v}_h =
\mathbf{0}$, then $A(\mathbf{p} + \mathbf{v}_h) = \mathbf{b} + \mathbf{0} =
\mathbf{b}$, so every such sum is a solution; and if $A\mathbf{w} = \mathbf{b}$,
then $\mathbf{v}_h = \mathbf{w} - \mathbf{p}$ satisfies $A\mathbf{v}_h =
\mathbf{b} - \mathbf{b} = \mathbf{0}$, so $\mathbf{w} = \mathbf{p} +
\mathbf{v}_h$.[^lay-15]

$$
% caption: The solution set of Ax = b (dashed) is the solution set of Ax = 0
% (through the origin) rigidly translated by a particular solution p.
\begin{tikzpicture}[scale=1.0, font=\footnotesize, >=stealth]
\definecolor{acc}{HTML}{4A6FA5}
\draw[black, ->] (-3.2,0) -- (3.4,0) node[right] {};
\draw[black, ->] (0,-1.4) -- (0,3.0) node[above] {};
% homogeneous line through origin
\draw[thick] (-2.6,-1.04) -- (2.9,1.16);
\node at (2.7,0.55) {$A\mathbf{x}=\mathbf{0}$};
\draw[->] (0,0) -- (1.25,0.5) node[below right] {$\mathbf{v}$};
% particular solution
\draw[black!70, ->, thick] (0,0) -- (0.6,1.9) node[left] {$\mathbf{p}$};
% translated line
\draw[acc, thick, dashed] (-2.0,0.86) -- (3.0,2.86);
\node[acc] at (2.6,2.55) {$A\mathbf{x}=\mathbf{b}$};
\fill[black!70] (0.6,1.9) circle (1.6pt);
\end{tikzpicture}
$$

The mental image for a consistent $A\mathbf{x} = \mathbf{b}$ with $\mathbf{b} \ne
\mathbf{0}$ is a point, line, or plane that does _not_ pass through the origin.
When the system is inconsistent, the solution set is empty and the theorem does
not apply.

```algorithm
caption: $\textsc{ParametricForm}(A, \mathbf{b})$ — solution set of a consistent system
row reduce $[\,A\ \mathbf{b}\,]$ to reduced echelon form
for each basic variable do
  express it in terms of the free variables appearing in its row
write a typical solution $\mathbf{x}$ as a vector in the free variables
split $\mathbf{x}$ into $\mathbf{p} + t_1\mathbf{v}_1 + \cdots + t_k\mathbf{v}_k$   // free vars as parameters
return $\mathbf{p}, \mathbf{v}_1, \dots, \mathbf{v}_k$
```

The homogeneous solution set is the shape and the particular solution is the
position.

| | Homogeneous $A\mathbf{x} = \mathbf{0}$ | Nonhomogeneous $A\mathbf{x} = \mathbf{b}$ |
| --- | --- | --- |
| Always consistent? | yes (trivial solution) | no — may be inconsistent |
| Passes through origin? | yes | no, unless $\mathbf{b} = \mathbf{0}$ |
| Parametric form | $t_1\mathbf{v}_1 + \cdots + t_k\mathbf{v}_k$ | $\mathbf{p} + t_1\mathbf{v}_1 + \cdots + t_k\mathbf{v}_k$ |
| Geometric object | span through $\mathbf{0}$ | that span translated by $\mathbf{p}$ |
| Number of parameters | one per free variable | one per free variable (same $\mathbf{v}_i$) |

## Applied systems with many solutions

Real models often produce free variables, and each carries meaning: a degree of
freedom that some side condition (integer coefficients, nonnegative prices, a
known total inflow) resolves to a definite value.

### Equilibrium prices (Leontief exchange model)

Divide an economy into sectors. Each sector's output is distributed among the
sectors as fractions summing to $1$. An **equilibrium** assigns a price to each
sector's total output so that every sector's income equals its expenditures. For
a Coal / Electric / Steel economy with the given exchange fractions, the balance
equations, moved to one side, form a homogeneous system

$$
\begin{aligned}
p_C - 0.4\,p_E - 0.6\,p_S &= 0 \\
-0.6\,p_C + 0.9\,p_E - 0.2\,p_S &= 0 \\
-0.4\,p_C - 0.5\,p_E + 0.8\,p_S &= 0.
\end{aligned}
$$

Row reduction gives $p_C = 0.94\,p_S$, $p_E = 0.85\,p_S$, with $p_S$ free. The
free variable is a choice of scale (the currency and overall magnitude); taking
$p_S = 100$ prices Coal at $94$, Electric at $85$, Steel at $100$. Every
homogeneous exchange model has this structure, and Leontief proved such a
nonnegative equilibrium always exists.[^lay-16]

### Balancing a chemical reaction

Atoms are conserved, so the coefficients of a reaction must equalize each
element's atom count on both sides. Represent each molecule by its vector of atom
counts.

> **Worked example.** Balance propane combustion,
>
> $$
> x_1\,\mathrm{C_3H_8} + x_2\,\mathrm{O_2} \longrightarrow x_3\,\mathrm{CO_2} + x_4\,\mathrm{H_2O}.
> $$
>
> The carbon, hydrogen, and oxygen counts give the homogeneous vector equation
>
> $$
> x_1 \begin{bmatrix} 3 \\ 8 \\ 0 \end{bmatrix}
> + x_2 \begin{bmatrix} 0 \\ 0 \\ 2 \end{bmatrix}
> - x_3 \begin{bmatrix} 1 \\ 0 \\ 2 \end{bmatrix}
> - x_4 \begin{bmatrix} 0 \\ 2 \\ 1 \end{bmatrix}
> = \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}.
> $$
>
> Row reduction gives $x_1 = \tfrac14 x_4$, $x_2 = \tfrac54 x_4$,
> $x_3 = \tfrac34 x_4$, with $x_4$ free. Coefficients must be whole numbers, so
> take the smallest $x_4$ that clears denominators, $x_4 = 4$:
>
> $$
> \mathrm{C_3H_8} + 5\,\mathrm{O_2} \longrightarrow 3\,\mathrm{CO_2} + 4\,\mathrm{H_2O}.
> $$

$$
% caption: Each molecule contributes a vector of atom counts; balancing means the
% weighted reactant vectors equal the weighted product vectors, element by element.
\begin{tikzpicture}[scale=1.0, font=\footnotesize, >=stealth,
  m/.style={draw, minimum width=17mm, minimum height=8mm, align=center}]
\definecolor{acc}{HTML}{4A6FA5}
\node[m] (a) at (0,0) {C$_3$H$_8$};
\node[m] (b) at (2.2,0) {O$_2$};
\node[m] (c) at (5.4,0) {CO$_2$};
\node[m] (d) at (7.6,0) {H$_2$O};
\node at (1.1,0.75) {$x_1$}; \node at (2.2,0.75) {$x_2$};
\node at (5.4,0.75) {$x_3$}; \node at (7.6,0.75) {$x_4$};
\draw[thick, ->] (3.15,0) -- (4.25,0);
\node[black, anchor=north, font=\scriptsize] at (1.1,-0.55) {reactants};
\node[black, anchor=north, font=\scriptsize] at (6.5,-0.55) {products};
\node[anchor=north] at (3.85,-1.1) {C: $3x_1 = x_3$\quad H: $8x_1 = 2x_4$\quad O: $2x_2 = 2x_3 + x_4$};
\end{tikzpicture}
$$

### Network flow

A **network** is junctions joined by directed branches. The conservation rule is
that flow into each junction equals flow out, and total flow into the network
equals total flow out. Each junction contributes one linear equation. For a grid
of one-way streets with measured inflows and outflows, labeling the unknown branch
flows $x_1, \dots, x_5$ and balancing at each intersection yields a system whose
general solution carries a free variable — the flow is underdetermined by the
boundary data alone.

$$
% caption: At each junction total inflow equals total outflow; the four
% junction equations leave one branch flow free, so the pattern is a family.
\begin{tikzpicture}[scale=1.0, font=\footnotesize, >=stealth]
\definecolor{acc}{HTML}{4A6FA5}
\node[circle, draw, minimum size=6mm] (A) at (0,0) {A};
\node[circle, draw, minimum size=6mm] (B) at (3,0) {B};
\node[circle, draw, minimum size=6mm] (C) at (3,-2.4) {C};
\node[circle, draw, minimum size=6mm] (D) at (0,-2.4) {D};
\draw[acc, thick, ->] (A) -- (B) node[midway, above] {$x_1$};
\draw[acc, thick, ->] (B) -- (C) node[midway, right] {$x_2$};
\draw[acc, thick, ->] (D) -- (C) node[midway, below] {$x_3$};
\draw[acc, thick, ->] (A) -- (D) node[midway, left] {$x_4$};
\draw[black, ->] (-1.3,0.6) -- (A) node[midway, above left] {$80$};
\draw[black, ->] (B) -- (4.3,0.6) node[midway, above right] {$60$};
\draw[black, ->] (-1.3,-3.0) -- (D) node[midway, below left] {$40$};
\draw[black, ->] (C) -- (4.3,-3.0) node[midway, below right] {$60$};
\end{tikzpicture}
$$

Because the streets are one-way, all $x_i \ge 0$, and that constraint plus the
free variable pins the flows to a range rather than a single value. Electrical
networks fit the same mold: Kirchhoff's voltage law makes the loop currents
satisfy a linear system $R\mathbf{i} = \mathbf{v}$, a matrix form of Ohm's
law.[^lay-110]

### A nutrition model

A weight-loss diet must supply exact amounts of several nutrients using a few
foodstuffs, each with its own nutrient profile. With one vector per foodstuff
listing grams of each nutrient per unit, and $\mathbf{b}$ the required daily
totals, the diet is the solution of

$$
x_1 \mathbf{a}_1 + x_2 \mathbf{a}_2 + x_3 \mathbf{a}_3 = \mathbf{b},
$$

where $x_i$ is the number of units of foodstuff $i$. For three ingredients and
three nutrients this is a square system; row reduction gives a unique nonnegative
solution when the profiles are independent. The nonnegativity requirement (a
negative amount of whey is meaningless) is a real constraint that drives the
choice of ingredients.

### Difference equations and migration

A **linear difference equation** models a system sampled at discrete times by a
sequence of state vectors $\mathbf{x}_0, \mathbf{x}_1, \mathbf{x}_2, \dots$ with

$$
\mathbf{x}_{k+1} = M\mathbf{x}_k, \qquad k = 0, 1, 2, \dots
$$

For city-versus-suburb populations where each year a fixed fraction migrates each
way, the **migration matrix** $M$ collects those fractions, and iterating $M$
propagates the population forward.

$$
% caption: A two-state migration model: fixed fractions move each way per step,
% and the migration matrix M advances the state vector one year at a time.
\begin{tikzpicture}[scale=1.0, font=\footnotesize, >=stealth]
\definecolor{acc}{HTML}{4A6FA5}
\node[circle, draw, minimum size=13mm] (city) at (0,0) {City};
\node[circle, draw, minimum size=13mm] (sub) at (4.2,0) {Suburbs};
\draw[acc, thick, ->] (city) to[bend left=22] node[midway, above] {0.05} (sub);
\draw[acc, thick, ->] (sub) to[bend left=22] node[midway, below] {0.03} (city);
\draw[black, ->] (city) to[out=140, in=200, looseness=6] node[left] {0.95} (city);
\draw[black, ->] (sub) to[out=-40, in=40, looseness=6] node[right] {0.97} (sub);
\node[anchor=north] at (2.1,-1.9) {one step: $\mathbf{x}_{k+1} = M\mathbf{x}_k$};
\end{tikzpicture}
$$

Starting from $(600{,}000,\ 400{,}000)$, one step gives $(582{,}000,\ 418{,}000)$,
another gives $(565{,}440,\ 434{,}560)$, and so on. The long-run behavior of such
iterations — whether the state settles to a steady distribution — is an
[eigenvalue](/linear-algebra/eigenvalues/eigenvectors-and-eigenvalues) question,
studied alongside [difference equations and Markov
chains](/linear-algebra/vector-spaces/difference-equations-and-markov).

[^lay-15]: **Lay**, _Linear Algebra and Its Applications_, §1.5 — Solution Sets of Linear Systems: homogeneous solutions in parametric vector form as a span, and the theorem that a consistent nonhomogeneous solution set is the homogeneous solution set translated by a particular solution.
[^lay-16]: **Lay**, §1.6 — Applications of Linear Systems: the Leontief exchange model for equilibrium prices, balancing chemical equations by a homogeneous vector equation, and conservation-law network flow.
[^lay-110]: **Lay**, §1.10 — Linear Models in Business, Science, and Engineering: the nutrition/diet vector equation, Kirchhoff's-law electrical networks as $R\mathbf{i} = \mathbf{v}$, and the migration difference equation $\mathbf{x}_{k+1} = M\mathbf{x}_k$.
