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

Order of operations, more examples

Complete a series of order of operations problems, including expressions with variables. Created by Sal Khan and CK-12 Foundation.

Want to join the conversation?

  • blobby green style avatar for user William Hightower
    Ok its () then exponents then X dividing from left to right and - and + from left to right?? is that correct?
    (21 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user Kristin Earnst
    Since a fraction is basically division, why do we do the addition in the denominator before the division of the fraction at -- 2x4 over 4-8?
    (11 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user nathen.gallagher
      The two parts of a fraction are assumed to be basically in big parentheses of their own. The division caused by the fraction line becomes the last thing you do when you solve a fraction. So for example,
      2+6
      ------
      5-1

      Where the line in the middle is a fraction line. We don't usually write the parentheses around the whole numerator and denominator when we put things in fraction form, but they're assumed. So that can also be viewed as basically (2+6) / (5-1). That's why you do the things above and below the line before you solve the fraction.
      (17 votes)
  • hopper cool style avatar for user Rathony
    In a test the other day, we had 19 - 10 + 8. The majority of the class put down the answer as 1 because 19 - (10 + 8). But apparently the answer was 17, because (19 - 10) + 8. Why is this? Surely if you follow the order of operations rules the answer would be 1?
    (5 votes)
    Default Khan Academy avatar avatar for user
    • leaf orange style avatar for user kradler97
      In the order of operations the operations addition and subtraction are considered of the same order even though PEMDAS makes it seem like addition should come first. If you think about it subtraction is just the addition of a negative number. Since addition and subtraction are the same you answer the question in left to right order so you do 19-10 and then add 8. Hope I could help
      (8 votes)
  • blobby green style avatar for user Josh Brenner
    I'm confused about applying the order of operations to questions that are structured like 1d, 3b, and 3d. For example, 1d (Starts @ ):

    2(3+(2-1))
    ------------- - (3 - 5)
    4-(6+2)

    To me, I see the line ------------- between the top and bottom expression as division. With that being said, following PEDMAS tells me that I after I solve inside the parantheses and perform the left most multiplication I am left with:

    8
    ------- - (-2)
    4 - 8

    So, then how does this reduce to:

    8
    ---- + 2 = -2 + 2 = 0 ?
    -4

    Specifically, how can we subtract 4 - 8 in the divisor, before performing the division? It seems that it is the only way to solve the equation but I am looking for clarification as I hate making assumptions in math. My questions are as follows:

    #1: When dealing with an equation with this structure can I assume there are parentheses around both the divisor and the dividend? ie.

    [ 2(3+(2-1)) ]
    ------------------- - (3 - 5)
    [ 4-(6+2) ]

    #2. Maybe a technicality, but do I refer to division structured like this a fraction as opposed to calling it division? Are the top and bottom expression the numerator and denominator or the dividend and divisor? Would that make it a fractional expression? To me division and a fraction are the same, an operation partitioning a number or expression into equal groups...

    #3. Is there any law in mathematics saying that we can evaluate the top and bottom expression independently from each other, that is, follow the order of operations in the top expression, then follow the order of operations in the bottom expression, and then perform the division?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • hopper cool style avatar for user Chuck Towle
      Josh,
      Excellent questions.

      Your #1 assumption is correct. When it is written so that it is clear what is in the denominator and what is in the numerator, you need to think of it as having parenthesis around the numerator and parenthesis around the denominator.

      #2. You can call it a fraction or call it division. Whether you call it a fraction with a numerator and denominator or division with a dividend and divisor does not matter. They different ways of looking at the same thing.

      When you have a problem with a fraction such as one-ninth (1/9) or division of 1/9 it is the same thing and can be represented as a repeating decimal of .11111111... where 1 repeats forever. But many times you would just leave it as a fraction of 1/9.

      #3. Yes, the numerator and denominator must always be solved as if they have parenthesis around them. You must evaluate the numerator, evaluate the denominator, and then divide.

      Sometimes you run into a problem like this 1/1/4. It must be solved from left to right. 1/1/4 = (1/1)/4 = 1/4 = 0.25.
      But if it is written as
      1
      ---------
      1/4

      then it means (1)/(1/4) which equals 4.

      You sometimes have to watch very carefully to see the way the problem is written to evaluate the equation correctly. People have made serious errors, coming to incorrect conclusions, because the misread the problem and end up "proving" some theorem based on this kind of error where they make 1/1/4 = 1/(1/4).

      I hope that helps!
      (5 votes)
  • blobby green style avatar for user bob
    what are the steps in solving 4(x-2)+2(x+3)=6
    (2 votes)
    Default Khan Academy avatar avatar for user
  • mr pants teal style avatar for user Juice Monster
    I still dont get the parenthese part
    (1 vote)
    Default Khan Academy avatar avatar for user
  • piceratops ultimate style avatar for user Abhay Garg
    what do i do with this equation?
    x-(2x-2-1)/5=4
    (2x-2-1)/5 is a fraction
    (3 votes)
    Default Khan Academy avatar avatar for user
  • leaf blue style avatar for user Susanna Miles
    what is the answer to problem 4c?
    it has been suggested that the last number on the left side of the equation needs to be a 5 instead of a 6 to make the statement true / or to put the parantheses between the two 2s of 22 at the beginning - I have not seen any other solutions to the problem.
    How do I get the correct answer?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user Alex
      There is no legal way to get this answer, seems to be a typo. You can solve it if you change the 6 to a 5

      With the correction the solution would be:
      22 - 32 - 5 x (3 - 5) = 30

      22 - 32 - 5 x (3 -5) = -10-5 x (-2)
      -10-5 x (-2) = -15 x (-2)
      -15 x (-2) = 30
      (4 votes)
  • blobby green style avatar for user Twaunette
    In a linear equation with brackets and parenthesis, where do I begin?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user zeds
    Does the order of mult vs dividing ever really make the answer different? Same question with add and subtract...
    (3 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user tusculum
      Actually, (4*3)/4 = 12/4 = 3, and 4 * (3/4) = 4 * .75 = 3. The order of multiplication and division should not matter. If changing the order of multiplying and dividing yields different results, there's a mistake somewhere.

      Addition and subtraction are the same. 4 + 3 - 2 should produce the same result whether we do (4 + 3) - 2 or 4 + (3 - 2). Let's see:
      (4 + 3) - 2 = 7 - 2 = 5
      4 + (3 - 2) = 4 + 1 = 5

      What does matter is that multiplication and division need to happen before addition and subtraction unless the parentheses indicate otherwise. I agree with Surya's PEMDAS guideline.
      (2 votes)

Video transcript

Let's do some order of operations problems, and for the sake of time I'll do every other problem. So let's start with 1b. 1b right there. They have 2 plus 7 times 11 minus 12 divided by 3. So just remember, the top priority is always going to be your parentheses. So you have your parentheses-- Let me write it this way. Your top priority's going to be your parentheses, after that you're going to have your exponents, after that you have multiplying and dividing, and after that you have addition and subtraction. So let's remember that and tackle these order of operations problems. So priority, there's no parentheses here, there's no exponents, so the priority's going to go to multiplication and division. So you could view this as being equivalent to-- So we're going to do our multiplication before we do any addition or subtraction, and we're going to do our division before doing any addition or subtraction. Problem 1b is exactly equivalent to this, the parentheses are just-- I'm reinforcing the notion that I'm going to do my multiplication and division before I do the addition and the subtraction. So 7 times 11 is 77, and then 12 divided by 3 is 4. And the rest of the problem was 2 plus this thing, which is 77, minus this thing. And here, since everything is in addition or subtraction, let's just go left to right. 2 plus 77 is 79 minus 4, which is equal to 75. So 1b is equal to 75. Let's do 1d. This is a nice hairy problem right there. So 1d. It says 2 times 3 plus 2 minus 1. Closing two parentheses, all of that over 4 minus 6 plus 2 minus 3 minus 5. Let's see if we can simplify this a little bit. As we said, parentheses take our priority. So let's do the parentheses first. 2 minus 1. 2 minus 1 is just 1. 3 minus 5. That is minus 2, or negative 2, I should say. 6 plus 2 is 8. Now let's keep looking at the parentheses to see where we can simplify things. We have this parentheses right here. So 3 plus this 1 is now going to be equal to 4. Actually, let me rewrite it. So we're going to have 2 times this whole expression, 3 plus 1, so it's 2 times 4. That right there is 4. All of that over 4 minus 8, that's negative 4. This right here is negative 4. And then minus this negative 2. So minus negative 2. 2 times 4 is 8, so this whole thing simplifies to-- A minus of a negative, that's just the plus of the plus, the negatives cancel out. So this whole thing simplifies to 8 divided by negative 4 is negative 2 plus 2. So it equals 0. So this big, hairy thing simplified to 0. Now let's do 2b. Let me clear some space here. I'll leave the order of operations stuff there. Let me clear that and let me clear this. All right, 2b. Evaluate the following expressions involving variables. Fair enough. So they wrote 2y squared, and they're saying that x is equal to 1, which is irrelevant because there is no x here, and y is equal to 5. So if y is equal to 5, this thing becomes the same thing as 2 times 5 squared. And notice, I put parentheses there. I could have written this as, this is the same thing as 2 times 5 squared. And if you look at the order of operations, exponents take priority over multiplication. That's why in my head I just automatically put those parentheses. We're going to do the exponent first. So this is 25, so you get 2 times 25 is equal to 50. So that is 2b, this is equal to-- use a darker color --that is equal to 50. Let's do 2d. They're giving us y squared minus x, whole thing squared. x is equal to 2 and y is equal to 1. Well, we just substitute. Where we see a y we put a 1. So this is going to be 1 squared minus x squared-- Sorry, minus x, not x squared. So we just put a regular x there. That's where we put a 2. And then all of that squared. Well 1 squared is just 1, so that is just 1. 1 minus 2 is negative 1. And then we're going to want to square our negative 1, so that will be equal to positive 1. So that is equal to 1. Negative times a negative is a positive. All right, let's do 3b. Doing every other problem. I'll do it in yellow. Evaluate the following expressions involving variables. All right. Same idea. So they're giving us 4x over 9x squared. Oh, actually I said I'd do 3b, I was doing 3a. So here we go. We have z squared over x plus y plus x squared over x minus y. And they're telling us that x is equal to 1, y is equal to negative 2, and z is equal to 4. So let's just do our substitutions first. So z squared, that's the same thing as-- I'll do it in a different color --4 squared over x, 1, plus y, negative 2, plus x squared, that's 1 squared, over x, which is 1, minus y. y is negative 2. So this is going to be equal to 4 squared is 16 over 1 plus negative 2, that's 1 minus 2-- it's just a negative 1 --plus 1 squared, which is 1, over 1 minus negative 2. That's the same thing as 1 plus 2. So it's 1/3. And so this will be 16 divided by negative 1. We could write that as that's equal to negative 16 plus 1/3. Now if we want to actually add these as fractions we could have a common denominator. Negative 16 is the same thing as minus 48 over 3, or negative 48 over 3. If you take 48 divided by 3 you'll get 16, and I'm just keeping the negative sign. And then you add that plus 1/3. We have a common denominator now, 3. Negative 48 plus 1 is negative 47. So our answer is negative 47 over 3. Problem 3d. Same type of situation. x squared minus z squared over xz minus 2x times z minus x. x is equal to negative 1, z is equal to 3. Let's do our substitutions. So this is x squared. That's minus 1 squared. Minus z squared, so minus 3 squared. All of that over x times z. x times z is minus 1 times 3, minus 2 times x, x is negative 1, times z minus x, times 3 minus x. x is negative 1 minus x. Wherever we saw an x we put a minus 1. So this is going to be equal to-- Remember, you do your exponents first. Well, parentheses first, then exponents. So we have negative 1 squared, that's just a positive 1. 3 squared, that's just a positive 9. So our numerator becomes 1 minus 9, that's minus 8 or negative 8. And then our denominator. Negative 1 times 3 is negative 3. And then let's go to our parentheses here. We have 3 minus negative 1, that's the same thing as 3 plus plus 1. So that right there becomes 4. So our denominator becomes negative 3 minus 2 times negative 1 times 4, so that's negative 8. Minus negative 8. Minus of a negative is the same thing as a plus. So this whole thing becomes negative 8 over negative 3 plus 8 is 5. So it's negative 8/5, minus 8 over 5. All right, let me clear up some space just so we can reference this problem properly. Let me clear all of this out of the way. These are interesting now. Problem 4: insert parentheses in each expression to make it a true equation. Fascinating. So 4b. You have 12 divided by 4 plus 10 minus 3 times 3 plus 7 is equal to 11. So let's see what happens if we just do traditional order of operations, and I'll do a little bit in my head because this is going to take some experimentation. Oh yeah, this is 4b, 12 divided by 4-- Yep, that's the problem. So if did 12 divided by 4 first, and we would get 3. So let me just do this in yellow. So if we did regular order of operations this would be a 3. This right here would it be a 9. So you would have 3 plus 10, which is 13, minus 9, 13 minus 9 is 4 plus 7. Actually, that seems right. Let me make sure I did that right. 3 plus 10-- Right, that looks right. So we really just have to do regular order of operations. So it already looks like a true equation. So if you do 12 divided by 4 plus 10 minus 3 times 3 plus 7, I think it turns out right. Let me confirm. Make sure I'm not making a mistake. 12 divided by 4 is 3 plus 10 minus 3 times 3 is 9 plus 7. This is equal to 13 minus 9, which is equal to-- So all of this is equal to 13 minus 9 is equal to 4 plus 7 is, indeed, equal to 11. So that one wasn't too bad. You actually wouldn't have to put any parentheses to make this a true expression. You would just have to follow the order of operations. But throwing those parentheses there makes it a little bit easier to read. Let's try 4d. 12 minus 8 minus 4 times 5 is equal to minus 8. So first let's just see what happens if we did traditional order of operations. If we did traditional order of operations we would do this 4 times 5 first, which would give us 20 over there. And then we would have 12 minus 8 is 4. And then we would do 4 minus 20-- No, that's not right. That would give us negative 16. So that's not going to be right. So we can't just do traditional order of operations. Sorry, this is a minus 8 right there. So let's see how we can experiment with this. Let's try out a couple of situations. What if we did 12 minus 8 minus 4 and then multiplied that times 5. Let's see what this give us. I'm just experimenting with parentheses. So if you do 8 minus 4, that right there would be 8 minus 4 is 4. And then 4 times 5 would be 20, and then 12 minus 20-- yeah, that works. So let me confirm that. So I'm saying I'm going to put parentheses right there and right there and let's work it out. You would get 8 minus 4 is 4. So this whole thing was simplified to 12 minus 4 times 5. And you just do order of operations, you do multiplication first. So that is just 20. And if I wanted to make it very clear I could actually write it like this. I could actually put another round of parentheses right like that. But order of operations would tell us to do it anyway. So it becomes 12 minus 20, which is, indeed, minus 8 or negative 8.