Linear Algebra › Section A · Linear equations in linear algebra › Topic A.6

Applications of linear systems

Prices that balance an economy, coefficients that balance a chemical reaction and traffic that balances at every junction all come from the same mathematics. Each is a linear system, and the free variables in its solution carry real meaning.

Balance is linear

Many real problems rest on a balance: what comes in equals what goes out. Money spent by a sector equals money it earns; atoms on the left of a reaction equal atoms on the right; cars entering a junction equal cars leaving it. Each balance condition is a linear equation, and a collection of them is a linear system. This topic works through three classic models. In each one the system turns out to have free variables, and the parametric descriptions from Solution sets of linear systems say exactly how much freedom the real situation allows.

A modelling routine

1. Name the unknowns and say what each one measures, with units. 2. Write one equation for each balance condition. 3. Move every unknown to the left side and solve by row reduction. 4. Write the general solution in terms of the free variables. 5. Interpret: apply real-world limits, such as prices being positive, coefficients being whole numbers, or flows on one-way streets being non-negative. Step 5 matters because the algebra allows every real value of a free variable, while the situation usually allows only some. A linear model also assumes proportions stay fixed, which is a simplification of any real economy or road network.

An exchange economy

Wassily Leontief, who won the 1973 Nobel Prize in Economics, modelled an economy as sectors that trade their output with one another. In the simplest, closed version, all output is used within the economy. Suppose three sectors, agriculture (A), manufacturing (M) and services (S), divide their output as follows. Agriculture: 20% to A, 40% to M, 40% to S. Manufacturing: 10% to A, 20% to M, 70% to S. Services: 40% to A, 40% to M, 20% to S. Let \(p_A\), \(p_M\) and \(p_S\) be the total values, or prices, of each sector's annual output. Equilibrium prices make each sector's income equal its expenditure. Agriculture spends \(0.2p_A + 0.1p_M + 0.4p_S\), so one equation is \(p_A = 0.2p_A + 0.1p_M + 0.4p_S\).

Worked example: equilibrium prices

1. Write all three balances, multiply by 10 and move terms left: \(8p_A - p_M - 4p_S = 0\), \(-4p_A + 8p_M - 4p_S = 0\) and \(-4p_A - 7p_M + 8p_S = 0\). 2. The three rows add to zero, because each sector's shares add to 100%, so one equation is redundant. 3. Subtracting row 3 from row 2 gives \(15p_M - 12p_S = 0\), so \(p_M = 0.8p_S\). 4. Row 2 then gives \(4p_A = 6.4p_S - 4p_S\), so \(p_A = 0.6p_S\). 5. With \(p_S\) free, the prices are in the ratio \(3 : 4 : 5\). If services output is worth $50 million, agriculture is worth $30 million and manufacturing $40 million. 6. Check agriculture: \(0.2(30) + 0.1(40) + 0.4(50) = 30\).

Balancing chemical equations

A chemical equation must have the same number of atoms of each element on both sides. For the combustion of ethane,

x_1\,\mathrm{C_2H_6} + x_2\,\mathrm{O_2} \to x_3\,\mathrm{CO_2} + x_4\,\mathrm{H_2O}

record each molecule as a vector counting its carbon, hydrogen and oxygen atoms: \(\mathrm{C_2H_6}\) is \((2, 6, 0)\), \(\mathrm{O_2}\) is \((0, 0, 2)\), \(\mathrm{CO_2}\) is \((1, 0, 2)\) and \(\mathrm{H_2O}\) is \((0, 2, 1)\). Balance means

x_1\begin{bmatrix} 2 \\ 6 \\ 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} = \mathbf{0}

a homogeneous system of three equations in four unknowns, so it is sure to have a non-trivial solution.

Worked example: balancing ethane

1. Carbon: \(2x_1 = x_3\). Hydrogen: \(6x_1 = 2x_4\). Oxygen: \(2x_2 = 2x_3 + x_4\). 2. Row reducing the coefficient matrix leaves \(x_4\) free, with \(x_1 = \frac{1}{3}x_4\), \(x_3 = \frac{2}{3}x_4\) and \(x_2 = \frac{7}{6}x_4\). 3. Chemists want the smallest whole numbers, so choose \(x_4 = 6\), the least common multiple of the denominators. 4. Then \(x_1 = 2\), \(x_2 = 7\), \(x_3 = 4\) and \(x_4 = 6\):

2\,\mathrm{C_2H_6} + 7\,\mathrm{O_2} \to 4\,\mathrm{CO_2} + 6\,\mathrm{H_2O}

5. Check oxygen: 14 atoms on the left, \(8 + 6 = 14\) on the right. The free variable only sets the overall scale.

Network flow

A network is a set of junctions, called nodes, joined by branches that carry a flow: cars along streets, water through pipes, or data through links. Two rules give the equations. At each node, the total flow in equals the total flow out. For the network as a whole, the total flow entering equals the total flow leaving. Unknown flows become variables, and each node contributes one linear equation. Free variables in the solution are flows that can be chosen, for example by a traffic engineer adjusting signals, after which every other flow is fixed.

Worked example: a one-way loop

Four one-way streets form a loop A to B to C to D and back to A, with flows \(x_1\) (AB), \(x_2\) (BC), \(x_3\) (CD) and \(x_4\) (DA) in cars per hour. 400 cars enter at A, 250 leave at B, 150 enter at C and 300 leave at D. 1. Node A: \(400 + x_4 = x_1\). Node B: \(x_1 = x_2 + 250\). Node C: \(x_2 + 150 = x_3\). Node D: \(x_3 = x_4 + 300\). 2. Solving, \(x_1 = 400 + x_4\), \(x_2 = 150 + x_4\), \(x_3 = 300 + x_4\), with \(x_4\) free. 3. One-way streets need \(x_4 \ge 0\), so the smallest possible flow on BC is 150 cars per hour. 4. Check the totals: \(400 + 150 = 250 + 300 = 550\).

Common mistakes to avoid

First, mixing up the direction of an exchange table: each sector's shares of its own output must add to 100%. Second, expecting a unique answer: these models usually have free variables, and the answer is a family of solutions. Third, leaving fractional coefficients in a chemical equation when whole numbers are wanted. Fourth, forgetting real-world limits, such as non-negative flows on one-way streets, when reporting the possible values of a free variable. Fifth, sign errors from moving terms across the equals sign, which is why each worked example ends with a check.

Key takeaways

Balance conditions give linear equations: income equals expenditure, atoms in equal atoms out, flow in equals flow out. Leontief's exchange model gives a homogeneous system whose free variable fixes only the ratio of equilibrium prices. Chemical balancing gives a homogeneous system with more unknowns than equations; choose the free variable to make the smallest whole numbers. Network flow gives one equation per node, and free variables are flows that can be chosen within real limits. Always interpret the general solution and check it in the original conditions.

Flashcards

Flashcard

Balance condition

What comes in equals what goes out

Each one is a linear equation.

Test your understanding

Question 1 of 5

What are the smallest whole-number coefficients that balance CH₄ + O₂ → CO₂ + H₂O, in that order?

Question 2 of 5

At a junction, 120 and x cars per hour flow in, and 90 and 70 cars per hour flow out. What is x?

Question 3 of 5

In Leontief's closed exchange model, what makes a set of prices an equilibrium?

Question 4 of 5

In the one-way loop example, x₂ = 150 + x₄. If the flow on DA is x₄ = 50 cars per hour, what is the flow on BC?

Question 5 of 5

What kind of linear system does balancing a chemical equation usually produce?

← Previous topicNext topic →