A single equation with one unknown is mechanical: isolate the variable, invert, done. Introduce a second unknown and the problem changes character. You are no longer undoing an operation — you are looking for the single point where two statements about the same two quantities are both true. Everything else about linear systems follows from that picture.
What makes an equation linear
A linear equation in two unknowns has the form ax + by = c, where a, b and c are known numbers. The word linear is doing real work: each unknown appears only to the first power and is never multiplied by another unknown. So 3x + 2y = 11 is linear. 3x + 2y² = 11 is not, because y is squared. xy = 6 is not, because two unknowns sit beside each other. x/y + y = 3 is not, because dividing by an unknown is not reversible in the way the method needs.
Graphically, ax + by = c is a straight line, and the reason is easy to see by rearrangement: y = −(a/b)x + c/b, which is slope-intercept form. If you want that rearrangement done numerically on your own coefficients, the slope intercept calculator shows how a and b map onto the gradient and the vertical intercept.
The test that always works: can you rewrite it as y = mx + b without dividing by, multiplying by, or exponentiating an unknown? If yes, it is linear. The equation solver handles linear and non-linear equations side by side, but the linear case is the one where you can predict the shape of the answer before touching it.
Substitution: replace one unknown with the other
Substitution exploits the fact that a linear equation lets you express any one variable in terms of the other. Take 2x + y = 11. Subtracting y gives 2x = 11 − y, dividing by 2 gives x = (11 − y)/2. Every point on that line satisfies this, so swapping it into the other equation is safe: anywhere the two equations overlap, the new expression for x is still true.
Worked example. Solve the system:
2x + y = 11
x − y = 1
From the first equation, x = (11 − y)/2. Substitute into the second:
(11 − y)/2 − y = 1
Multiply both sides by 2 to clear the fraction: 11 − y − 2y = 2, so 11 − 3y = 2, so −3y = −9, so y = 3.
Back-substitute: x = (11 − 3)/2 = 8/2 = 4.
Check both equations: 2(4) + 3 = 11 and 4 − 3 = 1. Both hold, so the solution is the point (x, y) = (4, 3).
Substitution's weakness is that it creates fractions whenever the leading coefficient is small. Dividing by 2 was harmless here, but dividing by a coefficient of 1/3 would have produced large numerators that are miserable to carry by hand.
Elimination: cancel a variable instead
Elimination does the opposite. Instead of solving for a variable, you arrange the equations so one unknown carries the same coefficient in both, then subtract or add so that unknown disappears.
On the same system, add the two equations directly:
(2x + y) + (x − y) = 11 + 1
3x = 12
x = 4
The y terms cancelled because their coefficients were +1 and −1. Then y = 11 − 2(4) = 3. Same answer, roughly half the writing.
When the coefficients do not already cancel, you scale first. This is the version worth memorising, and it is the one that generalises to three equations. Solve x + 2y = 10 and 3x − y = 5:
Multiply the first equation by 3:
3x + 6y = 30
3x − y = 5
Subtract the second from the first: (3x + 6y) − (3x − y) = 30 − 5, so 7y = 25, so y = 25/7 ≈ 3.571.
Back-substitute into 3x − y = 5: 3x = 5 + 25/7 = 60/7, so x = 20/7 ≈ 2.857.
Check: (20/7) + 2(25/7) = 70/7 = 10 and 3(20/7) − 25/7 = 35/7 = 5. Both hold. Note that this system has fractional answers — elimination does not promise tidy integers, and a result like 20/7 is a correct answer, not a mistake. The system of equations solver returns the exact fractions alongside any decimal form so you can tell the difference at a glance.
The determinant settles the question in advance
Before solving, you can predict how many solutions exist. Write the system as
a₁x + b₁y = c₁
a₂x + b₂y = c₂
and compute d = a₁b₂ − a₂b₁. This is the determinant of the coefficient block, and it decides everything:
- d ≠ 0 — exactly one solution. The two lines cross at one point.
- d = 0 — the lines are parallel or coincident. Zero, or infinitely many.
For the system just solved, d = (1)(−1) − (3)(2) = −1 − 6 = −7. Non-zero, so a unique solution was guaranteed before any arithmetic happened. For a well-posed problem this check is worth doing first: a zero determinant tells you immediately that elimination is about to produce a contradiction or an identity.
Cramer's rule for two unknowns
Cramer's rule expresses each unknown as a ratio of determinants, replacing the column you are solving for with the constants:
x = (c₁b₂ − c₂b₁) / d
y = (a₁c₂ − a₂c₁) / d
Applied to x + 2y = 10 and 3x − y = 5:
d = (1)(−1) − (3)(2) = −7
x = [(10)(−1) − (5)(2)] / (−7) = (−10 − 10)/(−7) = −20/−7 = 20/7 ≈ 2.857
y = [(1)(5) − (3)(10)] / (−7) = (5 − 30)/(−7) = −25/−7 = 25/7 ≈ 3.571
Both routes agree, which is the point: Cramer's rule and elimination are the same algebra rearranged. Cramer's is pleasant when the numbers are tidy and dreadful when they are not, because every unknown costs you a fresh 2×2 determinant.
No solution versus infinitely many
When d = 0 you must decide which degenerate case you are in, and the test is whether the equations are fully proportional or only partially so.
No solution. Consider 2x + 4y = 6 and x + 2y = 2. Here d = (2)(2) − (1)(4) = 4 − 4 = 0. Now check the constants: multiply the second equation by 2 and it becomes 2x + 4y = 4, which contradicts the first equation's 6. Two parallel lines that never meet. Elimination makes this unmistakable — subtract them and you get 0 = 2, which is false. Nothing satisfies both.
Infinitely many solutions. Take x + 2y = 4 and 2x + 4y = 8. Here d = (1)(4) − (2)(2) = 0, and the second equation is exactly twice the first: 2/1 = 4/2 = 8/4 = 2. Subtracting gives 0 = 0, true but useless. The two equations are the same line written twice, so every point on it satisfies both.
The practical recipe: d = 0 means stop and look at the ratios. If a₁/a₂ and b₁/b₂ are equal but c₁/c₂ is not, you have parallel lines and no solution. If all three ratios match, the equations are dependent and infinitely many points work. In code, the system solver reports these as "no solution" and "infinitely many" rather than returning a misleading pair of numbers, because a returned answer in these cases is a sign of an algebraic mistake rather than a solution.
Three equations: cofactor expansion
With three unknowns the same determinant logic applies, and the expansion is longer. Solve:
x + 2y + z = 8
2x − y + 3z = 7
x + y − 2z = 3
Expand the determinant along the first row:
det A = 1[(−1)(−2) − (3)(1)] − 2[(2)(−2) − (3)(1)] + 1[(2)(1) − (−1)(1)]
= (2 − 3) − 2(−4 − 3) + (2 + 1)
= −1 + 14 + 3 = 16
Since det ≠ 0, a unique solution exists. Cramer's rule replaces one column at a time:
Replace the first column with (8, 7, 3): D_x = 8[(−1)(−2) − (3)(1)] − 2[(7)(−2) − (3)(3)] + 1[(7)(1) − (−1)(3)] = 8(−1) − 2(−23) + 10 = 48, so x = 48/16 = 3.
Replace the second column: D_y = 1[(7)(−2) − (3)(3)] − 8[(2)(−2) − (3)(1)] + 1[(2)(3) − (7)(1)] = −23 + 56 − 1 = 32, so y = 32/16 = 2.
Replace the third column: D_z = 1[(−1)(3) − (7)(1)] − 2[(2)(3) − (7)(1)] + 8[(2)(1) − (−1)(1)] = −10 + 2 + 24 = 16, so z = 16/16 = 1.
Check: 3 + 4 + 1 = 8, 6 − 2 + 3 = 7, 3 + 2 − 2 = 3. The solution is (3, 2, 1). Notice that Gaussian elimination and Cramer's rule agree here too — for three equations most people eliminate rather than expand four determinants, and the elimination route to (3, 2, 1) is usually less typing.
The graph picture, and what happens when a curve appears
Each linear equation is a line, and the solution of the system is their intersection. This is not just a picture — it is the reason d = 0 matters. Two lines either cross once, cross never, or overlap completely, and nothing else is possible. If you want the algebra of the line itself, the guide to linear lines and slopes works through gradient and intercept in detail.
There is a useful connection to quadratics hiding here. As long as both equations are linear, eliminating one variable leaves a linear equation in the other, which is why the answer is a single point. But if one relation is curved — say a line and a parabola — substituting one into the other and eliminating produces a quadratic, with up to two solutions. That is the structural difference the quadratic equation solver exists to handle: same elimination idea, different degree, and a discriminant that decides between one root, two roots, or none. The quadratic formula guide takes that from there.
The isolating step also shows up in places that do not look algebraic at all. A weighted average is a linear combination of the same kind, which is why weighted GPA computation is a linear system in disguise, and why an optimal decision under uncertainty often needs simultaneous equations rather than a single one — see probability in everyday life for that connection.
Where systems actually turn up
Mixture problems. Two barrels hold 40 L together: one at 12% acid, one at 30%, and the mixture must be 18%. Let x be the litres of 12% and y the litres of 30%. The volume constraint is x + y = 40. The acid constraint is 0.12x + 0.30y = 0.18 × 40 = 7.2. Multiply the second by 100 to clear decimals: 12x + 30y = 720. Substituting x = 40 − y gives 12(40 − y) + 30y = 720, so 480 − 12y + 30y = 720, so 18y = 240, so y = 40/3 ≈ 13.33 L of the 30% solution and x = 80/3 ≈ 26.67 L of the 12% one. Check the concentration: (0.12 × 26.67 + 0.30 × 13.33)/40 = (3.20 + 4.00)/40 = 0.18 exactly.
Break-even. A product sells for 50 with a variable cost of 30 per unit, so each unit contributes 20 toward fixed costs of 12,000 per month. Break-even quantity is 12,000 / (50 − 30) = 600 units. That is really the equation 50q − 30q = 12,000 in disguise, and it is why the margin figure — not the price — is the number worth knowing. The percentage calculator handles the margin percentage the same way.
Electrical circuits. A 12 V source with 1 Ω of internal resistance driving a 5 Ω load gives a current of I = 12/(1 + 5) = 2 A. Kirchhoff's voltage law around the loop is 12 − I(1) − I(5) = 0: one equation, one unknown, linear. Add a second branch and it becomes a genuine two-unknown system.
Age problems. A father is three times as old as his son, and in ten years he will be twice as old. With y the son's current age: 3y + 10 = 2(y + 10), so 3y + 10 = 2y + 20, so y = 10. The father is 30 and the son 10. Ten years on they are 40 and 20, and 40 = 2 × 20 confirms it.
Mistakes that account for most wrong answers
Forgetting that d = 0 changes the question. Dividing by zero somewhere in elimination usually means the system is degenerate, not that you made an arithmetic slip. Recognising that is the whole point.
Sign errors when subtracting a negative coefficient. In the scaled example above, (3x + 6y) − (3x − y) becomes +7y, not 5y. Writing the subtraction as "keep, flip, add" on each term slows you down but removes the error class.
Dropping a variable halfway through. With three unknowns it is easy to eliminate x, forget y exists, and solve a reduced system as if it were the original.
Treating a fractional answer as a wrong answer. 20/7 is exact. If a tool displays 2.857 and you expected 4, the discrepancy is in the system you typed, not in the arithmetic.
Frequently asked questions
What makes an equation linear rather than quadratic?
Each unknown appears only to the first power and is never multiplied by another unknown. So 3x + 2y = 11 is linear, while 3x + 2y² = 11 and xy = 6 are not. The practical test is whether you can rearrange it into y = mx + b without dividing by an unknown.
How do I know if a system has no solution or infinitely many?
Compute the determinant d = a₁b₂ − a₂b₁. If d is not zero there is exactly one solution. If d = 0, check whether a₁/a₂ equals b₁/b₂. If the constants break that same proportion the lines are parallel and there is no solution; if everything including constants is proportional, infinitely many points satisfy both.
Is substitution or elimination better for two equations?
Substitution is cleaner when one coefficient is 1 or −1, because isolating a variable causes no fractions. Elimination is better when coefficients are large or messy, since it avoids dividing and works identically for three or more equations. Both always give the same answer if carried out correctly.
Why does Cramer's rule fail when the determinant is zero?
Cramer's rule divides by the determinant to recover each unknown, so a zero determinant makes every quotient undefined. That failure is meaningful rather than a glitch: a zero determinant means the system is degenerate, so you must return to elimination and classify it as inconsistent or underdetermined.