Linear Equation Calculator

Solve any one-variable linear equation with AI-powered step-by-step solutions

Drag & drop or click to add images or PDF

Math Input
2x + 5 = 13
4x - 3 = 2x + 9
5(x - 2) = 3x + 4
x/3 + 2 = 7

What is a Linear Equation?

A linear equation is a first-degree polynomial equation in one variable, taking the general form:

ax+b=0ax + b = 0

where aa and bb are constants, and a0a \neq 0. The word "linear" comes from the fact that the graph of such an equation is a straight line.

More generally, a linear equation in one variable can appear as:

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

which can always be rearranged into the standard form. The solution is the value of xx that makes both sides of the equation equal.

Linear equations are the foundation of algebra and appear everywhere in real life — from calculating costs and distances to converting units and balancing budgets. They always have exactly one solution (assuming a0a \neq 0), which makes them the simplest type of equation to solve.

Key characteristics of linear equations:

  • The variable xx appears only to the first power (no x2x^2, x\sqrt{x}, etc.)
  • The graph is always a straight line
  • There is exactly one solution
  • They can always be solved in a finite number of algebraic steps

How to Solve a Linear Equation

Solving a linear equation means isolating the variable on one side. Here are the main approaches:

1. Basic Isolation Method

For equations in the form ax+b=cax + b = c:

  1. Subtract bb from both sides: ax=cbax = c - b
  2. Divide both sides by aa: x=cbax = \frac{c - b}{a}

Example: Solve 3x+7=223x + 7 = 22

  • 3x=227=153x = 22 - 7 = 15
  • x=153=5x = \frac{15}{3} = 5

2. Variables on Both Sides

For equations like ax+b=cx+dax + b = cx + d:

  1. Move all variable terms to one side: (ac)x+b=d(a - c)x + b = d
  2. Move constants to the other side: (ac)x=db(a - c)x = d - b
  3. Divide: x=dbacx = \frac{d - b}{a - c}

Example: Solve 4x3=2x+94x - 3 = 2x + 9

  • 4x2x=9+34x - 2x = 9 + 3
  • 2x=122x = 12
  • x=6x = 6

3. Equations with Parentheses

First distribute, then collect like terms:

Example: Solve 5(x2)=3x+45(x - 2) = 3x + 4

  • 5x10=3x+45x - 10 = 3x + 4
  • 2x=142x = 14
  • x=7x = 7

4. Equations with Fractions

Multiply both sides by the LCD to eliminate fractions:

Example: Solve x3+2=7\frac{x}{3} + 2 = 7

  • Multiply by 3: x+6=21x + 6 = 21
  • x=15x = 15
MethodBest When
Basic IsolationSimple ax+b=cax + b = c form
Collect Like TermsVariable appears on both sides
Distribute FirstParentheses are present
Multiply by LCDFractions are present

Common Mistakes to Avoid

  • Forgetting to apply operations to both sides: Whatever you do to one side, you must do to the other.
  • Sign errors when moving terms: When moving +5+5 to the other side, it becomes 5-5, not +5+5.
  • Not distributing correctly: 3(x4)=3x123(x - 4) = 3x - 12, not 3x43x - 4.
  • Dividing by zero: If you end up with 0x=50x = 5, the equation has no solution; if 0x=00x = 0, it has infinitely many solutions.
  • Forgetting to simplify fractions: Always reduce your final answer to lowest terms.

Examples

Step 1: Subtract 77 from both sides: 3x=227=153x = 22 - 7 = 15
Step 2: Divide both sides by 33: x=153x = \frac{15}{3}
Step 3: Simplify: x=5x = 5
Answer: x=5x = 5

Step 1: Move variable terms to the left: 4x2x=9+34x - 2x = 9 + 3
Step 2: Combine like terms: 2x=122x = 12
Step 3: Divide both sides by 22: x=6x = 6
Answer: x=6x = 6

Step 1: Distribute on the left: 5x10=3x+45x - 10 = 3x + 4
Step 2: Move variable terms: 5x3x=4+105x - 3x = 4 + 10, so 2x=142x = 14
Step 3: Divide both sides by 22: x=7x = 7
Answer: x=7x = 7

Frequently Asked Questions

A linear equation is an equation where the variable appears only to the first power. Its general form is ax + b = 0, where a and b are constants and a is not zero. It always has exactly one solution.

An equation is linear if the variable is only raised to the first power. There should be no x squared, square roots of x, or x in a denominator. The graph of a linear equation is always a straight line.

Yes. If simplifying leads to a false statement like 0 = 5, there is no solution. If it leads to a true statement like 0 = 0, there are infinitely many solutions. Otherwise, there is exactly one solution.

A linear equation (like 2x + 3 = 7) is a statement to solve for x. A linear function (like f(x) = 2x + 3) defines a relationship that maps each input x to an output. The function graphs as a line; the equation asks where that line meets y = 7.

Related Solvers

QuadraticSystem of equationsInequalityEquation
Try AI-Math for Free

Get step-by-step solutions to any math problem. Upload a photo or type your question.

Start Solving