Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Linear Equation Solver

x

Solve linear equations step by step

Enter equation...
Var
Num
Op

Select an equation type or enter your own equation, then click Solve to see the step-by-step solution.






Getting Started

The solver shows an equation display at the top with a blinking yellow caret marking the cursor position. Click anywhere in the display to move the cursor, or use arrow keys, Home, and End for keyboard navigation. Type directly with your keyboard or use the button panel below.

Three quick experiments:

• Type 2x+3=112x + 3 = 11 and press Enter — the right panel shows the step-by-step solution: identify terms, move constants to the right, divide by the coefficient. Final answer x=4x = 4.
• Click an example template like "Two Step" — a random equation of that form loads into the display.
• Use brackets and the multiplication operator to enter things like 3(x+2)=153 \cdot (x + 2) = 15.

The Solve button is disabled until you enter something. Pressing Enter on the display is equivalent to clicking Solve. The graph panel shows the underlying line y=ax+by = ax + b with the solution marked on the x-axis.

Building Equations with Buttons and Keyboard

The button panel groups inputs by type. All inputs can be made either by clicking or typing on the keyboard.

• Variable row — xx, yy, nn. The solver picks up whichever variable appears in your equation.
• Number row — digits 0 through 9 and the decimal point.
• Operator row — multiplication, division, plus, minus, equals.
• Bracket buttons — open and close parentheses for grouping.

Keyboard shortcuts work as expected: type letters and digits directly, use star or slash for multiplication and division (auto-converted to proper symbols on display), and press Enter to solve. Ctrl+Z undoes the last action up to fifty edits back; Backspace deletes the character before the cursor; Delete removes the character after it.

The Clear button empties the display entirely; the curved-arrow button steps back through the undo stack one edit at a time.

Try an Example — Eight Form Templates

Click the "Try an Example" header to expand the template panel. Each card generates a random equation of that form. Clicking the same card again produces a new random version.

• One Step — x+a=bx + a = b. Simplest case.
• Two Step — ax+b=cax + b = c. The standard introductory form.
• Variables Both Sides — ax+b=cx+dax + b = cx + d. Requires moving the variable.
• Distributive — a(x+b)=ca(x + b) = c. Practice expanding brackets.
• Fraction Coefficient — x/a+b=cx / a + b = c. Practice clearing fractions.
• Identity — ax+b=ax+bax + b = ax + b. Always true.
• Contradiction — ax+b=ax+cax + b = ax + c with bcb \neq c. Never true.
• Multi-Step — a(bx+c)+d=ea(bx + c) + d = e. Combines multiple techniques.

Roughly 80 percent of generated equations have clean integer solutions; the rest produce fractional answers to practice exact computation.

Reading the Step-by-Step Solution

The solution panel on the right shows each algebraic move as a labeled step.

• Identify Terms — extracts the coefficient and constant from each side.
• Move Variable Terms to Left — subtracts the right-side variable term from both sides.
• Move Constants to Right — moves the left-side constant to the other side.
• Divide by Coefficient — isolates the variable for the final answer.

Each step displays the equation in its before-and-after form with a transformation arrow between them. The final answer card at the bottom shows x=x = value, marked as Exact when the solution is a clean integer or fraction, or Approximate when it requires decimal expansion.

For equations with brackets, the solver expands them implicitly when collecting terms — the display applies distribution before identifying coefficients rather than showing it as a separate visible step.

Identity, Contradiction, and Special Cases

The solver detects two structural cases that look like linear equations but do not have a single numerical solution.

• Identity — all variable terms cancel and the constants match. The equation reduces to something true like 0=00 = 0. Solution set is all real numbers. The final answer card displays "All real numbers" with a check mark.
• Contradiction — all variable terms cancel but the constants do not match. The equation reduces to a false statement like 0=50 = 5. There is no solution. The final answer card displays "No solution" with a cross mark.

These cases arise naturally when both sides of the equation are scalar multiples of each other, or when they differ only by a constant. The solver flags them explicitly rather than producing a meaningless numerical answer or crashing on division by zero.

Try the Identity and Contradiction templates from the example panel to see both cases in action.

What is a Linear Equation?

A linear equation in one variable is an equation of degree 1 in that variable:

ax+b=cax + b = c


where aa, bb, and cc are constants and a0a \neq 0. More generally, both sides can be linear expressions:

ax+b=cx+dax + b = cx + d


The defining property: each side is a polynomial of degree at most 1 in the variable. No powers higher than 1, no variable in denominators, no roots, no logs, no exponentials involving the variable.

Geometrically, y=ax+by = ax + b defines a straight line in the plane. Solving ax+b=cax + b = c amounts to finding the x-coordinate where that line crosses the horizontal line y=cy = c. The graph panel in the solver shows exactly this intersection point.

For deeper coverage see linear equations theory, slope-intercept form, and first-degree polynomials.

The Solving Process Explained

Three algebraic moves are sufficient to solve any linear equation.

• Combine like terms on each side — collect everything into the form a1x+b1=a2x+b2a_1 x + b_1 = a_2 x + b_2 where the coefficients and constants are explicit numbers. This step also handles distribution of brackets.
• Move variable terms to one side, constants to the other — subtract a2xa_2 x from both sides, then move b1b_1 to the right. The equation now reads (a1a2)x=b2b1(a_1 - a_2) x = b_2 - b_1.
• Divide by the coefficient — if a1a20a_1 - a_2 \neq 0, divide both sides by it. The result is x=(b2b1)/(a1a2)x = (b_2 - b_1) / (a_1 - a_2).

If a1a2=0a_1 - a_2 = 0, the variable cancels. Then either b1=b2b_1 = b_2 (identity, every value works) or b1b2b_1 \neq b_2 (contradiction, no value works).

Each move preserves the solution set because applying the same operation to both sides of an equation yields an equivalent equation.

For comprehensive treatment see solving linear equations, balancing equations, and equivalent equations.

Related Concepts

Linear Inequalities &mdash; same form as linear equations but with <<, >>, \leq, or \geq in place of equality. Solved with the same moves, plus sign-flipping when multiplying or dividing by a negative.

Systems of Linear Equations &mdash; two or more linear equations in two or more variables solved simultaneously. Geometrically the intersection of lines or planes.

Slope-Intercept Form &mdash; y=mx+by = mx + b. The same equation cast as a line in coordinate geometry, with mm the slope and bb the y-intercept.

Literal Equations &mdash; formulas with multiple variables rearranged to solve for any chosen variable. Same moves apply.

Quadratic Equations &mdash; degree 2 in the variable. Solved by factoring, completing the square, or the quadratic formula.

Linear Functions &mdash; functions of the form f(x)=mx+bf(x) = mx + b. The graph is a straight line.

Identity vs Contradiction &mdash; the two degenerate cases of linear equations where no unique numerical solution exists.