Algebra • Linear Equations

Linear Equation Solver (Single Variable)

Solve first-degree linear equations step-by-step with automatic parenthesis expansion, fractional clearing, like-term isolation, identity and contradiction detection, and real-time substitution verification.

|
Last Updated: September 2026
|
Verified Accurate: Mathematical & Computational Rigor
Algebraic Solver • 1-Variable System

Single-Variable Linear Equation Solver

Solve any linear equation step-by-step with parenthesis expansion, like-term grouping, identity/contradiction detection, and real-time verification.

Presets:

Supports parentheses 3(x - 4), negative terms, and decimal or fractional coefficients.

Insert:
Exact Solution:
x = 5
Decimal: 5.0000 • Integer root
Unique Solution
Substitution Verification Check
LHS: 5(5) + 3 = 28
RHS: 2(5) + 18 = 28
28 = 28 ✓ Identity Verified True
Equation Diagnostics
Linear Variable: x
Simplified Form: 3x = 15
Coefficient Multiplier: 3
Real Number Line Solution Root Point at x = 5
0 x = 5
Real Coordinate Scale ℝ

Step-by-Step Solution Breakdown

Algorithmic Balance Steps
Direct Answer & Overview
Verified Educational Guide

How to Solve Single-Variable Linear Equations

To solve a single-variable linear equation in the general form ax + b = cx + d, collect all variable terms on one side and all constant numbers on the opposite side using inverse operations. Subtract cx from both sides to obtain (a - c)x + b = d. Then subtract b from both sides to get (a - c)x = d - b. Finally, divide both sides by the net coefficient (a - c) to yield the exact root: x = (d - b) / (a - c), provided a ≠ c.

Primary Mathematical Formula Universal Analytical Solution of First-Degree Equations
Standard Equation
ƒ(x)
Q.E.D.
ax+b=cx+d  ⟺  (a−c)x=d−b  ⟹  x=d−ba−c(a≠c)ax + b = cx + d \iff (a - c)x = d - b \implies x = \frac{d - b}{a - c} \quad (a \neq c)
Yields a unique real root when a ≠ c; yields infinite solutions if 0 = 0, or no solution if 0 = k (k ≠ 0)
Exact Formula
Input Parameters
Required
1
Linear Equation String: Any balance expression containing variable x (e.g., 5x + 3 = 2x + 18)
2
Grouping Delimiters: Parentheses specifying distributive products
3
Coefficient Types: Real integers, rational fractions, or decimal scalars
Expected Outputs
Calculated
Exact Solution Root: Fractional and decimal value of the unknown variable x
Solution Classification: Unique root, Identity (all real numbers), or Inconsistent contradiction
Verification Proof: Independent LHS and RHS evaluations demonstrating algebraic truth
Geometric Coordinate: Precise location marked on the calibrated real number line
Worked Numerical Example
Instant Verification
Solve 4(x - 2) = 2(x + 6) for x.
1 Expand parentheses on both sides: 4x - 8 = 2x + 12
2 Subtract 2x from both sides to collect variable terms: 2x - 8 = 12
3 Add 8 to both sides to isolate variable term: 2x = 20
4 Divide both sides by 2: x = 10
5 Verify substitution: LHS = 4(10 - 2) = 32; RHS = 2(10 + 6) = 32 (Identity verified)
Result: x = 10 (Unique Solution; Verified True).

The Axiomatic Foundations: Four Properties of Equality

At its mathematical heart, an equation is an assertion of numerical balance. Just as a physical two-pan balance scale remains level as long as identical weights are added to or removed from both pans, an algebraic equation remains true as long as identical operations are performed on both sides of the equals sign.

The rigorous validity of every step in equation solving rests upon four fundamental algebraic axioms known as the Properties of Equality:

Addition Property of Equality

If a = b, then for any real number c:

a + c = b + c

Used to eliminate subtracted constant terms from the variable's side.

Subtraction Property of Equality

If a = b, then for any real number c:

a − c = b − c

Used to eliminate added terms and group variables onto one side.

Multiplication Property of Equality

If a = b, then for any real number c ≠ 0:

a · c = b · c

Used to clear fractions by multiplying by common denominators.

Division Property of Equality

If a = b and c ≠ 0:

a / c = b / c

Used as the final step to isolate the single variable from its coefficient.

Because each operation is reversible (an invertible transformation), the sequence of modified equations forms an equivalence chain: the solution set of the final statement (x = k) is strictly identical to the solution set of the original complex problem.

Anatomy of First-Degree Equations (ax + b = cx + d)

A linear equation in one variable (also termed a first-degree polynomial equation) is characterized by an unknown variable raised strictly to the first power (x¹ = x). No exponents, radicals, variable denominators (1/x), or cross-products appear.

The most comprehensive standard form of a single-variable linear equation with terms on both sides is:

ax + b = cx + d

Where a, b, c, d ∈ ℝ:

  • Variable Terms (ax, cx): The terms containing the unknown quantity x.
  • Constant Terms (b, d): Fixed real scalars independent of x.
  • Leading Coefficients (a, c): The rate multipliers governing how rapidly each side scales as x varies. To explore how leading coefficients govern higher-degree polynomials, visit our Leading Coefficient Identifier.

The Five-Stage Systematic Balance Algorithm

Every solvable single-variable linear equation, regardless of how intricate, yields to the following deterministic five-stage algorithm:

Stage 1: Clear Fractions and Decimals

If the equation contains fractional coefficients, determine the least common multiple (LCM) of all denominators. Multiply every single term on both sides by this common denominator. Fractions evaporate immediately, reducing computational friction.

Stage 2: Expand Parentheses via Distributive Law

Apply the distributive property: A(B + C) = AB + AC. Pay extreme attention to distributing negative signs across all terms enclosed within parentheses: -(3x - 5) = -3x + 5.

Stage 3: Combine Like Terms on Each Side Separately

Before moving quantities across the equals sign, combine all variable terms on the left side into a single term, and combine all constants on the left side into a single constant. Repeat this independently on the right side.

Stage 4: Segregate Variable and Constant Terms

Use addition or subtraction to collect all variable terms onto the left side ((a - c)x) and all numerical constants onto the right side (d - b). This produces the isolated two-term statement Ax = B.

Stage 5: Divide by the Leading Coefficient

Divide both sides by the net coefficient multiplier A. This yields x = B / A. Reduce the resulting fraction to simplest form.

Solution Classifications: Unique, Identity & Contradiction

When solving first-degree equations, the net variable coefficient Δm = (a − c) and net constant Δk = (d − b) establish three mutually exclusive mathematical outcomes:

Classification Algebraic Condition Final Simplified Form Number of Solutions Geometric Interpretation
Conditional Equation a ≠ c (Δm ≠ 0) x = k Exactly One (Unique) Two intersecting lines crossing at a single coordinate point
Identity Equation a = c and b = d 0 = 0 (or k = k) Infinitely Many (ℝ) Two coincident lines sharing every single point along their path
Inconsistent Contradiction a = c and b ≠ d 0 = k (k ≠ 0) Zero (Empty Set ∅) Two distinct parallel lines that maintain separation and never meet

Recognizing an identity (0 = 0) or contradiction (0 = 5) immediately halts the calculation and prevents futile attempts to divide by zero.

Five Step-by-Step Equation Solving Walkthroughs

Study how diverse linear equations are resolved through meticulous algebraic balance:

Example 1: Classic Two-Step Linear Equation ax + b = c
3x - 7 = 14
1. Isolate variable term: Add 7 to both sides → 3x = 14 + 7 = 21.
2. Isolate variable: Divide both sides by 3 → x = 21 / 3.
3. Result: x = 7.
4. Verification: Substitute x = 7: 3(7) - 7 = 21 - 7 = 14 ✓ True.
Example 2: Variables and Constants on Both Sides ax + b = cx + d
5x + 3 = 2x + 18
1. Group variables: Subtract 2x from both sides → 3x + 3 = 18.
2. Group constants: Subtract 3 from both sides → 3x = 15.
3. Normalize: Divide by 3 → x = 5.
4. Verification: LHS = 5(5) + 3 = 28; RHS = 2(5) + 18 = 28 ✓ True.
Example 3: Distributive Parentheses on Both Sides a(x + b) = c(x + d)
4(x - 2) = 2(x + 6)
1. Distribute 4 on left: 4x - 8; Distribute 2 on right: 2x + 12.
2. Equivalent equation: 4x - 8 = 2x + 12.
3. Subtract 2x from both sides: 2x - 8 = 12.
4. Add 8 to both sides: 2x = 20 &implies; x = 10.
5. Verification: LHS = 4(10 - 2) = 32; RHS = 2(10 + 6) = 32 ✓ True.
Example 4: Fractional Coefficients with Common Denominator Rational Arithmetic
(1/2)x + 3 = (3/4)x - 1
1. Find LCD of denominators 2 and 4: LCD = 4.
2. Multiply every term by 4: 4 · (1/2)x + 4 · 3 = 4 · (3/4)x - 4 · 1 &implies; 2x + 12 = 3x - 4.
3. Subtract 2x from both sides: 12 = x - 4.
4. Add 4 to both sides: x = 16.
5. Verification: LHS = (1/2)(16) + 3 = 11; RHS = (3/4)(16) - 1 = 12 - 1 = 11 ✓ True.
Example 5: Inconsistent Contradiction (No Solution) Empty Set
3(x + 2) = 3x + 10
1. Distribute left side: 3x + 6 = 3x + 10.
2. Subtract 3x from both sides: 6 = 10.
3. Analyze statement: 6 = 10 is an impossible contradiction.
4. Conclusion: No Solution (∅). There is no real number that satisfies the equation.

Formal Substitution & Error Checking Protocol

The defining hallmark of disciplined algebraic problem solving is backward verification. Unlike speculative approximations, an exact algebraic solution can be proved 100% correct before submitting an exam or running production code.

The Three-Step Verification Protocol:
1. Copy the un-modified original equation exactly as initially stated.
2. Replace every single occurrence of the variable symbol with parentheses enclosing the candidate root: x → (x_sol).
3. Evaluate the arithmetic on both sides completely independently without moving numbers across the equals sign.

If evaluating both sides independently collapses to an identical number (28 = 28), the root is guaranteed accurate. If the two sides disagree (28 = 34), an arithmetic or sign distribution error occurred during algebraic manipulation.

Real-World Applications in Engineering, Science & Finance

Linear equations are the most widespread mathematical model across industrial and financial systems:

Electrical Engineering: Ohm’s & Kirchhoff’s Laws

In resistive DC circuits, voltage drop follows V = IR. Applying Kirchhoff's Voltage Law across a loop yields linear single-variable equations such as 12 − 4I − 2I = 0, solved instantly for current I = 2 amperes.

Corporate Finance: Break-Even Volume Analysis

Companies determine the sales volume q required to cover total costs by equating Revenue to Cost: P · q = V · q + FC. For price $50, variable cost $20, and fixed costs $9,000, solving 50q = 20q + 9000 yields the break-even quantity q = 300 units.

Analytical Chemistry: Solution Dilution

Chemists prepare precise concentrations using the dilution equation C₁ V₁ = C₂ V₂. To find the volume of solvent required to dilute a stock solution, the relation reduces directly to a single-variable linear equation.

Thermal Physics: Temperature Scale Conversions

Converting between Fahrenheit and Celsius uses the linear mapping F = (9/5)C + 32. Finding the unique temperature where both scales read identical values requires solving the linear equation x = (9/5)x + 32, yielding x = -40°.

Common Pitfalls, Sign Traps & Verification Checklist

Guard against these classic mathematical traps when solving single-variable equations:

Pitfall 1: Failing to Distribute Negative Signs Through Parentheses

In expressions like -(2x - 7), students frequently write -2x - 7. The negative applies to both terms: -2x + 7. A sign error here corrupts all downstream calculations.

Pitfall 2: Confusing No Solution with x = 0

The number zero is a legitimate real solution! If an equation simplifies to 5x = 0, dividing by 5 yields x = 0. This is a unique valid solution, not “no solution”. “No solution” occurs only when the variable cancels entirely to leave an impossibility like 0 = 7.

Pitfall 3: Dividing One Side but Not the Other

Operations must be applied uniformly to the entire left side and the entire right side. When dividing 2x + 6 = 10 by 2, you must divide every term by 2 to yield x + 3 = 5.

Fact-Checked & Verified • Computational Accuracy Standards
Updated September 2026 • Editorial Policy
Authored By
Sanjay Samanta

Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.

Reviewed & Verified By
Academic Review Board

Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.

Found an error or have an improvement suggestion? Report a calculation issue

Frequently Asked Questions

How do you solve a linear equation with one variable?
To solve a single-variable linear equation, apply the algebraic properties of equality to isolate the variable on one side. First, expand parentheses using the distributive property. Second, combine all like terms on each side. Third, move variable terms to one side and constant numbers to the other using addition and subtraction. Finally, divide both sides by the variable’s coefficient to obtain the exact numerical root.
What is the difference between a linear equation and an identity?
A conditional linear equation has exactly one unique solution (such as 2x + 3 = 11, where x = 4). An identity is an equation that is true for every possible real number, simplifying to an invariant equality like 0 = 0 (or 2x + 4 = 2x + 4), meaning there are infinitely many solutions.
What does it mean when a linear equation has no solution?
An equation has no solution (is inconsistent or contradictory) when isolating the variable causes all variable terms to cancel out completely, leaving an impossible mathematical statement such as 0 = 5. Geometrically, this represents two parallel lines with identical slopes that never intersect.
How do you handle fractions in a linear equation?
The most efficient method for handling fractions is to multiply every term on both sides of the equation by the least common denominator (LCD) of all fractions present. This clears all denominators in a single step, converting the problem into an equivalent equation with integer coefficients.
Why do we perform the same mathematical operation to both sides of an equation?
An equation represents an exact balance between two quantities. By the fundamental axioms of equality (addition, subtraction, multiplication, and division properties of equality), applying the exact same operation to both sides preserves the truth value of the equality without changing its solution set.
How do you verify whether a calculated solution is correct?
Substitute the calculated numerical solution directly into the original equation wherever the variable appears. Evaluate the left-hand side (LHS) and the right-hand side (RHS) independently following the order of operations (PEMDAS). If LHS equals RHS, the solution is verified accurate.
What is a two-step linear equation?
A two-step linear equation is an equation requiring exactly two inverse operations to isolate the variable, typically in the form ax + b = c. The first step uses addition or subtraction to eliminate the constant term b, and the second step uses multiplication or division to eliminate the coefficient a.
How do parentheses affect the order of solving an equation?
Parentheses indicate grouped operations that must be resolved before terms can be moved across the equals sign. You must apply the distributive property a(b + c) = ab + ac to expand and remove all parentheses before combining like terms.
Can a single-variable linear equation have more than one root?
By the Fundamental Theorem of Algebra, a polynomial equation of degree 1 (a linear equation ax + b = 0 with a != 0) has exactly one unique root in the complex number system, which is real: x = -b/a.
What is the difference between an expression and an equation?
An algebraic expression is a combination of numbers, variables, and operators without an equals sign (such as 3x + 5), which can be simplified or evaluated but not solved. An equation is a mathematical statement containing an equals sign (such as 3x + 5 = 17) asserting that two expressions are equal, which can be solved for the unknown variable.