Theory: Solution Sets of Linear Systems & Applications
Homogeneous Linear Systems (A x = 0 A\mathbf{x} = \mathbf{0} A x = 0 )
A system of linear equations is said to be homogeneous if it can be written in the form:
A x = 0 A\mathbf{x} = \mathbf{0} A x = 0
A homogeneous system is always consistent , since x = 0 \mathbf{x} = \mathbf{0} x = 0 is always a solution (called the trivial solution ).
The system A x = 0 A\mathbf{x} = \mathbf{0} A x = 0 has a non-trivial solution (a non-zero vector x ≠ 0 \mathbf{x} \ne \mathbf{0} x = 0 ) if and only if the equation has at least one free variable (i.e. at least one non-pivot column).
When a system has free variables, the general solution can be written as an explicit linear combination of constant vectors with the free variables acting as parameters:
x = t 1 v 1 + t 2 v 2 + ⋯ + t k v k \mathbf{x} = t_1 \mathbf{v}_1 + t_2 \mathbf{v}_2 + \cdots + t_k \mathbf{v}_k x = t 1 v 1 + t 2 v 2 + ⋯ + t k v k
This is the parametric vector form of the solution set. The vectors v 1 , … , v k \mathbf{v}_1, \dots, \mathbf{v}_k v 1 , … , v k span the solution space of A x = 0 A\mathbf{x} = \mathbf{0} A x = 0 .
Non-homogeneous Systems (A x = b A\mathbf{x} = \mathbf{b} A x = b )
When A x = b A\mathbf{x} = \mathbf{b} A x = b is consistent and has a particular solution p \mathbf{p} p (meaning A p = b A\mathbf{p} = \mathbf{b} A p = b ):
[!NOTE]
Theorem 6 : The solution set of A x = b A\mathbf{x} = \mathbf{b} A x = b is the set of all vectors of the form:
x = p + v h \mathbf{x} = \mathbf{p} + \mathbf{v}_h x = p + v h
where v h \mathbf{v}_h v h is any solution of the homogeneous equation A v h = 0 A\mathbf{v}_h = \mathbf{0} A v h = 0 .
Geometrically, the solution set of A x = b A\mathbf{x} = \mathbf{b} A x = b is a line (or plane/hyperplane) parallel to the solution set of A x = 0 A\mathbf{x} = \mathbf{0} A x = 0 , translated away from the origin by the particular vector p \mathbf{p} p .
Applications: Network Flow & Chemical Reactions (Lay §1.6)
Network Flow : At each junction (node) in a network, the total flow into the junction must equal the total flow out of the junction:
∑ Flow In = ∑ Flow Out \sum \text{Flow In} = \sum \text{Flow Out} ∑ Flow In = ∑ Flow Out
Also, total flow into the whole network equals total flow out of the network.
Balancing Chemical Equations : The number of atoms of each element on the left side (reactants) must equal the number on the right side (products), leading to a homogeneous linear system A x = 0 A\mathbf{x} = \mathbf{0} A x = 0 solved for positive integer weights.
Solved Examples (Textbook Questions)
Exercise 1
(Adapted from Lay §1.5, Exercise 11)
Find the general solution of the homogeneous system A x = 0 A\mathbf{x} = \mathbf{0} A x = 0 and express it in parametric vector form, where:
A = [ 1 3 − 3 7 0 1 − 4 5 ] A = \begin{bmatrix}
1 & 3 & -3 & 7 \\
0 & 1 & -4 & 5
\end{bmatrix} A = [ 1 0 3 1 − 3 − 4 7 5 ] Describe the solution set geometrically.
Show solution ↓ Hide solution ↑ Solution
The augmented matrix is [ A ∣ 0 ] [A \mid \mathbf{0}] [ A ∣ 0 ] :
[ 1 3 − 3 7 0 0 1 − 4 5 0 ] \left[\begin{array}{cccc|c}
1 & 3 & -3 & 7 & 0 \\
0 & 1 & -4 & 5 & 0
\end{array}\right] [ 1 0 3 1 − 3 − 4 7 5 0 0 ] Step 1: Reduce to RREF.
Eliminate the entry above the pivot in column 2 (R 1 ← R 1 − 3 R 2 R_1 \leftarrow R_1 - 3R_2 R 1 ← R 1 − 3 R 2 ):
[ 1 , 3 , − 3 , 7 , 0 ] − 3 [ 0 , 1 , − 4 , 5 , 0 ] = [ 1 , 0 , 9 , − 8 , 0 ] [1, 3, -3, 7, 0] - 3[0, 1, -4, 5, 0] = [1, 0, 9, -8, 0] [ 1 , 3 , − 3 , 7 , 0 ] − 3 [ 0 , 1 , − 4 , 5 , 0 ] = [ 1 , 0 , 9 , − 8 , 0 ] The RREF is:
[ 1 0 9 − 8 0 0 1 − 4 5 0 ] \left[\begin{array}{cccc|c}
1 & 0 & 9 & -8 & 0 \\
0 & 1 & -4 & 5 & 0
\end{array}\right] [ 1 0 0 1 9 − 4 − 8 5 0 0 ] Step 2: Solve for basic variables.
Basic variables: x 1 , x 2 x_1, x_2 x 1 , x 2 .
Free variables: x 3 , x 4 x_3, x_4 x 3 , x 4 .
x 1 = − 9 x 3 + 8 x 4 x 2 = 4 x 3 − 5 x 4 \begin{aligned}
x_1 &= -9x_3 + 8x_4 \\
x_2 &= 4x_3 - 5x_4
\end{aligned} x 1 x 2 = − 9 x 3 + 8 x 4 = 4 x 3 − 5 x 4 Step 3: Write in parametric vector form.
x = [ x 1 x 2 x 3 x 4 ] = [ − 9 x 3 + 8 x 4 4 x 3 − 5 x 4 x 3 x 4 ] = x 3 [ − 9 4 1 0 ] + x 4 [ 8 − 5 0 1 ] \mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \\ x_4 \end{bmatrix} = \begin{bmatrix} -9x_3 + 8x_4 \\ 4x_3 - 5x_4 \\ x_3 \\ x_4 \end{bmatrix} = x_3 \begin{bmatrix} -9 \\ 4 \\ 1 \\ 0 \end{bmatrix} + x_4 \begin{bmatrix} 8 \\ -5 \\ 0 \\ 1 \end{bmatrix} x = x 1 x 2 x 3 x 4 = − 9 x 3 + 8 x 4 4 x 3 − 5 x 4 x 3 x 4 = x 3 − 9 4 1 0 + x 4 8 − 5 0 1 Geometric description:
The solution set is a 2-dimensional plane passing through the origin 0 \mathbf{0} 0 in R 4 \mathbb{R}^4 R 4 , spanned by the vectors u = [ − 9 4 1 0 ] \mathbf{u} = \begin{bmatrix} -9 \\ 4 \\ 1 \\ 0 \end{bmatrix} u = − 9 4 1 0 and v = [ 8 − 5 0 1 ] \mathbf{v} = \begin{bmatrix} 8 \\ -5 \\ 0 \\ 1 \end{bmatrix} v = 8 − 5 0 1 .
Exercise 2
(Adapted from Lay §1.5, Exercise 15 & 16)
Write the general solution of A x = b A\mathbf{x} = \mathbf{b} A x = b in parametric vector form, where:
A = [ 1 3 1 − 4 − 9 2 0 3 − 6 ] , b = [ 1 − 1 − 3 ] A = \begin{bmatrix}
1 & 3 & 1 \\
-4 & -9 & 2 \\
0 & 3 & -6
\end{bmatrix}, \quad \mathbf{b} = \begin{bmatrix} 1 \\ -1 \\ -3 \end{bmatrix} A = 1 − 4 0 3 − 9 3 1 2 − 6 , b = 1 − 1 − 3 Compare the solution with the solution set of A x = 0 A\mathbf{x} = \mathbf{0} A x = 0 .
Show solution ↓ Hide solution ↑ Solution
Step 1: Set up the augmented matrix [ A ∣ b ] [A \mid \mathbf{b}] [ A ∣ b ] and row reduce.
[ 1 3 1 1 − 4 − 9 2 − 1 0 3 − 6 − 3 ] \left[\begin{array}{ccc|c}
1 & 3 & 1 & 1 \\
-4 & -9 & 2 & -1 \\
0 & 3 & -6 & -3
\end{array}\right] 1 − 4 0 3 − 9 3 1 2 − 6 1 − 1 − 3
R 2 ← R 2 + 4 R 1 R_2 \leftarrow R_2 + 4R_1 R 2 ← R 2 + 4 R 1 :
[ − 4 , − 9 , 2 , − 1 ] + 4 [ 1 , 3 , 1 , 1 ] = [ 0 , 3 , 6 , 3 ] [-4, -9, 2, -1] + 4[1, 3, 1, 1] = [0, 3, 6, 3] [ − 4 , − 9 , 2 , − 1 ] + 4 [ 1 , 3 , 1 , 1 ] = [ 0 , 3 , 6 , 3 ]
Scale R 2 ← 1 3 R 2 R_2 \leftarrow \frac{1}{3}R_2 R 2 ← 3 1 R 2 :
[ 0 , 1 , 2 , 1 ] [0, 1, 2, 1] [ 0 , 1 , 2 , 1 ]
Scale R 3 ← 1 3 R 3 R_3 \leftarrow \frac{1}{3}R_3 R 3 ← 3 1 R 3 :
[ 0 , 1 , − 2 , − 1 ] [0, 1, -2, -1] [ 0 , 1 , − 2 , − 1 ]
Matrix:
[ 1 3 1 1 0 1 2 1 0 1 − 2 − 1 ] \left[\begin{array}{ccc|c}
1 & 3 & 1 & 1 \\
0 & 1 & 2 & 1 \\
0 & 1 & -2 & -1
\end{array}\right] 1 0 0 3 1 1 1 2 − 2 1 1 − 1
R 3 ← R 3 − R 2 R_3 \leftarrow R_3 - R_2 R 3 ← R 3 − R 2 :
[ 0 , 1 , − 2 , − 1 ] − [ 0 , 1 , 2 , 1 ] = [ 0 , 0 , − 4 , − 2 ] [0, 1, -2, -1] - [0, 1, 2, 1] = [0, 0, -4, -2] [ 0 , 1 , − 2 , − 1 ] − [ 0 , 1 , 2 , 1 ] = [ 0 , 0 , − 4 , − 2 ]
Scale R 3 ← − 1 4 R 3 R_3 \leftarrow -\frac{1}{4}R_3 R 3 ← − 4 1 R 3 :
[ 0 , 0 , 1 , 1 / 2 ] [0, 0, 1, 1/2] [ 0 , 0 , 1 , 1/2 ]
Backward phase to RREF:
R 2 ← R 2 − 2 R 3 R_2 \leftarrow R_2 - 2R_3 R 2 ← R 2 − 2 R 3 :
[ 0 , 1 , 2 , 1 ] − 2 [ 0 , 0 , 1 , 1 / 2 ] = [ 0 , 1 , 0 , 0 ] [0, 1, 2, 1] - 2[0, 0, 1, 1/2] = [0, 1, 0, 0] [ 0 , 1 , 2 , 1 ] − 2 [ 0 , 0 , 1 , 1/2 ] = [ 0 , 1 , 0 , 0 ]
R 1 ← R 1 − R 3 R_1 \leftarrow R_1 - R_3 R 1 ← R 1 − R 3 :
[ 1 , 3 , 1 , 1 ] − [ 0 , 0 , 1 , 1 / 2 ] = [ 1 , 3 , 0 , 1 / 2 ] [1, 3, 1, 1] - [0, 0, 1, 1/2] = [1, 3, 0, 1/2] [ 1 , 3 , 1 , 1 ] − [ 0 , 0 , 1 , 1/2 ] = [ 1 , 3 , 0 , 1/2 ]
R 1 ← R 1 − 3 R 2 R_1 \leftarrow R_1 - 3R_2 R 1 ← R 1 − 3 R 2 :
[ 1 , 3 , 0 , 1 / 2 ] − 3 [ 0 , 1 , 0 , 0 ] = [ 1 , 0 , 0 , 1 / 2 ] [1, 3, 0, 1/2] - 3[0, 1, 0, 0] = [1, 0, 0, 1/2] [ 1 , 3 , 0 , 1/2 ] − 3 [ 0 , 1 , 0 , 0 ] = [ 1 , 0 , 0 , 1/2 ]
The RREF is:
[ 1 0 0 1 / 2 0 1 0 0 0 0 1 1 / 2 ] \left[\begin{array}{ccc|c}
1 & 0 & 0 & 1/2 \\
0 & 1 & 0 & 0 \\
0 & 0 & 1 & 1/2
\end{array}\right] 1 0 0 0 1 0 0 0 1 1/2 0 1/2 Step 2: Conclusion.
Every column has a pivot. There are no free variables .
The system has a unique solution:
x = [ x 1 x 2 x 3 ] = [ 1 / 2 0 1 / 2 ] \mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} 1/2 \\ 0 \\ 1/2 \end{bmatrix} x = x 1 x 2 x 3 = 1/2 0 1/2 In parametric vector form: x = p + 0 \mathbf{x} = \mathbf{p} + 0 x = p + 0 , where p = [ 1 / 2 0 1 / 2 ] \mathbf{p} = \begin{bmatrix} 1/2 \\ 0 \\ 1/2 \end{bmatrix} p = 1/2 0 1/2 is the single point.
The corresponding homogeneous system A x = 0 A\mathbf{x} = \mathbf{0} A x = 0 has only the trivial solution x = 0 \mathbf{x} = \mathbf{0} x = 0 .
Exercise 3
(Adapted from Lay §1.6, Exercise 1 - Network Flow)
The network shown below represents traffic flow (in vehicles per hour) through four intersections A , B , C , D A, B, C, D A , B , C , D :
Intersection A : Inflow 300 + x 1 300 + x_1 300 + x 1 ; Outflow x 2 + 200 x_2 + 200 x 2 + 200 .
Intersection B : Inflow x 2 + 100 x_2 + 100 x 2 + 100 ; Outflow x 3 + x 4 x_3 + x_4 x 3 + x 4 .
Intersection C : Inflow x 3 + 400 x_3 + 400 x 3 + 400 ; Outflow x 5 + 300 x_5 + 300 x 5 + 300 .
Intersection D : Inflow x 4 + x 5 x_4 + x_5 x 4 + x 5 ; Outflow x 1 + 300 x_1 + 300 x 1 + 300 .
Total inflow to the network is 300 + 100 + 400 = 800 300 + 100 + 400 = 800 300 + 100 + 400 = 800 , and total outflow is 200 + 300 + 300 = 800 200 + 300 + 300 = 800 200 + 300 + 300 = 800 .
Write a system of linear equations in the variables x 1 , x 2 , x 3 , x 4 , x 5 x_1, x_2, x_3, x_4, x_5 x 1 , x 2 , x 3 , x 4 , x 5 .
Find the general flow pattern by row reducing the augmented matrix.
If the road with flow x 4 x_4 x 4 is closed for repairs (x 4 = 0 x_4 = 0 x 4 = 0 ), what are the remaining flows assuming all flows must be non-negative (x i ≥ 0 x_i \ge 0 x i ≥ 0 )?
Show solution ↓ Hide solution ↑ Solution
Step 1: Set up junction equations (Flow In = Flow Out \text{Flow In} = \text{Flow Out} Flow In = Flow Out ).
Node A : 300 + x 1 = x 2 + 200 ⟹ x 1 − x 2 = − 100 300 + x_1 = x_2 + 200 \implies x_1 - x_2 = -100 300 + x 1 = x 2 + 200 ⟹ x 1 − x 2 = − 100
Node B : x 2 + 100 = x 3 + x 4 ⟹ x 2 − x 3 − x 4 = − 100 x_2 + 100 = x_3 + x_4 \implies x_2 - x_3 - x_4 = -100 x 2 + 100 = x 3 + x 4 ⟹ x 2 − x 3 − x 4 = − 100
Node C : x 3 + 400 = x 5 + 300 ⟹ x 3 − x 5 = − 100 x_3 + 400 = x_5 + 300 \implies x_3 - x_5 = -100 x 3 + 400 = x 5 + 300 ⟹ x 3 − x 5 = − 100
Node D : x 4 + x 5 = x 1 + 300 ⟹ − x 1 + x 4 + x 5 = 300 x_4 + x_5 = x_1 + 300 \implies -x_1 + x_4 + x_5 = 300 x 4 + x 5 = x 1 + 300 ⟹ − x 1 + x 4 + x 5 = 300
Step 2: Augmented matrix and row reduction.
[ 1 − 1 0 0 0 − 100 0 1 − 1 − 1 0 − 100 0 0 1 0 − 1 − 100 − 1 0 0 1 1 300 ] \left[\begin{array}{ccccc|c}
1 & -1 & 0 & 0 & 0 & -100 \\
0 & 1 & -1 & -1 & 0 & -100 \\
0 & 0 & 1 & 0 & -1 & -100 \\
-1 & 0 & 0 & 1 & 1 & 300
\end{array}\right] 1 0 0 − 1 − 1 1 0 0 0 − 1 1 0 0 − 1 0 1 0 0 − 1 1 − 100 − 100 − 100 300 Add row 1 to row 4 (R 4 ← R 4 + R 1 R_4 \leftarrow R_4 + R_1 R 4 ← R 4 + R 1 ):
[ − 1 , 0 , 0 , 1 , 1 , 300 ] + [ 1 , − 1 , 0 , 0 , 0 , − 100 ] = [ 0 , − 1 , 0 , 1 , 1 , 200 ] [-1, 0, 0, 1, 1, 300] + [1, -1, 0, 0, 0, -100] = [0, -1, 0, 1, 1, 200] [ − 1 , 0 , 0 , 1 , 1 , 300 ] + [ 1 , − 1 , 0 , 0 , 0 , − 100 ] = [ 0 , − 1 , 0 , 1 , 1 , 200 ] Add row 2 to row 4 (R 4 ← R 4 + R 2 R_4 \leftarrow R_4 + R_2 R 4 ← R 4 + R 2 ):
[ 0 , − 1 , 0 , 1 , 1 , 200 ] + [ 0 , 1 , − 1 , − 1 , 0 , − 100 ] = [ 0 , 0 , − 1 , 0 , 1 , 100 ] [0, -1, 0, 1, 1, 200] + [0, 1, -1, -1, 0, -100] = [0, 0, -1, 0, 1, 100] [ 0 , − 1 , 0 , 1 , 1 , 200 ] + [ 0 , 1 , − 1 , − 1 , 0 , − 100 ] = [ 0 , 0 , − 1 , 0 , 1 , 100 ] Add row 3 to row 4 (R 4 ← R 4 + R 3 R_4 \leftarrow R_4 + R_3 R 4 ← R 4 + R 3 ):
[ 0 , 0 , − 1 , 0 , 1 , 100 ] + [ 0 , 0 , 1 , 0 , − 1 , − 100 ] = [ 0 , 0 , 0 , 0 , 0 , 0 ] [0, 0, -1, 0, 1, 100] + [0, 0, 1, 0, -1, -100] = [0, 0, 0, 0, 0, 0] [ 0 , 0 , − 1 , 0 , 1 , 100 ] + [ 0 , 0 , 1 , 0 , − 1 , − 100 ] = [ 0 , 0 , 0 , 0 , 0 , 0 ] Back-substitute to find basic variables (x 1 , x 2 , x 3 x_1, x_2, x_3 x 1 , x 2 , x 3 ) in terms of free variables (x 4 , x 5 x_4, x_5 x 4 , x 5 ):
From Row 3: x 3 = x 5 − 100 x_3 = x_5 - 100 x 3 = x 5 − 100
From Row 2: x 2 = x 3 + x 4 − 100 = ( x 5 − 100 ) + x 4 − 100 = x 4 + x 5 − 200 x_2 = x_3 + x_4 - 100 = (x_5 - 100) + x_4 - 100 = x_4 + x_5 - 200 x 2 = x 3 + x 4 − 100 = ( x 5 − 100 ) + x 4 − 100 = x 4 + x 5 − 200
From Row 1: x 1 = x 2 − 100 = ( x 4 + x 5 − 200 ) − 100 = x 4 + x 5 − 300 x_1 = x_2 - 100 = (x_4 + x_5 - 200) - 100 = x_4 + x_5 - 300 x 1 = x 2 − 100 = ( x 4 + x 5 − 200 ) − 100 = x 4 + x 5 − 300
General flow pattern:
{ x 1 = x 4 + x 5 − 300 x 2 = x 4 + x 5 − 200 x 3 = x 5 − 100 x 4 , x 5 are free \begin{cases}
x_1 = x_4 + x_5 - 300 \\
x_2 = x_4 + x_5 - 200 \\
x_3 = x_5 - 100 \\
x_4, x_5 \text{ are free}
\end{cases} ⎩ ⎨ ⎧ x 1 = x 4 + x 5 − 300 x 2 = x 4 + x 5 − 200 x 3 = x 5 − 100 x 4 , x 5 are free Step 3: Road x 4 x_4 x 4 is closed (x 4 = 0 x_4 = 0 x 4 = 0 ).
Setting x 4 = 0 x_4 = 0 x 4 = 0 :
x 1 = x 5 − 300 , x 2 = x 5 − 200 , x 3 = x 5 − 100 , x 4 = 0 x_1 = x_5 - 300, \quad x_2 = x_5 - 200, \quad x_3 = x_5 - 100, \quad x_4 = 0 x 1 = x 5 − 300 , x 2 = x 5 − 200 , x 3 = x 5 − 100 , x 4 = 0 Since all flows must be non-negative (x i ≥ 0 x_i \ge 0 x i ≥ 0 ):
x 1 ≥ 0 ⟹ x 5 ≥ 300 x_1 \ge 0 \implies x_5 \ge 300 x 1 ≥ 0 ⟹ x 5 ≥ 300
x 2 ≥ 0 ⟹ x 5 ≥ 200 x_2 \ge 0 \implies x_5 \ge 200 x 2 ≥ 0 ⟹ x 5 ≥ 200
x 3 ≥ 0 ⟹ x 5 ≥ 100 x_3 \ge 0 \implies x_5 \ge 100 x 3 ≥ 0 ⟹ x 5 ≥ 100
The minimum flow required on road x 5 x_5 x 5 is x 5 = 300 x_5 = 300 x 5 = 300 .
Under this minimum flow:
x 1 = 0 , x 2 = 100 , x 3 = 200 , x 4 = 0 , x 5 = 300. x_1 = 0, \quad x_2 = 100, \quad x_3 = 200, \quad x_4 = 0, \quad x_5 = 300. x 1 = 0 , x 2 = 100 , x 3 = 200 , x 4 = 0 , x 5 = 300.