Linear Equations

Why Linear Equations in One Variable Have Zero, One or Infinitely Many Solutions

A clear proof that every linear equation in one unknown reduces to ax = b, which allows only three outcomes and never two.

Key takeaways

  • A linear equation in x simplifies by reversible steps to the form ax = b.
  • When a is not zero, dividing by a gives one solution and proves there is no other.
  • When a is zero the unknown disappears, and the remaining statement is either always false or always true.
  • If two different numbers both solve a linear equation, then every number solves it.
  • The result relies on being able to divide by any nonzero number, which some number systems do not allow.

Every linear equation in one variable can be rewritten as ax = b, where a and b are fixed numbers. If a is not zero, there is exactly one solution, x = b/a. If a is zero and b is not, there is no solution. If both are zero, every number is a solution. There are no other cases, so no linear equation can have exactly two, or exactly seven, solutions.

The rest of this article shows why, assuming the numbers are real, and then looks at where the conclusion depends on that assumption.

Reducing to the standard form

A linear equation in one variable is one that can be built from numbers and the unknown using addition, subtraction and multiplication or division by constants, with no x², no products of x with itself and no x in a denominator. After expanding brackets, each side looks like (number)·x + (number).

mx + p = nx + q
mx − nx = q − p           (subtract nx and p)
(m − n)x = q − p          (factor out x)

Set a = m − n and b = q − p. Every step added or subtracted a quantity that exists for every x, so the new equation has the same solutions as the old one. Such equivalence-preserving moves are why studying ax = b is enough.

Case one: a is not zero

Two claims need proof: a solution exists, and there is only one.

Existence is a substitution: a · (b/a) = b, so b/a works.

Uniqueness takes one more line. Suppose r and s both solve the equation.

ar = b   and   as = b
ar − as = 0              (subtract)
a(r − s) = 0             (factor)
r − s = 0                (a ≠ 0, so the other factor must be zero)
r = s

Any two solutions are the same number. For example, 7x − 3 = 2x + 12 reduces to 5x = 15, so the single solution is 3. Both sides equal 18 there.

Note that b may be zero in this case. The equation 5x = 0 has exactly one solution, x = 0. A solution of zero is a solution like any other.

Cases two and three: a is zero

If a = 0, the left side is 0 · x, which equals 0 whatever x is. The equation says 0 = b, and x no longer has any influence.

If b ≠ 0, the statement is false for every x. Take 2(3x + 4) = 6x + 1. Expanding gives 6x + 8 = 6x + 1, so 8 = 1. The solution set is empty.

If b = 0, the statement is true for every x. Take 3(x − 2) + x = 4x − 6. The left side simplifies to 4x − 6, so the equation reduces to 0 = 0. Every real number solves it.

The three outcomes of ax = b
a ≠ 0 Exactly one solution x = b/a Lines cross once a = 0, b ≠ 0 No solution Reads as a false statement Parallel, separate lines a = 0, b = 0 Every number works Reads as 0 = 0 The two lines coincide a ≠ 0 Exactly one solution x = b/a Lines cross once a = 0, b ≠ 0 No solution Reads as a false statement Parallel, separate lines a = 0, b = 0 Every number works Reads as 0 = 0 The two lines coincide

These three exhaust the possibilities: either a is zero or it is not, and when it is, either b is zero or it is not.

Why never exactly two

Here is the same fact from another angle. Suppose r and s are two different solutions of ax = b. Subtracting gives a(r − s) = 0. Since r − s is not zero, a must be zero. Then b = a · r = 0, so the equation is 0x = 0, and everything solves it.

In other words, one solution too many forces infinitely many. You can even see the others appear: for any number t, the value r + t(s − r) satisfies the equation, since a times it equals ar + t(as − ar) = b + 0.

This explains why a table that shows two inputs making both sides of a linear equation equal is conclusive. The two sides are then the same expression after simplifying.

Worked examples of each outcome

Three equations can look almost alike and land in three different cases.

4(x + 1) − x = 2x + 9
3x + 4 = 2x + 9          → 1·x = 5        one solution, x = 5

4(x + 1) − x = 3x + 9
3x + 4 = 3x + 9          → 0·x = 5        no solution

4(x + 1) − x = 3x + 4
3x + 4 = 3x + 4          → 0·x = 0        every number

Check the first: 4 · 6 − 5 = 19 and 2 · 5 + 9 = 19. For the third, try any value, say x = 10: the left side is 44 − 10 = 34 and the right side is 34.

One test value can refute a claim of "every number" but cannot prove it. Two different test values can, by the argument above, since two solutions of a linear equation force all numbers to be solutions. That shortcut is available only after you know the equation really is linear.

The picture with two lines

Graph each side of mx + p = nx + q separately, as y = mx + p and y = nx + q. A solution is the x-coordinate of a point where the graphs meet.

  • If m ≠ n, the slopes differ and the lines cross at exactly one point.
  • If m = n and p ≠ q, the lines are parallel and distinct, so they never meet.
  • If m = n and p = q, there is only one line drawn twice, and every x gives a shared point.

Two different straight lines cannot cross twice, because only one line passes through two given points. That is the geometric form of the uniqueness proof. See solving by graphing both sides. A graph can mislead about nearly parallel lines, which may cross far outside the window, so let the algebra decide.

Parameters make all three appear

When the coefficients contain a letter, one equation can show every outcome. Solve (k − 2)x = k² − 4 for x.

The coefficient is k − 2, and the right side factors as (k − 2)(k + 2).

Value of k Equation becomes Solutions
k ≠ 2 x = k + 2 exactly one
k = 2 0x = 0 every number

Now try (k − 3)x = 5. If k ≠ 3, then x = 5/(k − 3). If k = 3, the equation is 0x = 5 and has no solution.

Dividing by a coefficient that contains a letter, without separating the zero case, is a classic error. Finding constants that make identities turns the infinite case into a design goal.

Where the theorem can fail

The proof divided by a. That is fine in the rational, real and complex numbers, where every nonzero number has a reciprocal. Other systems behave differently.

Over the integers, 2x = 3 has a nonzero coefficient and no solution, because 3/2 is not an integer.

In clock arithmetic modulo 6, where only remainders after division by 6 are kept, the congruence 2x ≡ 4 has two solutions among 0 to 5.

x = 2:   2·2 = 4    ≡ 4  (mod 6)
x = 5:   2·5 = 10   ≡ 4  (mod 6)

Here a(r − s) = 0 does not force a factor to be zero, since 2 · 3 = 6 counts as zero. Modulo a prime such as 5 every nonzero number has a reciprocal, and 2x ≡ 4 has the single solution x = 2.

What is not linear

The three-outcome rule belongs to linear equations only. The equation x² = 4 has exactly two real solutions, and so does |x − 1| = 3, whose solutions are 4 and −2.

An equation can also look linear after simplification while carrying a restriction. The equation (x − 1)/(x − 1) = 1 reduces to 1 = 1, yet its solutions are all real numbers except 1. Keep the original domain in your answer. A related warning applies to equations with a variable in the denominator, where a lone candidate may turn out to be excluded, leaving none.

Fractions and decimals do not add cases

Constants in the denominator are still constants. In x/2 + x/3 = 5x/6 + 1, the left side is 5x/6, so the equation says 0 = 1 and has no solution. Multiplying by 6 first gives 5x = 5x + 6, with the same verdict.

The coefficient a may also be tiny without being zero. The equation 0.001x = 4 has one solution, x = 4000. A coefficient that merely looks negligible must not be treated as zero, and rounding it away would move the equation into a different case.

With irrational numbers the test is the same. In √2·x + 1 = 1.414x, the coefficients √2 and 1.414 are close but different, so there is exactly one solution, a large negative number. Replacing √2 with its rounded value would wrongly report none.

Reading the outcome in a story

The three cases have plain meanings in applications. Say two hypothetical phone plans cost a fixed fee plus a charge per gigabyte, and you ask at what usage x they cost the same.

If the per-gigabyte charges differ, there is one value of x where the costs match. It is meaningful only if it is not negative, so a negative answer means that one plan is cheaper at every real usage. If the charges match but the fees differ, the plans never cost the same. If both match, they cost the same at every usage. Here the domain is x ≥ 0, so a unique algebraic solution can still leave the practical question with no answer.

Deciding quickly

  1. Simplify each side to the form (coefficient)·x + constant.
  2. Compare coefficients. If they differ, expect one solution and solve for it.
  3. If they match, compare constants. Unequal constants mean no solution; equal constants mean every number in the domain.
  4. Reattach any restrictions from the original form.

For instance, in 5x + 2(1 − x) = 3x + 2 the left side is 3x + 2, matching the right in both coefficient and constant, so all real numbers work.

Written for 4Algebra with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 36 articles in Linear Equations →

Latest news on this topic