SolveMathAI

Algebra solver

Equations, inequalities, exponents and logs. Every step names its rule.

Enter to solve · Shift+Enter for a new line

  • Free
  • No account
  • Every step shown
  • Arithmetic to calculus

Algebra is one idea repeated: keep both sides equal while you make the unknown simpler. Whatever you do to one side, do to the other. The awkward parts are the exceptions, and there are only a handful of them: flipping an inequality, checking for extraneous roots, and domains that rule an answer out.

How to solve almost any algebra equation

The order below unwinds an equation the way it was built up, last operation first.

  1. Clear brackets and fractions

    Expand what is in brackets, and multiply every term by the least common denominator to clear fractions. Every term, including the ones without a fraction.

  2. Collect like terms on each side

    Tidy each side separately before moving anything across.

  3. Get the unknowns on one side

    Add or subtract the same thing from both sides until every x is on one side and every number on the other.

  4. Undo the last operation

    Divide by the coefficient, take the root, take the log. This is where an inequality flips if you multiply or divide by a negative.

  5. Check the answer, and its domain

    Put it back into the original equation. Radicals and logarithms can produce answers that solve the rearranged equation but not the original one; those are rejected.

Worked examples

Each one is solved the way the solver solves it: the rule first, then the line.

Solve 3(x + 2) - 4 = 2(x - 1) + 9

3(x+2)−4=2(x−1)+93(x + 2) - 4 = 2(x - 1) + 9
  1. Expand both sides
    3x+6−4=2x−2+93x + 6 - 4 = 2x - 2 + 9
  2. Collect like terms
    3x+2=2x+73x + 2 = 2x + 7
  3. Subtract 2x from both sides
    x+2=7x + 2 = 7
  4. Subtract 2 from both sides
    x=5x = 5
  5. Check in the original
    3(7)−4=17,2(4)+9=17  ✓3(7) - 4 = 17, \qquad 2(4) + 9 = 17 \;\checkmark
Answer
x=5x = 5

Solve the inequality -3x + 7 <= 1

−3x+7≤1-3x + 7 \le 1
  1. Subtract 7 from both sides
    −3x≤−6-3x \le -6
  2. Divide by −3 and flip the sign
    x≥2x \ge 2
  3. Check one value on each side
    x=3:  −9+7=−2≤1  ✓x=0:  7≤1  ×x = 3:\; -9 + 7 = -2 \le 1 \;\checkmark \qquad x = 0:\; 7 \le 1 \;\times
Answer
x≥2x \ge 2

Dividing or multiplying an inequality by a negative number reverses it. This is the single most common lost mark in an algebra paper.

Solve log base 2 of x plus log base 2 of (x - 2) = 3

log⁡2x+log⁡2(x−2)=3\log_2 x + \log_2 (x - 2) = 3
  1. Combine the logs
    log⁡2(x(x−2))=3\log_2 \big( x(x - 2) \big) = 3
  2. Rewrite in exponential form
    x(x−2)=23=8x(x - 2) = 2^3 = 8
  3. Make it a quadratic
    x2−2x−8=0x^2 - 2x - 8 = 0
  4. Factor
    (x−4)(x+2)=0  ⇒  x=4 or x=−2(x - 4)(x + 2) = 0 \;\Rightarrow\; x = 4 \ \text{or}\ x = -2
  5. Reject what the domain forbids
    x=−2⇒log⁡2(−2) undefinedx = -2 \Rightarrow \log_2(-2)\ \text{undefined}
Answer
x=4x = 4

Solve sqrt(2x + 3) = x

2x+3=x\sqrt{2x + 3} = x
  1. Square both sides
    2x+3=x22x + 3 = x^2
  2. Rearrange
    x2−2x−3=0x^2 - 2x - 3 = 0
  3. Factor
    (x−3)(x+1)=0  ⇒  x=3 or x=−1(x - 3)(x + 1) = 0 \;\Rightarrow\; x = 3 \ \text{or}\ x = -1
  4. Test both in the original
    9=3  ✓1=1≠−1  ×\sqrt{9} = 3 \;\checkmark \qquad \sqrt{1} = 1 \ne -1 \;\times
Answer
x=3x = 3

Squaring can invent solutions. Every squared equation needs its answers tested in the original.

Where marks get lost

Not flipping the inequality

Multiplying or dividing an inequality by a negative reverses the direction. Equations do not have this rule, which is why it gets forgotten.

Multiplying only some terms

Clearing fractions means multiplying every term by the common denominator, including whole numbers sitting on their own.

Keeping an extraneous root

Squaring both sides, or combining logs, can produce a value that breaks the original equation. Always substitute back.

Questions

How do I solve for x?

Undo whatever is being done to x, in reverse order, doing the same thing to both sides. For 3x + 7 = 22, subtract 7 to get 3x = 15, then divide by 3 to get x = 5.

How do I solve inequalities?

Solve them exactly like equations, with one rule added: multiplying or dividing by a negative number flips the sign. −2x > 6 becomes x < −3, not x > −3.

What is algebra?

Arithmetic with letters standing in for numbers you do not know yet. The letters obey exactly the same rules as numbers, which is what lets you rearrange an equation until the unknown is alone.

What is a variable?

A letter that holds a number that can change or that you are trying to find. In 3x + 7 = 22 the variable x has one value; in y = 3x + 7 both letters vary together.

How do I solve inequalities with absolute values?

Split it into two. |x − 3| < 5 means −5 < x − 3 < 5, giving 2 < x < 8. With a greater-than sign you get two separate ranges instead of one.

How do I simplify an expression?

Expand any brackets, then collect like terms. 3(2x − 5) + 4 becomes 6x − 15 + 4 = 6x − 11. Only terms with the identical variable part can be combined.

How do I solve for x when there are fractions?

Multiply every term by the common denominator to clear them first. x/3 + x/4 = 7 multiplied by 12 gives 4x + 3x = 84, so x = 12.

How do I check my answer?

Put it back into the original equation and see whether both sides match. The solver does this in its last line, which is how you can tell a right answer from a confident one.