MathLabs

Grade 9

Systems of equations

Several equations sharing unknowns, solved together to find values that satisfy all of them at once.

IntuitionTwo clues, one hidden pair of numbers

Imagine two friends give you clues about their ages: "twice my age plus your age is some number" and "my age minus your age is another number." Neither clue alone pins down both ages, but together they usually do. A system of equations is exactly this: several equations sharing the same unknowns, and a solution must satisfy every equation at once — not just one. Geometrically, each linear equation in two unknowns is a straight line, and solving the system means finding where the lines meet.

Interactive line, one half of a two-line system whose intersection is the solution
A 2×22\times 2 linear system Ax=bA\mathbf{x} = \mathbf{b} has a unique solution if and only if the column vectors of AA span a parallelogram of nonzero area (det⁡A≠0\det A \neq 0).

SchoolSolving by substitution and by elimination

Definition: System of two linear equations

A system of two linear equations in two unknowns x,yx,y can be written as {ax+by=ecx+dy=f\begin{cases}ax+by=e\\cx+dy=f\end{cases}, where a,b,c,d,e,fa,b,c,d,e,f are given numbers. A solution is a pair (x,y)(x,y) that makes both equations true simultaneously. The number D=ad−bcD=ad-bc (built only from the four coefficients of xx and yy) turns out to control everything about how many solutions the system has.

{ax+by=ecx+dy=f\begin{cases}ax+by=e\\cx+dy=f\end{cases}

Substitution solves one equation for one variable and plugs the result into the other — fast when a variable already has coefficient 11. Elimination multiplies each equation by a chosen constant so that one variable's coefficients become equal (or opposite), then adds or subtracts the equations to cancel that variable, leaving a single-variable equation. Both methods, applied to the general system, lead to the same formulas x=ed−bfad−bcx=\dfrac{ed-bf}{ad-bc} and y=af−ecad−bcy=\dfrac{af-ec}{ad-bc}, valid exactly when ad−bc≠0ad-bc\neq0.

x=ed−bfad−bc,y=af−ecad−bcx=\dfrac{ed-bf}{ad-bc}, \qquad y=\dfrac{af-ec}{ad-bc}
What the determinant D=ad-bc tells you
Value of DGeometric pictureNumber of solutions
ad−bc≠0ad-bc\neq0Two lines crossing at one pointExactly one
ad−bc=0ad-bc=0Two parallel, distinct linesNone
ad−bc=0ad-bc=0The same line drawn twiceInfinitely many

UndergraduateTwo key theorems

The system {ax+by=ecx+dy=f\begin{cases}ax+by=e\\cx+dy=f\end{cases} has exactly one solution (x,y)(x,y) if and only if ad−bc≠0ad-bc\neq0, in which case x=ed−bfad−bcx=\dfrac{ed-bf}{ad-bc} and y=af−ecad−bcy=\dfrac{af-ec}{ad-bc}.

Why is it true?

This single number D packages both the "how many solutions" question and the "what are they" answer: check one sign, and you know whether elimination will succeed before you even attempt it.

Proof

Deriving a necessary condition (eliminating y). Multiply the first equation of {ax+by=ecx+dy=f\begin{cases}ax+by=e\\cx+dy=f\end{cases} by dd and the second by bb: adx+bdy=edadx+bdy=ed and bcx+bdy=bfbcx+bdy=bf. Subtracting the second from the first cancels the bdybdy terms exactly, leaving (ad−bc)x=ed−bf(ad-bc)x=ed-bf. This equation is a necessary consequence of the system: any pair (x,y)(x,y) that solves both original equations must also satisfy it, since it was built only by adding/subtracting multiples of the two original equations.

Deriving the twin condition (eliminating x). Symmetrically, multiply the first equation by cc and the second by aa, then subtract the first from the second to cancel the xx terms: this leaves (ad−bc)y=af−ec(ad-bc)y=af-ec, again a necessary consequence of any solution.

Existence when D≠0. If ad−bc≠0ad-bc\neq0, the single-unknown equation (ad−bc)x=ed−bf(ad-bc)x=ed-bf has, by the theorem on linear equations in one unknown, exactly the one solution x=ed−bfad−bcx=\dfrac{ed-bf}{ad-bc}; likewise (ad−bc)y=af−ec(ad-bc)y=af-ec gives exactly y=af−ecad−bcy=\dfrac{af-ec}{ad-bc}. Substituting these two values into the original equations of {ax+by=ecx+dy=f\begin{cases}ax+by=e\\cx+dy=f\end{cases} and simplifying algebraically confirms both are satisfied simultaneously (the reader can verify a⋅ed−bfad−bc+b⋅af−ecad−bc=ea\cdot\dfrac{ed-bf}{ad-bc}+b\cdot\dfrac{af-ec}{ad-bc}=e by combining fractions over the common denominator DD) — so a solution genuinely exists.

Uniqueness when D≠0. Since (ad−bc)x=ed−bf(ad-bc)x=ed-bf and (ad−bc)y=af−ec(ad-bc)y=af-ec are necessary for every solution of {ax+by=ecx+dy=f\begin{cases}ax+by=e\\cx+dy=f\end{cases} (not merely sufficient), any solution (x,y)(x,y) of the original system, whatever it may be, is forced to satisfy x=ed−bfad−bcx=\dfrac{ed-bf}{ad-bc} and y=af−ecad−bcy=\dfrac{af-ec}{ad-bc} exactly, by the uniqueness part of the one-unknown theorem. So there cannot be two different solutions: combined with existence, the solution is unique precisely when ad−bc≠0ad-bc\neq0.

If ad−bc=0ad-bc=0, the system {ax+by=ecx+dy=f\begin{cases}ax+by=e\\cx+dy=f\end{cases} never has exactly one solution: it has no solution if ed−bf≠0ed-bf\neq0, and infinitely many solutions if ed−bf=0ed-bf=0 (provided a,ba,b are not both zero).

Why is it true?

D=0 means the two lines have the same slope: geometrically they are either perfectly parallel and never meet (no solution), or actually the same line drawn twice (every point is a solution) — never a single crossing point.

Proof

The elimination steps from the previous theorem did not require ad−bc≠0ad-bc\neq0: they show that any solution (x,y)(x,y) of {ax+by=ecx+dy=f\begin{cases}ax+by=e\\cx+dy=f\end{cases} must satisfy (ad−bc)x=ed−bf(ad-bc)x=ed-bf, regardless of the value of DD. When ad−bc=0ad-bc=0, the left side (ad−bc)x(ad-bc)x equals 0⋅x=00\cdot x=0 for every xx, so this necessary equation collapses to the numerical statement 0=ed−bf0=ed-bf.

**Case ed−bf≠0ed-bf\neq0 (no solution).** The statement 0=ed−bf0=ed-bf is then simply false, independent of xx and yy. Since every solution of the system would have to make this false statement true, no solution can exist. Geometrically, the two equations describe lines with the same slope (since D=0D=0) but different intercepts, i.e. two parallel, non-intersecting lines.

**Case ed−bf=0ed-bf=0 (infinitely many solutions).** Now the necessary equation is the true but empty statement 0=00=0, so eliminating y gives no information at all — it is automatically satisfied by any xx. Concretely, since D=ad−bc=0D=ad-bc=0 and (a,b)≠(0,0)(a,b)\neq(0,0), there is a constant kk with c=kac=ka and d=kbd=kb (the second equation's x,y-coefficients are proportional to the first's); combined with ed−bf=0ed-bf=0 one finds f=kef=ke as well, so the second equation cx+dy=fcx+dy=f is literally kk times the first equation ax+by=eax+by=e. Every point (x,y)(x,y) satisfying the first equation automatically satisfies the second (multiply the first equation by kk), so the whole line ax+by=eax+by=e — infinitely many points — solves the system.

UndergraduateReal-World Applications and Worked Examples

Whenever two conditions must hold at once on two unknown quantities — a mixture that must hit both a target weight and a target concentration, or a market price that must satisfy both what suppliers demand and what buyers demand — a system of two linear equations models it exactly, and elimination or substitution finds the values engineers, chemists, and economists actually need.

Example: Chemistry/engineering — mixing a target concentration

A lab needs 1010 liters of a 25%25\% acid solution, made by mixing a 15%15\% solution and a 40%40\% solution. How many liters of each should be mixed?

Solution

Step 1 (Set up the system). Let xx be liters of the 15%15\% solution and yy liters of the 40%40\% solution. Total volume gives x+y=10x+y=10; total pure acid gives 0.15x+0.40y=2.50.15x+0.40y=2.5 (since 0.25×10=2.50.25\times10=2.5).

Step 2 (Substitute). From the first equation, x=10−yx=10-y. Substituting into the second: 0.15(10−y)+0.40y=2.50.15(10-y)+0.40y=2.5, i.e. 1.5−0.15y+0.40y=2.51.5-0.15y+0.40y=2.5, i.e. 0.25y=10.25y=1, so y=4y=4.

Step 3 (Back-substitute). Then x=10−4=6x=10-4=6. So x=6, y=4x=6,\ y=4: mix 66 liters of the 15%15\% solution with 44 liters of the 40%40\% solution.

Example: Economics — supply-demand equilibrium

A market's supply curve is p=2q+1p=2q+1 and its demand curve is p=−3q+21p=-3q+21, where pp is price and qq is quantity. Find the equilibrium price and quantity, where supply equals demand.

Solution

Step 1 (Recognize the system). Both equations share the unknowns p,qp,q; equilibrium is precisely the point (p,q)(p,q) satisfying both simultaneously — a system of two linear equations.

Step 2 (Substitute one into the other). Since both equations already give pp explicitly, set them equal: 2q+1=−3q+212q+1=-3q+21.

Step 3 (Solve for q, then p). Adding 3q3q to both sides and subtracting 11: 5q=205q=20, so q=4q=4. Substituting back into either equation, p=2(4)+1=9p=2(4)+1=9. So q=4, p=9q=4,\ p=9: the market clears at a price of 99 and quantity of 44.

For the system {2x+3y=54x+6y=1\begin{cases}2x+3y=5\\4x+6y=1\end{cases}, compute D=ad-bc and determine the number of solutions.

Solve {2x+y=5x−y=1\begin{cases}2x+y=5\\x-y=1\end{cases} for x and y.

In the supply-demand example with p=2q+1p=2q+1 and p=−3q+21p=-3q+21, what is the equilibrium quantity q?

If D=0 and the two equations are proportional (including the constant terms), what is true of the system?