The idea: the answer is where the lines cross
A system of equations is two (or more) equations that must be true at the same time, like x + y = 6 and x − y = 2. A solution is a pair (x, y) that makes both true. Each equation ax + by = c on its own has infinitely many solutions, and they form a straight line. A point that solves both equations lies on both lines, so the answer is the point where the lines cross. Here that is (4, 2): 4 + 2 = 6 and 4 − 2 = 2.
There are three classroom methods. They all find the same point; they differ in how much work the numbers take.
Graphing
Find two points on each line (two points fix a line), draw both lines and read off the crossing. Then put the point into both equations to check it. Graphing shows at once whether there is one answer, none or infinitely many, but it is only exact when the crossing lands on grid lines: a crossing at (13/7, 2/7) cannot be read off a grid. (Demo: graphing, read the crossing (4, 2))
Substitution
Solve one equation for one unknown, then put that expression into the other equation. With y = 2x − 3 and x + 2y = 4, replace y by (2x − 3): x + 2(2x − 3) = 4, so 5x − 6 = 4, 5x = 10 and x = 2. Then y = 2(2) − 3 = 1. On the graph, y = 2x − 3 is the same blue line, just written as y = mx + k. The equation x = 2 is a vertical line through the crossing, and y = 1 a horizontal line through it. (Demo: substitution, y = 2x − 3 into x + 2y = 4)
Pick the unknown whose coefficient is 1 or −1, so no fractions appear. In 3x + 2y = 12 and 2x − 3y = −5 no coefficient is ±1, and substitution gives y = −(3/2)x + 6; it still works, but elimination is easier there.
Elimination
Add or subtract the equations so that one unknown cancels. With x + y = 6 and x − y = 2 the y terms are already +y and −y, and adding gives 2x = 8, so x = 4. Put it back into the first equation: 4 + y = 6, y = 2. (Demo: elimination by adding)
When the y terms do not match, multiply first. For 3x + 2y = 12 and 2x − 3y = −5, multiply the first by 3 and the second by 2: 9x + 6y = 36 and 4x − 6y = −10. Adding gives 13x = 26, x = 2, and then y = 3. (Demo: elimination after multiplying)
Why is this allowed? Multiplying both sides of an equation by a number other than 0 keeps exactly the same solutions, so its line does not move. The sum of two equations is a new equation that is true wherever both are true, so its line passes through the same crossing. Choosing the multipliers so y cancels makes that new line vertical: it reads x = 4 directly.
One, none or infinitely many
Two lines in a plane either cross once, are parallel, or are the same line. The algebra says which: if both unknowns cancel, the statement left over decides it.
| lines | slopes | the algebra ends in | solutions |
|---|---|---|---|
| cross | different | x = 4, y = 2 | exactly one |
| parallel | same, different y-intercepts | a false statement, 0 = −4 | none (inconsistent) |
| the same line | same, same y-intercept | a true statement, 0 = 0 or 6 = 6 | infinitely many (dependent) |
x − y = 1 and 2x − 2y = 6 both have slope 1, so they are parallel; doubling the first and subtracting gives 0 = −4 (Demo: no solution, parallel lines). x + y = 3 and 2x + 2y = 6 are the same line, and substitution ends in 6 = 6 (Demo: infinitely many, the same line).
Which method when
| method | best when | weak spot |
|---|---|---|
| graphing | you want the picture, or a rough answer | not exact off the grid |
| substitution | one equation is already y = … or has a coefficient ±1 | fractions otherwise |
| elimination | both equations are in ax + by = c form | needs the right multipliers |
For three or more unknowns, elimination written as rows of numbers is Gaussian Elimination, which also shows what each row operation does to the lines. A line fitted to data points comes from a 2×2 system too: see Linear Regression. Solving a system is undoing a matrix, as in Linear Transformations. When one equation is a parabola, substitution gives a quadratic: see Quadratic Equations.
What the page leaves out
Only five preset systems with whole-number coefficients, two unknowns and no vertical lines are shown, and elimination always removes y. Cramer's rule (x = det₁/det), matrices, three equations in three unknowns (planes meeting at a point), nonlinear systems such as a line and a circle, and systems of inequalities (shaded regions) are only mentioned or left out.
See where this page fits on the Algebra & Functions mind map.