Skip to content

Linear Equation Solver

Solution

x = 4

Step-by-step
  1. Start: 2x + 3 = 11
  2. Subtract 3 from both sides
  3. 2x = 8
  4. Divide both sides by 2
  5. x = 4

Estimates for educational purposes — not financial, medical, or legal advice. See terms.

Solve a linear equation in one variable, with step-by-step working. Two modes: the simple form ax + b = c where x only appears on one side, and the two-sided form ax + b = cx + d where x appears on both. The solver handles all three possible outcomes — a unique solution, no solution (contradiction), or infinite solutions (identity) — and shows each transformation as a numbered step so you can check the work or copy it into a homework answer.

Simple mode: ax + b = c

This is the classic isolation problem. Given a, b, c, find x. The algorithm is: subtract b from both sides, then divide both sides by a.

  • Unique solution when a ≠ 0. You get x = (c − b) / a.
  • No solution when a = 0 and b ≠ c. The equation reduces to “0 = c − b” which can’t be true.
  • Infinite solutions when a = 0 and b = c. The equation reduces to “0 = 0” which is always true.

The middle two cases are edge cases of the formula — they happen when the coefficient of x itself is zero, so “dividing by a” would be division by zero. The tool handles them explicitly and surfaces the result as a text label rather than returning NaN.

Two-sided mode: ax + b = cx + d

This is the more general form. The algorithm is: subtract cx from both sides, then subtract b, then divide.

  • Unique solution when a ≠ c. You get x = (d − b) / (a − c).
  • No solution when a = c and b ≠ d. The lines are parallel (same slope, different y-intercept).
  • Infinite solutions when a = c and b = d. The two sides describe the same line.

The two-sided case is just a rearrangement of the simple case: rewrite ax + b = cx + d as (a − c)x = d − b, then you have a simple equation with coefficient (a − c) and right-hand side (d − b). The tool does the rearrangement for you and shows the resulting intermediate form as part of the step list.

Example: isolating a variable

2x + 3 = 11. Simple mode, a = 2, b = 3, c = 11. Steps:

  1. Start: 2x + 3 = 11
  2. Subtract 3 from both sides → 2x = 8
  3. Divide both sides by 2 → x = 4

Check: 2(4) + 3 = 11. ✓

Example: a two-sided problem

3x + 2 = x + 10. Two-sided mode, a = 3, b = 2, c = 1, d = 10. Steps:

  1. Start: 3x + 2 = 1x + 10
  2. Subtract x from both sides → 2x + 2 = 10
  3. Subtract 2 from both sides → 2x = 8
  4. Divide both sides by 2 → x = 4

Check: 3(4) + 2 = 14, 1(4) + 10 = 14. ✓

Example: no solution (parallel lines)

2x + 3 = 2x + 5. Two-sided mode, a = 2, b = 3, c = 2, d = 5. Steps:

  1. Start: 2x + 3 = 2x + 5
  2. Subtract 2x from both sides → 0x + 3 = 5
  3. Subtract 3 from both sides → 0 = 2
  4. Contradiction — no value of x works

Graphically: the two lines y = 2x + 3 and y = 2x + 5 have the same slope but different y-intercepts, so they’re parallel and never meet. A word problem that reduces to this pattern usually means two constraints are incompatible.

Example: infinite solutions (identity)

2x + 6 = 2(x + 3). Expand the right side first: 2x + 6 = 2x + 6. Two-sided mode, a = 2, b = 6, c = 2, d = 6. Steps:

  1. Start: 2x + 6 = 2x + 6
  2. Subtract 2x → 0x + 6 = 6
  3. Subtract 6 → 0 = 0
  4. Identity — any value of x works

This comes up when one equation is just a restatement of another, or when you simplify a problem to the point where the variable is no longer constrained.

How the step-by-step is generated

The tool runs the solver, but it doesn’t just compute the answer — it records each transformation as a human-readable line, in the same order a maths teacher would write them on a whiteboard. Subtracting b. Dividing by a. Reaching a contradiction or identity. Each line is a plain numeric expression, no LaTeX, no prose — it’s meant to drop straight into homework or be copied to paper.

What this tool does not do

It doesn’t parse equations as strings. You can’t paste “2x + 3 = 11” into a single input and have it figure out the coefficients. You have to decompose the equation yourself and type the numeric coefficients. For string parsing, a computer algebra system like WolframAlpha or SymPy is the right tool.

It doesn’t solve quadratic, cubic, or higher-degree equations. This is strictly first-degree (linear) in one variable. For quadratics, use the quadratic equation solver. For higher degrees, use a numerical root finder.

It doesn’t solve systems of equations — two equations in two unknowns, three equations in three unknowns, and so on. That’s a separate problem, handled by the system of equations solver in the same category. This tool is for single equations in a single variable.

It doesn’t show graphs. The step-by-step shows the algebra, but not the geometric interpretation. If you want to see the lines meeting at a point (or not meeting, or overlapping), use a graphing tool.

It doesn’t handle symbolic coefficients. Every input must be a plain number. You can’t type “pi” or “sqrt(2)” — compute the numeric value first, then enter it.

Frequently asked questions

What's the difference between the two modes?

The simple mode solves ax + b = c, where x appears only on the left side. The two-sided mode solves ax + b = cx + d, where x appears on both sides. Two-sided is more general — any simple equation can be written as a two-sided one with c = 0 and d = c — but the simple mode is more convenient when the equation is already in standard form. Pick whichever matches how your problem is written.

What does 'no solution' mean for a linear equation?

It means the equation has no value of x that makes both sides equal. This happens when you reduce to something like '0 = 5' — the x terms cancel, and what's left is a plain numeric contradiction. Graphically, you're trying to find where two parallel lines meet, which never happens. Example: 2x + 3 = 2x + 5. Subtract 2x from both sides and you get 3 = 5, which is false. No value of x can fix that.

What does 'infinite solutions' mean?

It means every value of x satisfies the equation — it's an identity, not a real equation. You see this when both sides simplify to the exact same expression. Example: 2x + 6 = 2(x + 3). Expand the right side: 2x + 6 = 2x + 6. The x terms and constants both cancel, leaving 0 = 0, which is always true. This comes up in word problems where one constraint is logically a restatement of another.

Why does the step-by-step show the same subtraction twice for the two-sided mode?

Because two-sided equations need two normalisation steps before you can divide. First, subtract the cx term from both sides to get all x terms on the left: (a−c)x + b = d. Second, subtract b from both sides to get all constants on the right: (a−c)x = d − b. Only then can you divide by the combined coefficient. The step list shows both subtractions explicitly so you can follow the derivation in a maths class or on a worksheet.

Can it solve equations with parentheses or fractions?

Not directly — the tool only takes numeric coefficients, not expressions. If your equation has parentheses, expand them first: 3(x + 2) + 5 = 14 becomes 3x + 11 = 14, so a = 3, b = 11, c = 14. If it has fractions, multiply both sides by a common denominator to clear them, then enter the numeric coefficients that remain. The tool is for the final numeric isolation step, not for symbolic manipulation.