If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Equations with variables on both sides: 20-7x=6x-6

Sal solves the equation 20 - 7x = 6x - 6. Created by Sal Khan and Monterey Institute for Technology and Education.

Want to join the conversation?

  • duskpin sapling style avatar for user harriscorbyn
    What would you do in an equation that has a subtraction sign and a negative sign
    Example d+x-(-x)=x+d+x
    (25 votes)
    Default Khan Academy avatar avatar for user
  • duskpin tree style avatar for user Cool Guy
    Hi Kim Seidel, I have seen that you answer hundreds of peoples questions and I just want to say thank you. You have helped so many people unrecognized. I'm guessing you work for Khan Academy? Thanks again.👍😁
    P.S.
    I wasn't sure you would see this in the Tips & Thanks;I know when you see this I might have forgotten about this "question" But thanks if you do respond.
    (29 votes)
    Default Khan Academy avatar avatar for user
  • starky sapling style avatar for user Hadi Smith
    how do you know what side to subtract first like in this equation 5x+2=2x+14?
    My textbook says to subtract 2x first but how do you know its 2x instead of 5x, 2, or 14?
    (11 votes)
    Default Khan Academy avatar avatar for user
    • hopper cool style avatar for user Seed Something
      In equations like your sample, we can choose any of the terms to begin with, and still arrive at the same answer.

      ★Starting with subtracting 2x will keep the values in the calculations positive, because 2x < 5x.

      5x + 2 = 2x + 14
      subtract 2x from both sides
      =
      5x -2x + 2 = 2x + 14 -2x
      =
      3x + 2 = 14
      subtract 2 from both sides
      =
      3x + 2 -2 = 14 -2
      =
      3x = 12
      divide both sides by 3
      =
      3x/3 = 12/3
      =
      x = 4
      ←yay! answer!

      ★Starting with 5x will cause mixed positive and negative integer math as 5 > 2.

      5x + 2 = 2x + 14
      subtract 5x from both sides
      =
      5x -5x + 2 = 2x + 14 -5x
      =
      2 = 14 -3x
      subtract 14 from both sides
      =
      2 -14 = 14 -3x -14
      =
      -12 = -3x

      divide both sides by -3
      =
      -12/-3 = -3x/-3*
      negative ÷ negative = positive
      =
      4 = x ←yay! same answer!

      ★Starting with subtracting 2, will also keep the calculations positive, since 2 < 14.

      5x + 2 = 2x + 14
      subtract 2 from both sides
      =
      5x + 2 -2 = 2x + 14 -2
      =
      5x = 2x + 12
      subtract 2x from both sides
      =
      5x -2x = 2x + 12 -2x
      =
      3x = 12
      divide both sides by 3
      =
      3x/3 = 12/3
      =
      x = 4
      ←yay! same answer!

      ★Starting with subtracting 14 will also cause mixed positive and negative integer calculations, as 14 > 2.

      5x + 2 = 2x + 14
      subtract 14 from both sides
      =
      5x + 2 -14 = 2x + 14 -14
      =
      5x -12 = 2x
      subtract 5x from both sides
      =
      5x -5x -12 = 2x -5x
      =
      -12 = -3x

      divide both sides by -3
      =
      -12/-3 = -3x/-3
      negative ÷ negative = positive
      =
      4 = x ←yay! same answer!

      So in this case, beginning with any of the terms will arrive at the same answer, the main lesson is to use Opposite Operations to isolate the variable.

      (ㆁωㆁ) Hope this helps someone.
      (10 votes)
  • blobby green style avatar for user andrea zuniga
    I don't understand no matter how many times I do it is there someone there who can explain SLOWER so, I can understand
    pls hlp
    (16 votes)
    Default Khan Academy avatar avatar for user
  • duskpin seedling style avatar for user EunitiM
    How would you explain how to do this in a few words ?
    (5 votes)
    Default Khan Academy avatar avatar for user
  • winston baby style avatar for user Computing King
    how would you do,

    10p - 3 = 2 (12 + 4p) -7?

    I come up with 3 1/6 but know that that is incorrect.
    (2 votes)
    Default Khan Academy avatar avatar for user
    • duskpin ultimate style avatar for user The Bibliophile
      Yes, it's incorrect.
      This is how to solve it:
      10p-3 = 2(12+4p)-7
      10p-3 = 24+8p-7 ---> Multiply
      10p-3 = 8p+17 ---> Combine like terms
      -8p -8p
      2p-3 = 17
      +3 +3
      2p = 20
      /2 /2
      p = 10
      One of the most helpful things to remember when you're solving equations with variables is that you have to isolate the variable (as in figure out how to get the variable on its own). Another important thing is that whatever you do to one side of the equation, you have to do to the other.
      (5 votes)
  • winston default style avatar for user Nini's Handmades
    Why wouldn't you add the 20 instead of subtracting it in the beginning?
    (5 votes)
    Default Khan Academy avatar avatar for user
    • stelly blue style avatar for user Kim Seidel
      Sal is moving the 20 across the equals to the other side of the equation. To move items, we always use the opposite operation. In the equation, the 20 is being added to -7x. The opposite of addition is subtracting which is why Sal is subtracting the 20 from both sides.

      If we take your approach and add 20 to both sides, look at what happens:
      20+20-7x = 6x-6+20
      40-7x = 6x + 14
      Nothing has moved across the equals. We've only made the numbers larger than when we started.

      Hope this helps.
      (2 votes)
  • mr pants teal style avatar for user Maria851
    So for class we had this question
    -5(x+9)=-5
    and so what i did next was
    -5x-45=-5
    -5x-45+5=-5+5

    But my teacher said that you can't add 5, and that you were supposed to add 45. HOW DO YOU TELL which number you're supposed to add?? im so confused, plzz help mee :(
    (3 votes)
    Default Khan Academy avatar avatar for user
    • duskpin ultimate style avatar for user SherlockHolmes.42
      For this kind of problem, the goal is to get x on one side, by itself. To do this, we would need to do the opposite to whatever is on the same side as the x.

      With the example, if we added 5, it would look like this:
      -5x - 45 = -5
      -5x - 45 + 5 = -5 + 5
      Simplifying, we get: -5x - 40 = 0

      Adding 5 to both sides doesn't help the x stay on one side, instead it just makes the opposite side become zero.

      Whereas if we added 45, here is what it would look like:
      -5x - 45 = -5
      -5x - 45 + 45 = -5 + 45
      -5x = 40
      Then, all we would need to do is divide by -5.
      x = -8

      As getting x on one side is the goal of this type of problem, we needed to add 45 instead of 5.

      In general, we want to do the opposite to what is happening on the same side as the x.

      Say we have this:
      4x + 2 = 6
      We would want to subtract 2, as that would help us get closer to having only x on one side.
      (6 votes)
  • winston baby style avatar for user ♉ARE-GO-DIP♉
    In the equation, is the 2nd part a negative 6?
    and if so, How did Sal get -26?
    Is there even a negative 6?

    Sorry for all the questions! 😥
    (3 votes)
    Default Khan Academy avatar avatar for user
    • primosaur ultimate style avatar for user BronsonFebruary
      For your first question, you'll have to explain a little more. "How did Sal get a negative?" is a little vague.
      Yes, the 2nd part is a negative 6 or a minus 6 depending on how you look at it. They're the same thing. -6 = -6
      Sal got the -26 by subtracting 20 from both sides, to "add like terms".
      Yes, there is a -6. The reverse of positive numbers are negative numbers.

      Never be afraid to ask questions!
      Hope this helps.
      (4 votes)
  • aqualine seed style avatar for user Caleb Ogbike
    Am i the only one feeling his explanations are too extended...
    (0 votes)
    Default Khan Academy avatar avatar for user
    • stelly blue style avatar for user Kim Seidel
      Everyone learns at a different pace. Some people need more explanation than others. Sal is trying to teach to meet the needs of as many students as possible. So, yes, that means there will be people who think he is going into too much detail. You have options - you can watch just part of the video, or you can speed up the video if you understand what he is explaining.
      (9 votes)

Video transcript

We have the equation 20 minus 7 times x is equal to 6 times x minus 6. And we need to solve for x. So the way I like to do these is we just like to separate the constant terms, which are the 20 and the negative 6 on one side of the equation. I'll put them on the right-hand side. And then we'll put all the x terms, the negative 7x and the 6x, we'll put it all on the left-hand side. So to get the 20 out of the way from the left-hand side, let's subtract it. Let's subtract it from the left-hand side. But this is an equation, anything you do to the left-hand side, you also have to do to the right-hand side. If that is equal to that, in order for them to still be equal, anything I do to the left-hand side I have to do to the right-hand side. So I subtracted 20 from the left, let me also subtract 20 from the right. And so the left-hand side of the equation, 20 minus 20 is just 0. That was the whole point, they cancel out. Don't have to write it down. And then I have a negative 7x, it just gets carried down. And then that is equal to the right-hand side of the equation. I have a 6x. I'm not adding or subtracting anything to that. But then I have a negative 6 minus 20. So if I'm already 6 below 0 on the number line, and I go another 20 below that, that's at negative 26. Now, the next thing we want to do is we want to get all the x terms on the left-hand side. So we don't want this 6x here, so maybe we subtract 6x from both sides. So let's subtract 6x from the right, subtract 6x from the left, and what do we get? The left-hand side, negative 7x minus 6x, that's negative 13x. Right? Negative 7 of something minus another 6 of that something is going to be negative 13 of that something. And that is going to be equal to 6x minus 6x. That cancels out. That was the whole point by subtracting negative 6x. And then we have just a negative 26, or minus 26, depending on how you want to view it, so negative 13x is equal to negative 26. Now, our whole goal, just to remember, is to isolate the x. We have a negative 13 times the x here. So the best way to isolate it is if we have something times x, if we divide by that something, we'll isolate the x. So let's divide by negative 13. Now, you know by now, anything you do to the left-hand side of an equation, you have to do to the right-hand side. So we're going to have to divide both sides of the equation by negative 13. Now, what does the left-hand side become? Negative 13 times x divided by negative 13, that's just going to be x. You multiply something times x, divide it by the something, you're just going to be left with an x. So the left-hand side just becomes an x. x is equal to negative 26 divided by negative 13. Well, that's just positive 2, right? A negative divided by a negative is a positive. 26 divided by 13 is 2. And that is our answer. That is our answer. Now let's verify that it really works. That's the fun thing about algebra. You can always make sure that you got the right answer. So let's substitute it back into the original equation. So we have 20 minus 7 times x-- x is 2-- minus 7 times 2 is equal to 6 times x-- we've solved for x, it is 2-- minus 6. So let's verify that this left-hand side really does equal this right-hand side. So the left-hand side simplifies to 20 minus 7 times 2, which is 14. 20 minus 14 is 6. That's what the left-hand side simplifies to. The right-hand side, we have 6 times 2, which is 12 minus 6. 12 minus 6 is 6. So they are, indeed, equal, and we did, indeed, get the right answer.