Guide

Equations with the unknown on both sides

By Viktor Lassen5 min readUpdated 3 September 2026

When x appears on both sides of the equals sign, we first simplify each side, then gather all the x's on one side and all the numbers on the other, and only then get x on its own.

Some equations have xx both on the right-hand and the left-hand side of the equals sign. Then we want to gather all the numbers on one side and all the xx's on the other, and only then get xx on its own. The usual hurdle is not the gathering itself but a stray minus sign that gets lost on the way.

When do I use this?

Whenever xx shows up on both sides, like here:

An equation with x on both sides: 2x + 3 = 3x

2x+3=3x2x + 3 = 3x

Everything from the basic guide on how to solve linear equations still holds: the equals sign says both sides are exactly the same, and whatever we do, we do on both sides. We just have one extra job first: getting the xx's together.

The procedure

  1. Simplify each side first. See whether there is anything we can multiply, add or take away on each side, so that each side is as short as possible. Remember that the sign belongs to what stands right after it. This is the same move as in the guide on simplifying both sides of an equation.
  2. Gather the xx's on one side and the numbers on the other. We do that by doing the opposite of an xx-term on both sides, exactly as we would with a number. Which side the xx's should be on depends entirely on what is smartest for that equation.
  3. Get xx on its own. Do the opposite of what is left in the way, on both sides, until xx stands alone.

Worked examples

Example 1: a long one

Let's take an equation with a few more terms in it:

4x+42โˆ’xร—4=โˆ’3xร—2+12+8x4x + 42 - x \times 4 = -3x \times 2 + 12 + 8x

The first thing we do with an equation like this is to see whether we can simplify anything. Is there anything we can multiply already, or add, or take away? It's important to remember that the signs belong to what stands right after them. So when it says

โˆ’xร—4-x \times 4

that is minus xx times 4, so we end up with โˆ’4x-4x, and not just 4x4x. That's important to remember.

Let's start simplifying. We can see that โˆ’xร—4-x \times 4 becomes โˆ’4x-4x:

4x+42โˆ’4x=โˆ’3xร—2+12+8x4x + 42 - 4x = -3x \times 2 + 12 + 8x

and that โˆ’3xร—2-3x \times 2 becomes โˆ’6x-6x. It becomes that because we have โˆ’3x-3x two times, which is โˆ’6x-6x, after all:

4x+42โˆ’4x=โˆ’6x+12+8x4x + 42 - 4x = -6x + 12 + 8x

Now we can see that we have both negative and positive xx's on both sides, which we can take away from each other. On the left-hand side we have both 4x4x and โˆ’4x-4x. If we add 4x4x and then take 4x4x away, that gives 0, so they go out with each other. So they disappear:

42=โˆ’6x+12+8x42 = -6x + 12 + 8x

On the right-hand side we have โˆ’6x-6x and 8x8x, which we can add together to get 2x2x:

42=2x+1242 = 2x + 12

Now that we've simplified, we can begin to get xx on its own. We can see that +12+12 stands in the way, so we'd like it removed. We do that by taking 12 away on both sides. So we do the opposite of +12+12 (which is โˆ’12-12), and it disappears:

42โˆ’12=2x+12โˆ’1242 - 12 = 2x + 12 - 12

30=2x30 = 2x

We can see that xx is multiplied by 2, because there is always a hidden multiplication sign between a number and a letter. We'd like that gone, so xx comes to stand alone. So we do the opposite of "times 2", which is "divide by 2". We divide by 2 on both sides, so we can get xx alone:

302=2x2\frac{30}{2} = \frac{2x}{2}

15=x15 = x

So we've arrived at xx being equal to 15.

Example 2: taking an x-term away on both sides

In the first example the xx's on the left went out with each other by themselves. Usually we have to do a bit more. Take

2x+3=3x2x + 3 = 3x

There is nothing to simplify on either side, so we go straight to gathering the xx's. The smartest side here is the right, because 3x3x is bigger than 2x2x, so we won't end up with a minus in front of xx. To get rid of the 2x2x on the left we do the opposite of +2x+2x, which is โˆ’2x-2x, on both sides:

2x+3โˆ’2x=3xโˆ’2x2x + 3 - 2x = 3x - 2x

3=x3 = x

So xx is 3. We can check this is right, because we know both sides have to give the same number: 2ร—3+3=92 \times 3 + 3 = 9 and 3ร—3=93 \times 3 = 9. This is also the equation we solve with a graph in solving equations with a graph, and the two lines cross exactly at x=3x = 3.

Common mistakes

  • "โˆ’xร—4-x \times 4 is 4x4x." No. The sign belongs to what stands right after it, so โˆ’xร—4-x \times 4 is โˆ’4x-4x. Dropping the minus changes the whole equation.
  • "I took 2x2x away from the left side, so the left is done." Whatever we do has to be done on both sides. 2x+3=3x2x + 3 = 3x becomes 2x+3โˆ’2x=3xโˆ’2x2x + 3 - 2x = 3x - 2x, not 3=3x3 = 3x.
  • "Now xx is on the right, so something went wrong." Nothing went wrong. 15=x15 = x says exactly the same as x=15x = 15. Which side the xx's end up on is just a matter of what is smartest for the equation.
  • "I'll start rearranging before I simplify." You can, but it gets messy. The first thing to do is to see whether there is anything to simplify. Then the equation is short, and the rearranging is the easy part.

Frequently asked questions

Read next

Want to get good at maths?

Mathara explains every topic step by step with videos, exercises and personal feedback.

๐Ÿ‘‰ Get started for free