# What's the difference between these two transformations of functions?

I'm about to graph the transformation of a function, but in this problem I encountered something new. The function transformation looks like this:

y=12(f(x)+2)

Thing is, I've never seen the f encapsulated in parentheses, so I'm unsure what effect it has. Essentially, I'm wondering what the difference between the above transformation and this one is:

y=12f(x)+2

What do I do differently on the top one when compared to what is done to the bottom one? Is there even any difference?

-
Af(x)+B is f(x) vertically stretched by a factor of A and vertically shifted by a factor of b. Expand y=12(f(x)+2), and see what happens. –  mrc Nov 10 '13 at 18:19
I'm still lost.. What do you mean by expand? English isn't my native language, so I'm not too familiar with its math terminology. –  Threethumb Nov 10 '13 at 18:28
To expand is to remove parentheses. Here this is done by multiplication. For example, 2(a+b)--expand-->2a+2b –  mrc Nov 10 '13 at 18:42

It has to do with order of operations. Recall that when doing arithmetic, we do multiplication before addition. If we want to do addition before multiplication, we must use brackets. For example: $$1 + 2 \times 3 = 1 + 6 = 7$$ while on the other hand: $$(1 + 2) \times 3 = 3 \times 3 = 9$$
Likewise, the transformation $y=af(x) + b$ can be interpreted to mean: "Vertically expand $f(x)$ by a factor of $a$, then vertically translate the result up by $b$ units."
On the other hand, the transformation $y = a(f(x) + b)$ can be interpreted to mean: "Vertically translate $f(x)$ up by $b$ units, then vertically expand the result by a factor of $a$."