Linear Algebra › Section A · Linear equations in linear algebra › Topic A.10
Linear models in science and engineering
Mixing ingredients to hit nutrition targets, finding the currents in a circuit and forecasting how a population shifts between city and suburbs are three very different problems. Each becomes a matrix equation, and the tools of this section solve all three.
Why linear models are everywhere
A model is linear when its outputs are fixed combinations of its inputs: twice the ingredient gives twice the nutrient, twice the voltage gives twice the current. Real systems are rarely exactly linear, but many are close to it over a useful range, and linear models can be solved quickly and reliably even with thousands of unknowns. This topic builds three of them, writes each as \(A\mathbf{x} = \mathbf{b}\) or as a repeated product \(M\mathbf{x}\), and states the assumptions each one rests on. Every number in the examples is illustrative.
Mixing to meet targets
A dietitian, a feed manufacturer or a chemical plant often needs to combine ingredients to hit exact targets. Record each ingredient as a vector listing what one unit of it supplies, for example grams of protein, carbohydrate and fat in one serving. If \(\mathbf{a}_1, \mathbf{a}_2, \mathbf{a}_3\) are those vectors and \(\mathbf{b}\) is the target, then \(x_j\) servings of food \(j\) meet it exactly when
The model assumes nutrients simply add, that fractional servings are allowed, and that a sensible answer has every \(x_j \ge 0\).
Worked example: a meal plan
Three foods supply, per serving, \((10, 30, 2)\), \((20, 5, 4)\) and \((2, 10, 8)\) grams of protein, carbohydrate and fat. The target is \((46, 95, 32)\). 1. The augmented matrix has the food vectors as its first three columns and the target last. 2. Swap rows 1 and 3 and halve the new row 1 to get \((1, 2, 4, 16)\). Row 2 minus 30 times it is \((0, -55, -110, -385)\), which scales to \((0, 1, 2, 7)\); row 3 minus 10 times it is \((0, 0, -38, -114)\), so \(x_3 = 3\). Back substitution gives \(x_2 = 7 - 6 = 1\) and \(x_1 = 16 - 2 - 12 = 2\): the plan is 2, 1 and 3 servings. 3. Every column of the coefficient matrix has a pivot, so this plan is the only one. 4. Check protein: \(2(10) + 1(20) + 3(2) = 46\). Carbohydrate: \(60 + 5 + 30 = 95\). Fat: \(4 + 4 + 24 = 32\). 5. All servings are non-negative, so the plan is usable.
Electrical networks
In a circuit of batteries and resistors, Ohm's law says the voltage drop across a resistor is \(V = RI\), with \(R\) in ohms and the current \(I\) in amperes. Kirchhoff's voltage law says that around any closed loop, the sum of the \(RI\) drops equals the sum of the battery voltages, each counted positive if it drives current in the loop's direction and negative if it opposes it. Assign a loop current to each independent loop, all taken clockwise. A resistor shared by two loops carries the difference of their currents, so it appears in both loop equations with a minus sign for the neighbouring loop. Collecting the equations gives \(R\mathbf{i} = \mathbf{v}\).
Worked example: two loop currents
Loop 1 has a 14 V battery and a 4 Ω resistor; loop 2 has a 4 V battery and a 3 Ω resistor; the loops share a 2 Ω resistor, and both batteries push clockwise. 1. Loop 1: \(4I_1 + 2(I_1 - I_2) = 14\), so \(6I_1 - 2I_2 = 14\). 2. Loop 2: \(3I_2 + 2(I_2 - I_1) = 4\), so \(-2I_1 + 5I_2 = 4\). 3. In matrix form,
4. Three times the second equation plus the first gives \(13I_2 = 26\), so \(I_2 = 2\) A and \(I_1 = (14 + 4)/6 = 3\) A. 5. The shared resistor carries \(3 - 2 = 1\) A in loop 1's direction. Check loop 2: \(-6 + 10 = 4\).
Difference equations
Many systems are observed at regular steps: each year, each hour, each generation. If the state at step \(k\) is a vector \(\mathbf{x}_k\) and a fixed matrix \(M\) describes how one step leads to the next, then
This is a linear difference equation, or recurrence relation. Starting from \(\mathbf{x}_0\), you find \(\mathbf{x}_1 = M\mathbf{x}_0\), then \(\mathbf{x}_2 = M\mathbf{x}_1\), and so on. A migration matrix is a standard example: each column records how the population of one region is shared out a step later.
Worked example: city and suburbs
Each year, assume 10% of a region's city residents move to the suburbs and 5% of suburban residents move to the city, with no births, deaths or other moves. 1. The city column of \(M\) is \((0.90, 0.10)\) and the suburbs column is \((0.05, 0.95)\). 2. Start with \(\mathbf{x}_0 = (600{,}000, 400{,}000)\). 3. Then
4. Next,
5. Check: each total is 1,000,000, as it must be when every column sums to 1. 6. A steady state needs \(0.10c = 0.05s\), so \(s = 2c\): the populations would settle near one-third city, two-thirds suburbs.
Linearity and its limits
Because each model is a matrix equation, superposition holds. Double every battery voltage and every loop current doubles; add two targets and the meal plans add. That makes linear models easy to analyse and to adjust. The same feature marks their limits. Real resistors heat up and change resistance, nutrients interact in the body, and migration rates shift with house prices. A linear model is a deliberate simplification, trustworthy only where its assumptions roughly hold, which is why each worked example states them. Discrete dynamical systems, later in the course, shows what happens over many steps.
Common mistakes to avoid
First, putting each nutrient as a column instead of each food: column \(j\) must describe one unit of ingredient \(j\). Second, forgetting the shared resistor in one of the loop equations, or giving it the wrong sign. Third, filling a migration matrix by rows when the columns must each describe where one region's people go. Fourth, accepting a mathematically valid solution with a negative amount, such as \(-1\) servings. Fifth, presenting a linear model's forecast without its assumptions, such as fixed migration rates.
Key takeaways
Mixing problems are vector equations x₁a₁ + … + xₙaₙ = b, where each aⱼ lists what one unit of ingredient j supplies; sensible answers need xⱼ ≥ 0. For circuits, Ohm's law V = RI and Kirchhoff's voltage law give one equation per loop, Ri = v, with shared resistors carrying the difference of loop currents. A difference equation xₖ₊₁ = Mxₖ steps a state forward in time; columns of a migration matrix sum to 1, so the total is conserved. Linear models obey superposition and rest on stated assumptions.
Flashcards
Flashcard
Outputs are fixed combinations of the inputs
Test your understanding
Question 1 of 5
Each year 10% of city residents move to the suburbs and 5% of suburban residents move to the city. Starting from 500,000 in each, what are the city and suburb populations a year later?
Question 2 of 5
A single loop has a 12 V battery and resistors of 2 Ω and 4 Ω in series. What current flows?
Question 3 of 5
Two loops share a resistor. The clockwise loop currents are I₁ = 5 A and I₂ = 2 A. What current does the shared resistor carry?
Question 4 of 5
In the mixing model x₁a₁ + x₂a₂ + x₃a₃ = b for a meal plan, what does the vector a₂ represent?
Question 5 of 5
A circuit model reads Ri = v. If every battery voltage is doubled, what happens to the loop currents?
