Thursday, September 10, 2015

Transformations vs. Order of Operations

The following question was raised by one of the work groups in class today: Why is the order of performing transformations different than the order of operations?

We are studying function transformations like these:
From College Algebra by Coburn & Herdlick

Our explorations in class have supported our book's claim that function transformations must be applied in the following order:
  1. horizontal shifts
  2. reflections
  3. stretches/compressions
  4. vertical shifts
Does that sequence conflict with the order of operations? What a great question! Let’s explore it using the absolute value function f(x) = |x| as our parent function and using
g(x) = -2|x-1| + 5.
to define the intended transformation. Consider what happens to a point on the graph of y = |x| under this transformation. Let's use the point (5,5). Where does it end up after the transformation?

To find out, we evaluate f(5)= -2|5-1| + 8. This requires the following sequence of calculations:

  1.     5-1 = 4.         that’s the x-1 piece; there’s the horizontal shift*
  2.     |4| = 4.           that’s |x-1|; we have just applied the parent function, |x|.
  3.     -2*4 = 8.       that’s -2|x-1|; there’s the reflection (-) and vertical stretch (by 2).
  4.     8+5 = 13.      that’s -2|x-1|+5; there’s the vertical shift.
*But why is it a rightward shift? That's for another post.
Has the order of operations been maintained?

It is probably easiest to see if we use GEMA rather than PEMDAS to track the order of operations. They reflect the same underlying order of operations, but GEMA seems to produce fewer order of operations misconceptions (sounds like a PhD thesis topic to me!)

GEMA = Grouping symbols first, then Exponents, then Multiplication (and Division, from left to right), and finally Addition (and Subtraction, from left to right).

Now let’s step through GEMA:
G: Grouping symbols. The absolute value bars a type of grouping symbol (so are parentheses and brackets, square root symbols, and even the horizontal line that separates the numerator and denominator in a fraction). First, we work on the expression inside the grouping symbols (absolute value bars). There is only one operation to do in there: subtract 1 (step 1). Now we apply the absolute value bars (step 2), at which point the Grouping symbols are gone and we move on to….

E: Exponents. No exponents to deal with this time. Move on to….

M: Multiply (or Divide): With the || bars gone, the function now reads: f(4) = -2*4 + 5. We multiply by -2 next. This creates the reflection (step 3a) and stretch (3b).

A: Add (or Subtract): Only one thing left to do! (step 4).
Conclusion: It appears the transformations sequence is consistent with the order of operations.

I'm convinced. Are you?


  1. Thank you for linking to my blog post on using GEMA instead of order of operations. I have received great feedback from teachers who have tried using this method instead of PEMDAS.

    Lauren @

    1. I meant GEMA instead of PEMDAS--not order of operations!

  2. What if you graph Square root of (-x-2)? Does this follow order of operations?

  3. Nice question! It certainly follows order of operations--has to, right?

    x --> (-x) --> (-x)-1 --> sqrt((-x)-1)

    First work within the grouping symbol (sqrt). Then multiply x by -1. Then subtract. Now that's done, so look outside the grouping symbol. That means apply the sqrt.

    But the question is whether the "rules" provided by the book will yield the same result as applying the order of operations. The answer there is no, but that's ok: the conditions for applying the rules has not been met: the function is you named has a horizontal reflection (b/c of the -x), and the book's "rules" are not meant to be applied in that case.

  4. To me, the inside is the opposite of the order of operations. It's hard to see with a coefficient of -1. So consider sqrt(-2x-4). To get the transformed graph from the parent, there is a horizontal shrink by a factor of 2 and a reflection across the y-axis, and a horizontal shift of 2 to the see it, you have to write the expression sqrt(-2(x+2)). The order of operations would then indicate the "adding two" first due to the grouping symbol, but in fact the shrink and reflection indicated by the multiplication must be done first. (Also, the subtraction of -1 in the above example should indicate a more the the RIGHT, but the move is actually to the left, so it should be factored first to avoid confusion.)