Two streaming plans. Plan A charges $6 per month plus $3 per film. Plan B charges $15 per month with unlimited films. At some number of films per month they cost exactly the same. Where is that crossover?
Two walkers start from opposite ends of a 9 km path. One walks at 4 km/h, the other at 5 km/h. When do they meet, and where?
Both questions have the same shape: two things you don’t know, two separate facts about them. A single equation can pin down one unknown. To pin down two, you need two.
24.1 What this chapter helps you do
Symbols to keep handy
These are the bits of notation you'll see a lot. If a line of symbols feels like a fence, read it out loud once, then keep going.
(A) = ad - bc: the determinant of A — tells you whether a unique solution exists
Here is the main move this chapter is making, in plain terms. You do not need to be fast. You just need to keep the thread.
Coming in: You can already find one unknown from one equation. Some problems give you two things you don’t know — and two separate facts about them.
Leaving with: Two equations, two unknowns: each equation is a constraint that cuts the possibilities down. Where both constraints hold at once, that is the solution.
24.2 What the notation is saying
Here are the two streaming plans written as equations. Let m = months (fixed at 1, so we can drop it) and f = number of films rented:
When the costs are equal: 6 + 3f = 15. One unknown, one equation — you already know how to solve this. This means some “systems” collapse to one equation once you say clearly what the shared condition is.
Now for the walkers. Let t = time in hours, d = distance walked by the first walker. Two facts:
\begin{cases} d + (9 - d) = 9 \\ d = 4t \quad \text{and} \quad 9 - d = 5t \end{cases}
Rewriting cleanly:
\begin{cases} d + 5t = 9 \\ d - 4t = 0 \end{cases}
Read the curly brace as “both of these must be true at the same time.” That is a system. The solution is the pair of values (d,\, t) that satisfies both equations simultaneously. This means a system is not a list of separate problems. It is one problem with several constraints that must agree.
24.2.1 The general form
The standard 2×2 system looks like this:
\begin{cases} a_1 x + b_1 y = c_1 \\ a_2 x + b_2 y = c_2 \end{cases}
Here x and y are the unknowns. The numbers a_1, b_1, c_1 and a_2, b_2, c_2 are given — they are the coefficients (the multipliers of x and y) and the constant terms (the values on the right). This means every 2×2 system has the same structure even when the context is tickets, circuits, mixtures, or motion.
24.2.2 Compact matrix notation
The same system can be written using a matrix — just the coefficients arranged in a rectangular array:
\begin{pmatrix} a_1 & b_1 \\ a_2 & b_2 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} c_1 \\ c_2 \end{pmatrix}
Say it as: the 2×2 matrix of coefficients, multiplied by the column of unknowns, equals the column of constants. This notation is compact — it stores the same information without repeating x and y on every line. For a 2×2 system it’s a convenience. For a 100×100 system (as in circuit analysis or machine learning), it’s essential. This means matrix notation is a way to organise the system so the pattern is easy to see and scale up.
The matrix itself — the rectangular array of coefficients — is written with parentheses around it:
Read “A” as “the coefficient matrix.” The entries are: top-left a_1 (coefficient of x in the first equation), top-right b_1 (coefficient of y in the first equation), and so on.
24.3 The method
Three methods solve a 2×2 system. Each is worth knowing: the graphical method shows you what you’re doing, substitution is efficient for small systems, and elimination is the one that scales.
24.3.1 Method 1 — Graphical
Each equation is a straight line. The solution is where the two lines cross.
\begin{cases} x + y = 5 \\ x - y = 1 \end{cases}
Rearrange each equation into y = mx + b form:
Line 1: y = -x + 5 (slope -1, intercept 5)
Line 2: y = x - 1 (slope 1, intercept -1)
Plot both. They cross at (3, 2). Check: 3 + 2 = 5 ✓ and 3 - 2 = 1 ✓. This means the graphical method turns “solve both equations” into “find the point that lies on both lines.”
Three possible outcomes:
What the lines do
What it means
Cross at one point
One unique solution
Are parallel (never cross)
No solution — the equations contradict each other
Are the same line
Infinitely many solutions — one equation gives no new information
Solve one equation for one variable, then substitute into the other. This eliminates one unknown and leaves a single equation you can solve directly.
\begin{cases} x + y = 5 \qquad (1) \\ x - y = 1 \qquad (2) \end{cases}
From equation (1): x = 5 - y.
Substitute into equation (2):
(5 - y) - y = 1
5 - 2y = 1
-2y = -4 \implies y = 2
Now substitute y = 2 back into x = 5 - y:
x = 5 - 2 = 3
Solution: x = 3, y = 2. This means substitution temporarily turns a two-variable problem back into the one-variable algebra you already know.
When to use it: substitution works cleanly when one equation already has a variable with coefficient 1 (so there’s no fraction to deal with when you isolate it).
24.3.3 Method 3 — Elimination
Multiply one or both equations by constants to make the coefficient of one variable the same (or opposite) in both equations. Then add or subtract to eliminate that variable.
Check in equation (2): 4 \cdot \frac{27}{14} - \frac{19}{7} = \frac{54}{7} - \frac{19}{7} = \frac{35}{7} = 5 ✓ This means elimination works by combining the equations until one variable disappears.
When to use it: elimination is best when no variable has a coefficient of 1, or when the numbers make substitution awkward. It’s also the method that generalises directly to 3×3 and larger systems (Gaussian elimination).
24.4 Why this works
The determinant tells you whether a unique solution exists
For the system \begin{pmatrix} a & b \\ c & d \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} e \\ f \end{pmatrix}, define the determinant:
\det(A) = ad - bc
Read it as: top-left times bottom-right, minus top-right times bottom-left.
If \det(A) \neq 0: one unique solution exists. The two lines cross.
If \det(A) = 0: no unique solution. The lines are parallel (no solution) or identical (infinitely many).
For the system \begin{cases} x + y = 5 \\ x - y = 1 \end{cases}, the matrix is \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} and \det = (1)(-1) - (1)(1) = -2 \neq 0. One solution. ✓
The determinant is a quick test before you do any work. If it’s zero, stop — no amount of algebra will produce a unique answer. This means the determinant tells you whether the two constraints are really independent.
24.5 Worked examples
Example 1 — Business: supply and demand equilibrium.
A market for concert tickets has a supply curve and a demand curve:
\begin{cases} p = 2q + 10 \qquad \text{(supply: price rises with quantity)} \\ p = -3q + 60 \qquad \text{(demand: price falls as quantity rises)} \end{cases}
Here p = price (dollars), q = quantity (thousands of tickets). The equilibrium is where supply price equals demand price.
Set the right-hand sides equal (substitution):
2q + 10 = -3q + 60
5q = 50 \implies q = 10
p = 2(10) + 10 = 30
Equilibrium: 10,000 tickets at $30 each.
Check in the demand equation: -3(10) + 60 = -30 + 60 = 30 ✓
The determinant check: rewrite as \begin{cases} 2q - p = -10 \\ -3q - p = -60 \end{cases}. Matrix \begin{pmatrix} 2 & -1 \\ -3 & -1 \end{pmatrix}, \det = (2)(-1) - (-1)(-3) = -2 - 3 = -5 \neq 0. Unique solution confirmed. This means equilibrium is simply the point where two different rules predict the same price and quantity.
Example 2 — Engineering: two-loop circuit (Kirchhoff’s laws).
A simple circuit has two loops. Kirchhoff’s voltage law says the voltage drops around each loop must sum to zero. After applying the law to each loop, the unknowns are the two loop currents I_1 and I_2 (in amps):
Check in equation (2): 2 \cdot \frac{32}{11} + 5 \cdot \frac{18}{11} = \frac{64 + 90}{11} = \frac{154}{11} = 14 ✓ This means each current is fixed by the requirement that both loop equations hold together.
Example 3 — Science: mixture problem.
A lab needs 80 mL of a 35% saline solution. The lab has a 20% solution and a 50% solution. How many mL of each should be mixed?
Let x = mL of the 20% solution, y = mL of the 50% solution.
From equation (1): x = 80 - y. Substitute into equation (2):
0.20(80 - y) + 0.50y = 28
16 - 0.20y + 0.50y = 28
0.30y = 12 \implies y = 40
x = 80 - 40 = 40
Mix 40 mL of the 20% solution with 40 mL of the 50% solution.
Check: salt = 0.20(40) + 0.50(40) = 8 + 20 = 28 and 28/80 = 0.35 ✓ This means mixture problems always balance two things at once: total amount and total content.
Example 4 — Computing: game resource constraints.
A game character can perform two actions: attacking costs 3 energy and 1 second, defending costs 1 energy and 2 seconds. In one round, the character uses exactly 14 energy and 8 seconds. How many attacks and defends did they perform?
Let a = attacks, d = defends.
\begin{cases} 3a + d = 14 \qquad \text{(energy)} \\ a + 2d = 8 \qquad\;\, \text{(time)} \end{cases}
From equation (1): d = 14 - 3a. Substitute into equation (2):
Determinant check: matrix \begin{pmatrix} 3 & 1 \\ 1 & 2 \end{pmatrix}, \det = (3)(2) - (1)(1) = 5 \neq 0. Unique solution. ✓ This means the solution is the only combination of actions that fits both the energy budget and the time budget.
24.6 Where this goes
This chapter turned crossing lines and paired constraints into a general algebraic method. The next step is to keep the same idea while scaling it to much larger systems.
This chapter handled two unknowns and two equations. Real systems are often much larger — 10 unknowns, 100, or more. The method that scales is Gaussian elimination: the same idea as the elimination you learned here, applied row by row to a matrix. That is the core of linear algebra (Vol 7). Matrix notation, which you saw as a shorthand here, becomes indispensable there — you’ll work with eigenvalues, matrix inverses, and linear transformations that are impossible to write without it.
When systems get large enough, solving them exactly becomes computationally expensive. Numerical methods (Vol 7) replace exact algebra with iterative algorithms — methods that get close enough, fast enough, for engineering and data science work. Systems of equations are the motivating problem that drives a large part of that volume. The determinant you met here generalises too: for an n \times n matrix, the same zero/non-zero test predicts whether a unique solution exists.
Where this shows up
Engineering: Kirchhoff’s voltage and current laws applied to a circuit produce one equation per loop or node. A circuit with two loops gives a 2×2 system; a real circuit might give a 50×50 system solved by computer using the same method.
Science: Chemical stoichiometry — balancing an equation with two unknown coefficients — is a 2×2 system. Equilibrium calculations in physical chemistry are similar.
Finance: Supply and demand equilibrium is the intersection of two linear functions. Every introductory economics model of price-setting is a system of equations.
Computing: Linear regression with two parameters solves a 2×2 system. Graphics engines apply matrix transformations (systems of equations) to every vertex on screen, thousands of times per second.
24.7 Exercises
These are puzzles. The interesting part is setting up the system — translating the situation into two equations before you solve.
1. Two friends are buying supplies for a camping trip. Rashida buys 3 bags of trail mix and 2 water bottles for $19. Tomasz buys 1 bag of trail mix and 4 water bottles for $17. What does one bag of trail mix cost, and what does one water bottle cost?
Code
{const el =makeStepperHTML(1, [ { op:"Write as a system",eq:"\\begin{cases} 3t + 2w = 19 \\\\ t + 4w = 17 \\end{cases}",note:"t = price of trail mix, w = price of water bottle" }, { op:"Solve equation 2 for t",eq:"t = 17 - 4w",note:null }, { op:"Substitute into equation 1",eq:"3(17 - 4w) + 2w = 19",note:null }, { op:"Expand and simplify",eq:"51 - 12w + 2w = 19 \\implies -10w = -32 \\implies w = 3.20",note:null }, { op:"Back-substitute to find t",eq:"t = 17 - 4(3.20) = 17 - 12.80 = 4.20",note:null }, { op:"Check",eq:"3(4.20) + 2(3.20) = 12.60 + 6.40 = 19 \\checkmark \\quad 4.20 + 4(3.20) = 4.20 + 12.80 = 17 \\checkmark",note:null }, ]);return el;}
2. A cinema charges one price for adults and another for children. Two families bought tickets last Saturday:
The Nguyens: 3 adults and 2 children, total $32.
The Garcias: 1 adult and 4 children, total $24.
What is the adult ticket price? What is the child ticket price?
3. Two cyclists start from the same point at the same time and ride in opposite directions. After 3 hours they are 132 km apart. One rides 6 km/h faster than the other. What is each cyclist’s speed?
Code
{const el =makeStepperHTML(3, [ { op:"Write as a system",eq:"\\begin{cases} 3r + 3s = 132 \\\\ r - s = 6 \\end{cases}",note:"r and s are the two speeds; together they cover 132 km in 3 hours; one is 6 km/h faster" }, { op:"Simplify equation 1",eq:"r + s = 44",note:null }, { op:"Add the two equations",eq:"(r + s) + (r - s) = 44 + 6 \\implies 2r = 50 \\implies r = 25 \\text{ km/h}",note:null }, { op:"Back-substitute to find s",eq:"s = 44 - 25 = 19 \\text{ km/h}",note:null }, { op:"Check",eq:"3(25) + 3(19) = 75 + 57 = 132 \\checkmark \\quad 25 - 19 = 6 \\checkmark",note:null }, ]);return el;}
4. Use the determinant to decide, without solving, whether each system has a unique solution, no solution, or infinitely many solutions.