About

1.6 Applications of Linear Systems

Theory: Applications of Linear Systems

Applications of Linear Systems (Lay §1.6)

All three standard applications turn a word problem into a linear system, then solve it with the recipe above. Typically the answer has a free variable, and you then pick a convenient value (or use a “nonnegative” condition).

Economic equilibrium (Leontief exchange model)

An economy is split into sectors; each sector’s output is shared among the sectors (an exchange table, whose columns sum to 1). We look for equilibrium prices where each sector’s income equals its expenditure.

Mini-example (Lay §1.6, Exercise 1 setup): Goods sells 80% of its output to Services and keeps 20%; Services sells 70% to Goods and keeps 30%. With prices pG,pSp_G, p_S, Goods’ expenditure is what it buys: 0.2pG+0.7pS0.2p_G + 0.7p_S. Setting this equal to its income pGp_G:

pG=0.2pG+0.7pS  ⟹  0.8pG−0.7pS=0  ⟹  pG=0.875 pSp_G = 0.2p_G + 0.7p_S \;\Longrightarrow\; 0.8p_G - 0.7p_S = 0 \;\Longrightarrow\; p_G = 0.875\,p_S

(The Services equation pS=0.8pG+0.3pSp_S = 0.8p_G + 0.3p_S gives the same relation.) This is a homogeneous system with a free variable: e.g. pS=80p_S = 80, pG=70p_G = 70. Only the ratio of prices is determined.

Balancing chemical equations

Write one vector per compound listing the number of atoms of each element. The equation x1(reactant1)+⋯=xk(product1)+⋯x_1(\text{reactant}_1) + \cdots = x_k(\text{product}_1) + \cdots becomes a homogeneous system (move everything to the left side, flipping the signs of the product vectors). Solve, then choose the free variable to make all coefficients the smallest positive integers.

Network flow

A network consists of nodes (junctions) joined by branches carrying flows. The basic rule is conservation of flow:

at each node:flow in=flow out\text{at each node:}\quad \text{flow in} = \text{flow out}

and also total flow into the network = total flow out of the network. Each node gives one linear equation. The general solution usually has free variables; a flow against the drawn arrow would be negative, so if the streets are one-way, the conditions xi≥0x_i \ge 0 bound the free variables.

For network problems, the best way to present the answer is the ”xi=…x_i = \ldots, xkx_k is free” list (Lay §1.2 style), not the parametric vector form — it makes the nonnegativity constraints easy to read.


Solved Examples (Textbook Questions)

Exercise 1

(Adapted from Lay §1.6, Exercise 5)

Boron sulfide reacts with water to form boric acid and hydrogen sulfide gas. Balance the equation

B2S3+H2O→H3BO3+H2S\text{B}_2\text{S}_3 + \text{H}_2\text{O} \rightarrow \text{H}_3\text{BO}_3 + \text{H}_2\text{S}

using the vector equation approach. [For each compound, construct a vector listing the numbers of atoms of boron, sulfur, hydrogen, and oxygen.]

Show solution ↓
Solution

Atom vectors (order: B, S, H, O):

B2S3:[2300],H2O:[0021],H3BO3:[1033],H2S:[0120]\text{B}_2\text{S}_3: \begin{bmatrix} 2 \\ 3 \\ 0 \\ 0 \end{bmatrix}, \quad \text{H}_2\text{O}: \begin{bmatrix} 0 \\ 0 \\ 2 \\ 1 \end{bmatrix}, \quad \text{H}_3\text{BO}_3: \begin{bmatrix} 1 \\ 0 \\ 3 \\ 3 \end{bmatrix}, \quad \text{H}_2\text{S}: \begin{bmatrix} 0 \\ 1 \\ 2 \\ 0 \end{bmatrix}

We need x1 B2S3+x2 H2O=x3 H3BO3+x4 H2Sx_1\,\text{B}_2\text{S}_3 + x_2\,\text{H}_2\text{O} = x_3\,\text{H}_3\text{BO}_3 + x_4\,\text{H}_2\text{S}. Move the product vectors to the left (flip their signs) to get a homogeneous system:

[20−100300−1002−3−2001−300]\left[\begin{array}{cccc|c} 2 & 0 & -1 & 0 & 0 \\ 3 & 0 & 0 & -1 & 0 \\ 0 & 2 & -3 & -2 & 0 \\ 0 & 1 & -3 & 0 & 0 \end{array}\right]

Row reduce. R2←R2−32R1R_2 \leftarrow R_2 - \tfrac32 R_1 gives [0  0  32  −1∣0][0 \ \ 0 \ \ \tfrac32 \ \ -1 \mid 0]. Swap R2↔R4R_2 \leftrightarrow R_4, then R3←R3−2R2R_3 \leftarrow R_3 - 2R_2, then R4←R4−12R3R_4 \leftarrow R_4 - \tfrac12 R_3:

∼[20−10001−300003−200032−10]∼[20−10001−300003−2000000]\sim \left[\begin{array}{cccc|c} 2 & 0 & -1 & 0 & 0 \\ 0 & 1 & -3 & 0 & 0 \\ 0 & 0 & 3 & -2 & 0 \\ 0 & 0 & \frac32 & -1 & 0 \end{array}\right] \sim \left[\begin{array}{cccc|c} 2 & 0 & -1 & 0 & 0 \\ 0 & 1 & -3 & 0 & 0 \\ 0 & 0 & 3 & -2 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{array}\right]

x4x_4 is free. Continue to RREF: R3←13R3R_3 \leftarrow \tfrac13 R_3; R2←R2+3R3R_2 \leftarrow R_2 + 3R_3; R1←R1+R3R_1 \leftarrow R_1 + R_3, R1←12R1R_1 \leftarrow \tfrac12 R_1:

∼[100−130010−20001−23000000]\sim \left[\begin{array}{cccc|c} 1 & 0 & 0 & -\frac13 & 0 \\ 0 & 1 & 0 & -2 & 0 \\ 0 & 0 & 1 & -\frac23 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{array}\right]

General solution: x1=13x4x_1 = \tfrac13 x_4, x2=2x4x_2 = 2x_4, x3=23x4x_3 = \tfrac23 x_4, x4x_4 free. Choose x4=3x_4 = 3 (clears the fractions): x1=1x_1 = 1, x2=6x_2 = 6, x3=2x_3 = 2, x4=3x_4 = 3.

B2S3+6 H2O→2 H3BO3+3 H2S\boxed{\text{B}_2\text{S}_3 + 6\,\text{H}_2\text{O} \rightarrow 2\,\text{H}_3\text{BO}_3 + 3\,\text{H}_2\text{S}}

Check: B: 2=22 = 2; S: 3=33 = 3; H: 12=6+612 = 6 + 6; O: 6=66 = 6 ✓.

Exercise 2

(Adapted from Lay §1.6, Exercise 14)

Intersections in England are often built as one-way “roundabouts”. Traffic must travel in the directions shown. Around the circle, the branches are A→x2B→x3C→x4D→x5E→x6F→x1AA \xrightarrow{x_2} B \xrightarrow{x_3} C \xrightarrow{x_4} D \xrightarrow{x_5} E \xrightarrow{x_6} F \xrightarrow{x_1} A. The external roads are:

IntersectionExternal flow
A100 out
B50 in
C120 out
D150 in
E80 out
F100 in

Find the general solution of the network flow. Find the smallest possible value for x6x_6.

Show solution ↓
Solution

Check totals first: in =50+150+100=300= 50 + 150 + 100 = 300, out =100+120+80=300= 100 + 120 + 80 = 300 ✓.

Flow in = flow out at each intersection:

IntersectionFlow inFlow outEquation
Ax1x_1=x2+100x_2 + 100x1−x2=100x_1 - x_2 = 100
Bx2+50x_2 + 50=x3x_3x2−x3=−50x_2 - x_3 = -50
Cx3x_3=x4+120x_4 + 120x3−x4=120x_3 - x_4 = 120
Dx4+150x_4 + 150=x5x_5x4−x5=−150x_4 - x_5 = -150
Ex5x_5=x6+80x_6 + 80x5−x6=80x_5 - x_6 = 80
Fx6+100x_6 + 100=x1x_1−x1+x6=−100-x_1 + x_6 = -100

Row reduce. Adding rows 1–5 to row 6 makes it [0 0 0 0 0 0∣0][0 \ 0 \ 0 \ 0 \ 0 \ 0 \mid 0] (the sum of all node equations is the “total flow” identity). Then back-substitute upward (R4←R4+R5R_4 \leftarrow R_4 + R_5, R3←R3+R4R_3 \leftarrow R_3 + R_4, …):

[1−1000010001−1000−50001−1001200001−10−15000001−180−100001−100]∼[10000−110001000−1000100−15000010−1−7000001−1800000000]\left[\begin{array}{cccccc|c} 1 & -1 & 0 & 0 & 0 & 0 & 100 \\ 0 & 1 & -1 & 0 & 0 & 0 & -50 \\ 0 & 0 & 1 & -1 & 0 & 0 & 120 \\ 0 & 0 & 0 & 1 & -1 & 0 & -150 \\ 0 & 0 & 0 & 0 & 1 & -1 & 80 \\ -1 & 0 & 0 & 0 & 0 & 1 & -100 \end{array}\right] \sim \left[\begin{array}{cccccc|c} 1 & 0 & 0 & 0 & 0 & -1 & 100 \\ 0 & 1 & 0 & 0 & 0 & -1 & 0 \\ 0 & 0 & 1 & 0 & 0 & -1 & 50 \\ 0 & 0 & 0 & 1 & 0 & -1 & -70 \\ 0 & 0 & 0 & 0 & 1 & -1 & 80 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 \end{array}\right]

General flow pattern:

{x1=100+x6x2=x6x3=50+x6x4=−70+x6x5=80+x6x6 is free\begin{cases} x_1 = 100 + x_6 \\ x_2 = x_6 \\ x_3 = 50 + x_6 \\ x_4 = -70 + x_6 \\ x_5 = 80 + x_6 \\ x_6 \text{ is free} \end{cases}

Smallest x6x_6: traffic must follow the arrows, so every xi≥0x_i \ge 0. The binding constraint is x4=x6−70≥0x_4 = x_6 - 70 \ge 0, so x6≥70x_6 \ge 70. The minimum value of x6x_6 is 70 (then x4=0x_4 = 0, x1=170x_1 = 170, x2=70x_2 = 70, x3=120x_3 = 120, x5=150x_5 = 150).