Solving Ax = b Equation Solver with Worked Examples

To solve , divide both sides by : . Type an equation such as and the solver shows each step.

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

This page is easier if you are comfortable with:

What Solving ax = b means

means multiplied by . To undo multiplication, divide both sides by .

The answer may be a fraction or decimal, for example gives .

Dividing by a negative number changes the sign of the answer. The next equations are solving ax + b = c and solving x/a + b = c, and the simplest is solving x + a = b. It also helps to know Solving ax + b = cx + d, which uses the same ideas.

This page is part of Linear equations in Algebra. Topics that work alongside it: Solving x + a = b, Solving ax + b = c, Solving x/a + b = c, Solving a(x + b) = c, Solving (x + a)/b = c and Solving ax + b = cx + d.

What is it used for?

When x is multiplied by a number, you divide both sides by that number to get x on its own.

How to use solving ax = b

  1. Write the equation .
  2. Divide both sides by .
  3. Simplify the fraction .
  4. Check by substituting back.

Graph

Solving 2x = 10x = 5-101234567802468101214Solving 2x = 10xyy = 2xy = 10Graph with x from -1 to 8 and y from -1 to 14. Shows the curve y = 2x; the curve y = 10; point x = 5 at (5, 10).

The line y = 2x meets y = 10 where x = 5.

Worked examples

The examples marked with a button were worked out by the solver on this page. You can try each one yourself.

Example 1: a whole-number answer

Solve .

Linear equation Answer checked
Answer
x=7x = 7
  1. The equation
    Solving for .
  2. Move everything to one side
  3. Simplify
  4. Isolate
    Subtract the constant from both sides.
  5. Divide both sides by
  6. Check by substituting back
    ✓

Example 2: a fraction answer

Solve .

Linear equation Answer checked
Answer
x=52x = \frac{5}{2}
  1. The equation
    Solving for .
  2. Move everything to one side
  3. Simplify
  4. Isolate
    Subtract the constant from both sides.
  5. Divide both sides by
  6. Check by substituting back
    ✓

Example 3: a negative answer

Solve .

Linear equation Answer checked
Answer
x=−7x = -7
  1. The equation
    Solving for .
  2. Move everything to one side
  3. Simplify
  4. Isolate
    Subtract the constant from both sides.
  5. Divide both sides by
  6. Check by substituting back
    ✓

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

A whole-number answer

3x = 21: x = 7

Divide both sides by 3.

A fraction answer

4x = 10: x = 2.5

The answer need not be whole.

A negative answer

5x = −35: x = −7

A negative divided by a positive is negative.

A negative coefficient

−2x = 8: x = −4

Divide by −2.

Word problems

To solve ax = b, divide both sides by a: x = b ÷ a.

A whole-number answer

Solve 3x = 21.

  1. Divide both sides by 3x = 21 ÷ 3
  2. Calculatex = 7
  3. Check: 3 × 7 = 21 ✓x = 7.

A fraction answer

Solve 4x = 10.

  1. Divide by 4x = 10 ÷ 4
  2. Calculatex = 2.5
  3. Check: 4 × 2.5 = 10 ✓x = 2.5.

Pens Higher

6 pens cost £15. Find the cost of one pen.

  1. Write the equation6x = 15
  2. Divide by 6x = 2.5
  3. Check: 6 × 2.5 = 15 ✓£2.50.

A negative answer Higher

Solve 5x = −35.

  1. Divide by 5x = −35 ÷ 5
  2. Calculatex = −7
  3. Check: 5 × (−7) = −35 ✓x = −7.

Common mistakes

Multiplying instead of dividing

3x = 21 gives x = 63 ✗

x = 21 ÷ 3 = 7 ✓

Undo multiplication by dividing.

Dividing the wrong way

x = 3 ÷ 21 ✗

x = 21 ÷ 3 ✓

The coefficient goes underneath.

Losing the negative sign

5x = −35 gives x = 7 ✗

x = −7 ✓

Keep the sign.

Subtracting the coefficient

3x = 21 gives x = 18 ✗

divide, not subtract ✓

3x means 3 times x.

Exam tips

  1. Divide by the coefficient.
  2. Both sides.
  3. Keep the sign.
  4. Fractions are fine as answers.
  5. Check by multiplying back.

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. Solve 2x = 18 Foundation

x = 9

2. Solve 5x = 40 Foundation

x = 8

3. Solve 7x = 63 Foundation

x = 9

4. Solve 4x = 6 Higher

x = 1.5

5. Solve 6x = −30 Higher

x = −5

6. Solve −3x = 12 Higher

x = −4

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Coefficient
The number multiplying x.
Inverse operation
Division undoes multiplication.
Solution
The value of x.
Equation
Two expressions that are equal.
Fraction
A part of a whole.
Negative number
A number below zero.

Frequently asked questions

How do you solve 3x = 21?

Divide both sides by 3 to get x = 7.

What if the answer is not a whole number?

Write it as a fraction or decimal.

What do I do with a negative coefficient?

Divide by it, and watch the sign.

What is the inverse of multiplication?

Division.

Which page adds one more step?

solving ax + b = c.

Which page covers x + a = b?

solving x + a = b.

More in Algebra and the formula sheets.