Free Tool · One Variable · Step-by-Step

Linear Equation Solver

Solve ax + b = c for x with full working and handling for the special a = 0 cases.

Equation: a x + b = c

What this linear equation solver does

This tool solves any linear equation of the form ax + b = c for the unknown x. It shows each algebraic step — moving the constant to the right side, then dividing by the coefficient — and reports the answer in exact form (as a simplified fraction) as well as a decimal. The solver also handles the two special cases when the coefficient a equals zero: either no solution exists, or every real number is a solution. It accepts whole numbers, decimals, and negative values for all three coefficients.

Formulas and method

Standard form
a x + b = c    (a ≠ 0)
Step 1 — isolate the x term
a x = c − b
Step 2 — divide both sides by a
x = c − b a
Special case a = 0
If a = 0 and b = c:  equation is 0 = 0  →  infinitely many solutions. If a = 0 and b ≠ c:  equation is b = c which is false  →  no solution.

Variable definitions

  • a — coefficient of the unknown x. Must be non-zero for a unique solution.
  • b — constant term on the left side.
  • c — constant on the right side.
  • x — the unknown we solve for.

Worked examples

Example 1: 3x + 5 = 20

  1. Subtract 5 from both sides: 3x = 20 − 5 = 15.
  2. Divide both sides by 3: x = 15 ÷ 3.
  3. Result: x = 5
  4. Check: 3(5) + 5 = 15 + 5 = 20 ✓

Example 2: 2x − 7 = 11

  1. Add 7 to both sides: 2x = 11 + 7 = 18.
  2. Divide both sides by 2: x = 18 ÷ 2.
  3. Result: x = 9
  4. Check: 2(9) − 7 = 18 − 7 = 11 ✓

Example 3: 5x + 3 = 8 (fraction answer)

  1. Subtract 3: 5x = 8 − 3 = 5.
  2. Divide by 5: x = 5 ÷ 5.
  3. Result: x = 1

Example 4: 4x + 7 = 10 (fraction answer)

  1. Subtract 7: 4x = 10 − 7 = 3.
  2. Divide by 4: x = 3/4.
  3. Result: x = 3/4 = 0.75

Example 5: 0x + 5 = 5 (infinitely many solutions)

  1. With a = 0, the equation becomes 5 = 5, which is always true.
  2. Every real value of x satisfies it.
  3. Result: infinitely many solutions.

Example 6: 0x + 5 = 3 (no solution)

  1. With a = 0, the equation becomes 5 = 3, which is false.
  2. No value of x can make it true.
  3. Result: no solution.

Example 7: −3x + 4 = 10

  1. Subtract 4: −3x = 6.
  2. Divide by −3: x = 6 ÷ (−3) = −2.
  3. Result: x = −2
  4. Check: −3(−2) + 4 = 6 + 4 = 10 ✓

Where linear equations appear in Class 9 & 10

Linear equations are the foundation of algebra and appear in many chapters across the Punjab board syllabus:

  • Word problems — age problems, number problems, and rate problems reduce to linear equations.
  • Ratio and proportion — proportions can be converted to linear equations by cross-multiplication.
  • Coordinate geometry — the equation of a line y = mx + c is linear in x and y.
  • Physics formulas — rearranging v = u + at for t is solving a linear equation.
  • Chemistry stoichiometry — balancing simple reactions often requires solving linear equations.

Common mistakes to avoid

  • Subtracting b from only one side. Whatever you do to one side of an equation, you must do to the other. Subtracting 5 from the left but not the right breaks the equality.
  • Sign errors when moving terms. Moving +3 to the other side changes it to −3, not stays +3. Always reverse the sign when you move a term across the equals sign.
  • Dividing only the first term. In ax = c − b, dividing both sides by a gives x = (c − b) / a. If you write x = c/a − b, that is wrong — the whole right side must be divided by a.
  • Assuming a = 0 has a unique solution. When a = 0, either every x works or no x works. There is no single solution. The calculator handles this case explicitly.
  • Forgetting to check the answer. Substituting x back into the original equation catches most sign and arithmetic errors. Always verify in a test or exam.
  • Simplifying fractions incorrectly. x = 6/4 should be simplified to 3/2. Leaving it unsimplified costs marks.

FAQ

What is a linear equation?

A linear equation is one in which the unknown variable appears only to the first power, not squared, cubed, or under a root. The standard form ax + b = c is the simplest example. Linear equations always have exactly one solution unless a = 0, in which case they have either no solution or infinitely many.

How do I solve ax + b = c?

Isolate x by reversing the operations. First subtract b from both sides to get ax = c − b. Then divide both sides by a to get x = (c − b) / a. This works as long as a is not zero.

What if a = 0?

If a = 0 and b = c, the equation becomes 0 = 0, which is true for every x. There are infinitely many solutions. If a = 0 and b ≠ c, the equation becomes a false statement (like 3 = 5), so there is no solution. This calculator detects both cases and reports them clearly.

Can a linear equation have more than one solution?

A linear equation in one variable has exactly one solution, no solution, or infinitely many solutions. It cannot have two or three distinct solutions. That behaviour belongs to higher-degree equations like quadratics.

How do I check my answer?

Substitute your value of x back into the original equation and check that both sides are equal. For example, if 3x + 5 = 20 and x = 5, then 3(5) + 5 = 15 + 5 = 20 ✓. The substitution check catches most arithmetic mistakes.

How do I solve equations with fractions?

Two approaches work. You can clear the fractions by multiplying every term by the lowest common multiple of the denominators, which converts the equation into whole numbers. Or you can work with fractions directly — either way gives the same answer. This calculator accepts decimal coefficients, so you can convert fractions to decimals and enter them directly.

Related tools

Related Hira Academy resources

Linear equations are the foundation of algebra. Revise solving techniques with our free Class 9 notes and Class 10 notes.

↑