Skip to main content

How to Solve for x

Written by Awn · Published · 6 min read

Quick Answer

Here is how to solve for x. Simplify both sides, then gather every x term on one side and every plain number on the other. Undo adding or subtracting first, then multiplying or dividing. Whatever you do to one side, do to the other. Put your answer back in to check.

What Does Solving for x Mean?

Solving for x means finding the number that makes an equation true. In 4x+9=254x+9=25, the question is: what number, times 4, plus 9, gives 25? The letter could be anything. Mathematicians just use xx a lot.

How to Solve for x Step by Step

  1. Clear parentheses and fractions.
  2. Combine like terms on each side.
  3. Move all the xx terms to one side.
  4. Undo adding or subtracting.
  5. Undo multiplying or dividing.
  6. Check the answer.

How to solve for x steps for 4x plus 9 equals 25

Why undo the last thing first? Think of a wrapped gift. The paper went on last, so it comes off first. In 4x+94x+9, the 9 was added last.

Try your own equation in the solve for x calculator to see the undo steps.

Which Move Comes Next?

You seeUndo it by
x+9x+9Subtracting 9
x−2x-2Adding 2
4x4xDividing by 4
x3\frac{x}{3}Multiplying by 3
x2x^2Taking square roots, with ±\pm
x\sqrt{x}Squaring

How to Solve for x in Different Equations

When x Is on Both Sides

Subtract the smaller xx term from both sides, so you don't get a negative. For 6x+2=4x+146x+2=4x+14, subtract 4x4x: 2x+2=142x+2=14. Then 2x=122x=12 and x=6x=6.

When x Is in Parentheses

Distribute, or divide first if you can. For 3(2x−1)=213(2x-1)=21, dividing by 3 is quick: 2x−1=72x-1=7, so 2x=82x=8 and x=4x=4.

Solve for x With Fractions

Multiply both sides by the bottom number. For x3−2=5\frac{x}{3}-2=5, add 2 first: x3=7\frac{x}{3}=7. Then multiply by 3: x=21x=21.

How to solve for x when it is in a fraction

When x Is Squared

For x2=49x^2=49, take square roots. Both 7 and −7-7 work, so x=7x=7 or x=−7x=-7. If there is an xx term too, use a method from how to solve quadratic equations.

When There Are Other Letters

Treat the other letters like numbers. For p=3x+qp=3x+q, subtract qq and divide by 3: x=p−q3x=\frac{p-q}{3}.

Why You Do the Same to Both Sides

An equation is like a balance scale with equal weight in each pan. If you take 9 away from one pan, the scale tips. Take 9 from both and it stays level.

Every legal move follows from this. You can add, subtract, multiply or divide both sides by the same number, as long as you never divide by zero.

It also explains why "move it to the other side and change the sign" works. In 4x+9=254x+9=25, nothing really moves. You subtract 9 from both sides. On the left, 9−99-9 disappears. On the right, 25−925-9 appears. The shortcut is fine once you know what is behind it.

Worked Examples

Example 1: Two Steps

Solve 4x+9=254x+9=25.

  1. Subtract 9: 4x=164x=16.
  2. Divide by 4: x=4x=4.

Check: 4(4)+9=254(4)+9=25.

Example 2: Parentheses and x on Both Sides

Solve 2(x−3)=5x+62(x-3)=5x+6.

  1. Distribute: 2x−6=5x+62x-6=5x+6.
  2. Subtract 2x2x: −6=3x+6-6=3x+6.
  3. Subtract 6: −12=3x-12=3x.
  4. Divide by 3: x=−4x=-4.

Check: 2(−7)=−142(-7)=-14 and 5(−4)+6=−145(-4)+6=-14.

Example 3: A Whole Top Over a Number

Solve 2x−13=5\dfrac{2x-1}{3}=5.

  1. Multiply by 3: 2x−1=152x-1=15.
  2. Add 1: 2x=162x=16.
  3. Divide by 2: x=8x=8.

Example 4: Fractions on Both Sides

Solve x2+1=x3+3\dfrac{x}{2}+1=\dfrac{x}{3}+3.

  1. Multiply every term by 6: 3x+6=2x+183x+6=2x+18.
  2. Subtract 2x2x: x+6=18x+6=18.
  3. Subtract 6: x=12x=12.

Check: 122+1=7\frac{12}{2}+1=7 and 123+3=7\frac{12}{3}+3=7.

Example 5: Decimals

Solve 0.5x+1.2=3.70.5x+1.2=3.7.

  1. Multiply every term by 10 to clear the decimals: 5x+12=375x+12=37.
  2. Subtract 12: 5x=255x=25.
  3. Divide by 5: x=5x=5.

Example 6: x on the Bottom

Solve 12x=4\dfrac{12}{x}=4.

  1. Multiply both sides by xx: 12=4x12=4x.
  2. Divide by 4: x=3x=3.

Here xx can't be 0, because you can't divide by 0. Since 3 is not 0, it is fine.

Finding x in a Triangle or on a Line

Geometry problems often hide an equation in a picture. Use the rule for the shape to write it.

PictureRule
TriangleThe three angles add to 180 degrees
Angles on a straight lineThey add to 180 degrees
Two lines that crossOpposite angles are equal

For example, a triangle has angles of xx, 2x2x and 60 degrees. Then x+2x+60=180x+2x+60=180. Combine: 3x=1203x=120, so x=40x=40. The angles are 40, 80 and 60 degrees, and they add to 180.

If opposite angles are 3x+103x+10 and 5x−205x-20, set them equal: 3x+10=5x−203x+10=5x-20. Then 30=2x30=2x and x=15x=15.

Turning Words Into an Equation

Most word problems become easy once the equation is written.

WordsMath
A number increased by 9x+9x+9
5 less than a numberx−5x-5
Twice a number2x2x
A number divided by 3x3\frac{x}{3}
Is, equals, gives==

For example: "Three times a number, less 4, is 20. Find the number."

  1. Write it: 3x−4=203x-4=20.
  2. Add 4: 3x=243x=24.
  3. Divide by 3: x=8x=8.

Check it against the words, not just the equation. Three times 8 is 24, and 4 less than that is 20.

Be careful with "less than". "5 less than a number" is x−5x-5, not 5−x5-x.

Two Ways to Write Your Steps

Some teachers like the change written under both sides, line by line. Others like one clean line per step. Both are fine if each line has exactly one equals sign and the signs line up.

Avoid chains such as 4x=16=44x=16=4. That says 16 equals 4, which is false. Write 4x=164x=16 and then x=4x=4 on the next line.

Common Mistakes

Doing a Step to One Side Only

If you subtract 9 on the left, write −9-9 under both sides. Writing it out prevents this slip.

Dividing Before Clearing the Constant

In 4x+9=254x+9=25, dividing by 4 first gives x+94=254x+\frac{9}{4}=\frac{25}{4}. It is not wrong, but it makes the numbers harder.

Losing a Negative

From −x=5-x=5, the answer is x=−5x=-5, not 5. Multiply both sides by −1-1.

Multiplying Only Part of a Side

When you clear a fraction, multiply every term. In x2+1=4\frac{x}{2}+1=4, multiplying by 2 gives x+2=8x+2=8, not x+1=8x+1=8.

Combining Terms Across the Equals Sign

In 6x+2=4x+146x+2=4x+14, you can't add 6x6x and 4x4x to get 10x10x. They are on different sides. Subtract 4x4x from both sides instead.

Practice Problems

  1. Solve 9x−4=329x-4=32.
  2. Solve x5+3=1\frac{x}{5}+3=1.
  3. Solve 6x+2=4x+146x+2=4x+14.
  4. Solve 3(2x−1)=213(2x-1)=21.
  5. Solve p=3x+qp=3x+q for xx.
Show the answers
  1. x=4x=4
  2. x=−10x=-10
  3. x=6x=6
  4. x=4x=4
  5. x=p−q3x=\dfrac{p-q}{3}

Check Your Answer With the Solver

Put your number into the first line of the problem, not a later one. Then compare with the calculator that isolates any letter. For equations with roots, logs or bars, go on to how to solve equations. Another good explanation is Solving Linear Equations in Paul's Online Notes.

FAQ

What Is the First Step to Find x?

Simplify each side. Clear parentheses, clear fractions and combine like terms before you move anything.

How Do You Solve for x With Two Variables?

You get xx in terms of the other letter. To get a number, you need a second equation.

Can x Be a Fraction or a Negative?

Yes. 2x=52x=5 gives x=52x=\frac{5}{2}, and x+9=4x+9=4 gives x=−5x=-5.

What If x Cancels Out?

If a true statement is left, such as 4=44=4, every number works. If a false one is left, such as 4=74=7, no number works.

Do You Always Need to Show the Steps?

For a test, usually yes. The steps also let you find a mistake without starting over.


Next step: write three equations of your own by choosing xx first and building up. Solving for x is easier once you have built one, and that is how to solve for x without memorizing rules.

Try the Calculator

Related Pages