Solving Systems of Linear Equations
A system of two linear equations is just two lines sharing a plane — its solution is every point (x, y) that lies on both lines at once, and there's always exactly one, none, or infinitely many.
By the end you'll be able to solve a linear system by graphing, substitution, or elimination, and predict from slopes and intercepts alone whether it has one, zero, or infinitely many solutions.
Predict: how many solutions do two parallel lines have? Drag one line's slope until it matches the other's, so the lines run parallel, and check what the diagram reports.
Each line is y = m₁x + b₁ and y = m₂x + b₂. Drag any slider to reshape a line and watch the solution point track where they cross. Solving this graphically is one of three equivalent methods — you'll also solve the same kind of system with substitution and elimination below.
One solution at (2.0, 1.0) — the lines cross exactly once.
A system's solution is every point that lies on all of its lines at once — and because two distinct lines can only relate to each other three ways, a linear system can only have one solution, no solution, or infinitely many.
Three methods, one answer, every time:
- Graphing — plot both lines and read off where they cross. Exact only when the crossing lands on a lattice point, like in the diagram above.
- Substitution — solve one equation for a variable, then plug that expression into the other equation. Fastest when a variable already has coefficient 1.
- Elimination — add or subtract a multiple of one equation from the other so a variable's coefficients cancel. Fastest when no coefficient is 1.
All three must land on the same (x, y) — use whichever fits the numbers in front of you.
Two lines in a plane do exactly one of three things: cross once (one solution), run parallel and never touch (no solution), or sit exactly on top of each other (infinitely many solutions). Drag m₂ in the diagram above until it matches m₁ to see the parallel case, then slide b₂ to match b₁ too and watch the lines merge into one.
Two phone plans, each with a flat fee plus a per-minute rate, are two lines in minutes-vs-cost space. The system's solution is the exact number of minutes where both plans cost the same — below that, one plan wins; above it, the other does.
Solve \(2x + 3y = 12\) and \(4x - y = 10\). Multiply the second equation by 3 so the y-terms cancel: \(12x - 3y = 30\). Add it to the first: \((2x+3y) + (12x-3y) = 12+30\), so \(14x = 42\) and \(x = 3\). Substitute into \(4x - y = 10\): \(12 - y = 10\), so \(y = 2\). Solution (3, 2). Check in the first equation: \(2(3)+3(2) = 12\). ✓
Solve \(y = 3x - 2\) and \(2x + y = 8\). Since the first equation already gives y, substitute it into the second: \(2x + (3x - 2) = 8\), so \(5x - 2 = 8\) and \(5x = 10\), giving \(x = 2\). Now finish it: \(y = 3(2) - 2 = \) ____
Reveal the answer
\(y = 3(2) - 2 = 6 - 2 = \) 4, so the solution is (2, 4). Check in the second equation: \(2(2) + 4 = 8\). ✓ Set \(m_1 = 3, b_1 = -2\) and solve for where \(y = -2x + 8\) (the same as \(2x+y=8\) rearranged) crosses it — try those values on the sliders above.
More info — reading the count of solutions from slope and intercept
Write both equations as \(y = mx+b\). If \(m_1 \ne m_2\), the lines must cross exactly once, no matter what \(b_1\) and \(b_2\) are — different slopes guarantee an intersection. If \(m_1 = m_2\), the lines are parallel: they never meet when \(b_1 \ne b_2\) (no solution), and they're the same line when \(b_1 = b_2\) (infinitely many solutions). Algebraically, this shows up as a false statement like "0 = 5" (no solution) or a true one like "0 = 0" (infinitely many) when you try to eliminate a variable and it cancels completely. See the Paul's Online Notes link in Dive deeper for worked inconsistent and dependent examples.
Check your understanding
Solve by substitution: \(y = 2x + 1\) and \(3x + y = 11\).
Two lines in a system have the same slope but different y-intercepts. How many solutions does the system have?
Solve by elimination: \(3x + 2y = 10\) and \(x - 2y = -2\).
Two functions are defined by \(f(x) = 2x - 1\) and \(g(x) = -x + 5\). At what point does \(f(x) = g(x)\), and how does that relate to solving a linear system?
Recap
- A system's solution is every (x, y) that satisfies all its equations at once — for two lines, that's every point they share.
- Three equivalent methods: graphing (read off the crossing), substitution (plug one equation into the other), and elimination (cancel a variable by adding/subtracting).
- Different slopes → exactly one solution, wherever the lines cross.
- Equal slopes, different intercepts → no solution (parallel, never meet). Equal slopes AND equal intercepts → infinitely many solutions (the same line).
Dive deeper
- Math is Fun — Systems of Linear Equations Compare substitution, elimination, and graphing on the same systems.
- Paul's Online Notes — Linear Systems with Two Variables Work through substitution and elimination examples.
- Khan Academy — The substitution method Drill the substitution method with guided practice.
Sources
- Solving Systems of Linear Equations