Lay's Linear Algebra

Chapter 1: Linear Equations in Linear Algebra

1.10 Linear models in business, science, and engineering

Study guide for Linear Algebra and Its Applications (David C. Lay, 6th edition)

Independent study guide. Not affiliated with or endorsed by Pearson.

Big idea

One product, $A\mathbf{x}$, carries three different modeling jobs. Which job it is doing depends on what the columns of $A$ mean.

When a column is a recipe, $A\mathbf{x}$ is a blend. Each column lists what one ingredient contributes to each measured quantity, $\mathbf{x}$ holds the amounts used, and the product totals up the result. Hitting a target means solving $A\mathbf{x} = \mathbf{b}$ for the amounts.

When a column comes from a physical law, $A\mathbf{x} = \mathbf{b}$ is that law written once per loop or once per node. In a resistor network the entries are resistances, the unknowns are currents, and the right side holds the voltage sources. When the columns describe how a system changes over one time step, $A\mathbf{x}_k$ is next year’s state, and repeating the product runs the model forward.

The habit worth building is unit bookkeeping. Each column of $A$ has its own meaning, and each row of $A\mathbf{x}$ has its own units. Getting those straight catches most modeling errors before any arithmetic happens.

Decoder

The product $A\mathbf{x}$ is the linear combination of the columns of $A$ using the entries of $\mathbf{x}$ as weights.

Take the first column, multiply it by the first entry of $\mathbf{x}$. Take the second column, multiply it by the second entry. Keep going, then add the vectors. In a model this is the sentence that gives the columns their meaning: column $j$ is what one unit of ingredient $j$ contributes, and $x_j$ is how much of it you used.

Definitions and results

A linear model is a matrix equation whose entries carry units. Building one means three decisions: what the unknowns are, what each column contributes per unit, and what the right-hand side measures. Solving it is the row reduction you already know.

Mixture models. Put one row per measured quantity and one column per ingredient. Entry $a_{ij}$ is the amount of quantity $i$ supplied by one unit of ingredient $j$. The unknown $x_j$ is the number of units of ingredient $j$, and $\mathbf{b}$ is the target. The model is $A\mathbf{x} = \mathbf{b}$. A solution with a negative entry is arithmetically valid and physically useless, so check the sign of every entry before reporting an answer.

Circuit models. Two laws generate the equations. The current law says the currents arriving at a node sum to the currents leaving it. The voltage law says that around any closed loop, the sum of voltage drops equals the sum of source voltages, with a drop across a resistor equal to resistance times current. Using loop currents as the unknowns gives a system $R\mathbf{i} = \mathbf{v}$ where the diagonal entry of $R$ is the total resistance around that loop, and an off-diagonal entry is minus the resistance shared with the neighboring loop. The sign is negative because the shared resistor carries the two loop currents in opposite directions.

Difference equations. When a system’s next state is a fixed linear function of its current state, write $\mathbf{x}_{k+1} = A\mathbf{x}_k$. Column $j$ of $A$ says where the contents of compartment $j$ go in one step. Starting from $\mathbf{x}_0$, repeated multiplication produces the whole future of the model. If every column of $A$ adds to $1$, nothing is created or lost, so the total across all compartments is the same at every step. That column sum is a free arithmetic check on every iteration.

Worked examples

Mixing two supplements to hit a target

Two powders are on the shelf. One scoop of mix A supplies 4 grams of protein and 2 grams of fiber. One scoop of mix B supplies 1 gram of protein and 3 grams of fiber. The day’s target is 14 grams of protein and 12 grams of fiber.

Columns are the mixes, rows are the nutrients:

$$ \begin{bmatrix} 4 & 1 \\ 2 & 3 \end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \end{bmatrix} = \begin{bmatrix} 14 \\ 12 \end{bmatrix} $$

From the first row, $x_2 = 14 - 4x_1$. Substituting into the second row gives $2x_1 + 42 - 12x_1 = 12$, so $-10x_1 = -30$ and $x_1 = 3$. Then $x_2 = 2$.

Check both rows: protein is $4(3) + 1(2) = 14$, fiber is $2(3) + 3(2) = 12$. Both entries are positive, so three scoops of A and two scoops of B is a usable answer.

Currents in a two-loop circuit

Two loops share one resistor. The left loop contains a 4 ohm resistor and the shared 3 ohm resistor, driven by an 11 volt source. The right loop contains a 5 ohm resistor and the same shared 3 ohm resistor, driven by a 2 volt source. Let $i_1$ and $i_2$ be the loop currents, both taken clockwise.

Total resistance around the left loop is $4 + 3 = 7$, around the right loop $5 + 3 = 8$, and the shared resistance is $3$:

$$ \begin{bmatrix} 7 & -3 \\ -3 & 8 \end{bmatrix}\begin{bmatrix} i_1 \\ i_2 \end{bmatrix} = \begin{bmatrix} 11 \\ 2 \end{bmatrix} $$

Multiply the first row by $3$ and the second by $7$, then add, to eliminate $i_1$: $(-9 + 56)i_2 = 33 + 14$, so $47i_2 = 47$ and $i_2 = 1$. Back-substitute into the first row: $7i_1 - 3 = 11$, so $i_1 = 2$.

Check the physics rather than the algebra. In the left loop the 4 ohm resistor drops $4(2) = 8$ volts and the shared resistor carries $i_1 - i_2 = 1$ amp for a drop of $3$ volts, totalling 11 volts. In the right loop the 5 ohm resistor drops $5(1) = 5$ volts and the shared resistor contributes $3(1 - 2) = -3$ volts, totalling 2 volts. Both loops match their sources, so $i_1 = 2$ amps and $i_2 = 1$ amp.

A population that moves each year

A region is split into a city and its suburbs. Each year 5 percent of city residents move to the suburbs and the other 95 percent stay. Of the suburban residents, 3 percent move to the city and 97 percent stay. Let $\mathbf{x}_k$ hold the city and suburb populations in thousands after $k$ years.

$$ M = \begin{bmatrix} 0.95 & 0.03 \\ 0.05 & 0.97 \end{bmatrix}, \qquad \mathbf{x}_0 = \begin{bmatrix} 600 \\ 400 \end{bmatrix} $$

Each column adds to $1$, so nobody enters or leaves the region. Step forward one year:

$$ \mathbf{x}_1 = \begin{bmatrix} 0.95(600) + 0.03(400) \\ 0.05(600) + 0.97(400) \end{bmatrix} = \begin{bmatrix} 582 \\ 418 \end{bmatrix} $$

Step forward again:

$$ \mathbf{x}_2 = \begin{bmatrix} 0.95(582) + 0.03(418) \\ 0.05(582) + 0.97(418) \end{bmatrix} = \begin{bmatrix} 565.44 \\ 434.56 \end{bmatrix} $$

Check the totals: $582 + 418 = 1000$ and $565.44 + 434.56 = 1000$, matching the starting total of $1000$ thousand. The city is shrinking, but by less each year, because the outflow shrinks with the city while the inflow grows with the suburbs. Where that settles is an eigenvalue question, and it comes later.

Practice

Every model here rests on one computation. Get fast and exact at multiplying a matrix by a vector, both as rows of dot products and as a combination of columns.

Practice

Generated problems for this section, graded instantly.

Videos

Watch both readings of the product side by side: a row at a time as dot products, and a column at a time as a weighted sum. The column reading is what turns a table of numbers into a model.

Matrix vector products | Vectors and spaces | Linear Algebra | Khan Academy

Khan Academy

Quiz

Five questions on matrix-vector products of the size these models produce.

Quiz

5 problems with a score at the end.