AP · Precalculus · Transformations and Function Models

Transformations of Functions

17 min readUpdated November 30, 2026FreeAP Precalculus, Polynomial and Rational Functions

A transformation of a function changes its graph in a predictable way, and every one you need fits the pattern g(x)=a f(b(x−h))+kg(x) = a\,f\big(b(x - h)\big) + k. The numbers outside ff (aa and kk) act on the outputs, so they move the graph vertically and change the range; the numbers inside (bb and hh) act on the inputs, so they move it horizontally and change the domain. Each point (x,y)(x, y) on y=f(x)y = f(x) lands at (xb+h, ay+k)\left(\dfrac{x}{b} + h,\ ay + k\right).

Quick check

  1. If f(x)=x2f(x) = x^2, what is f(x−3)f(x - 3)?Show answerHide answer

    (x−3)2(x - 3)^2. You replace every xx in the rule with x−3x - 3.

  2. A function ff is increasing on [0,4][0, 4]. Is −f-f increasing or decreasing on [0,4][0, 4]?Show answerHide answer

    Decreasing. Multiplying every output by −1-1 reverses the order of the outputs, so larger inputs now give smaller outputs.

  3. The point (2,5)(2, 5) is on the graph of y=f(x)y = f(x). Which point must be on the graph of y=f(x)+3y = f(x) + 3?Show answerHide answer

    (2,8)(2, 8). Adding 33 to every output moves each point up 33 units.

Know these already? Jump to the practice questions

What you'll be able to do

  • Describe the effect of each parameter aa, bb, hh and kk in g(x)=a f(b(x−h))+kg(x) = a\,f\big(b(x - h)\big) + k on the graph.
  • Determine the domain and range of a transformed function from those of ff.
  • Find the image of a point under a combination of transformations, applying them in the right order.
  • Identify a transformation by comparing a table or graph of gg with one of ff.
  • Write an expression for a transformed function from a description.

Key terms

Translation

A shift of the whole graph: f(x)+kf(x) + k moves it up kk units, and f(x−h)f(x - h) moves it right hh units.

In plain English
The graph slides without changing shape.
Don't write
"f(x−3)f(x - 3) moves the graph left 3"; it moves right.

Dilation

A stretch or compression: a f(x)a\,f(x) is a vertical dilation by a factor of ∣a∣\lvert a \rvert, and f(bx)f(bx) is a horizontal dilation by a factor of 1∣b∣\dfrac{1}{\lvert b \rvert}.

In plain English
The graph is pulled away from, or pushed toward, an axis.
Don't write
That f(2x)f(2x) stretches the graph horizontally by 22; it compresses it by a factor of 12\dfrac{1}{2}.

Reflection

A flip in an axis: −f(x)-f(x) reflects the graph in the xx-axis, and f(−x)f(-x) reflects it in the yy-axis.

In plain English
A mirror image of the graph.
Don't write
That −f(x)-f(x) and f(−x)f(-x) are the same transformation.

What do translations do to a graph?

Adding kk outside ff adds kk to every output, so y=f(x)+ky = f(x) + k moves the graph up kk units (down if k<0k < 0). Replacing xx with x−hx - h inside ff moves the graph right hh units (left if h<0h < 0).

The horizontal sign surprises people, so think about inputs. For g(x)=f(x−3)g(x) = f(x - 3), the output of gg at x=5x = 5 is f(2)f(2). Every output of ff now turns up 33 units later on the xx-axis, so the graph has moved right.

Learn this: under g(x)=f(x−h)+kg(x) = f(x - h) + k, the point (x,y)(x, y) moves to (x+h, y+k)(x + h,\ y + k). So the domain shifts by hh and the range shifts by kk.

For example, if ff has domain −2≤x≤4-2 \le x \le 4 and range 0≤y≤60 \le y \le 6, then g(x)=f(x+1)−5g(x) = f(x + 1) - 5 has h=−1h = -1 and k=−5k = -5. Its domain is −3≤x≤3-3 \le x \le 3 and its range is −5≤y≤1-5 \le y \le 1.

Check yourself

The point (2,7)(2, 7) is on the graph of y=f(x)y = f(x). Which point must be on the graph of y=f(x−4)+1y = f(x - 4) + 1?
Show answerHide answer

(6,8)(6, 8). The input moves right 44 and the output moves up 11.

What do dilations and reflections do?

Multiplying outside, y=a f(x)y = a\,f(x), multiplies every output by aa. The graph is stretched vertically by ∣a∣\lvert a \rvert when ∣a∣>1\lvert a \rvert > 1 and compressed when 0<∣a∣<10 < \lvert a \rvert < 1; a negative aa also reflects it in the xx-axis. The domain stays the same, and the range is multiplied by aa, with its ends swapping when a<0a < 0.

Multiplying inside, y=f(bx)y = f(bx), divides every input by bb: to get the output f(6)f(6) you now need x=6bx = \dfrac{6}{b}. So the graph is dilated horizontally by a factor of 1∣b∣\dfrac{1}{\lvert b \rvert}, and a negative bb reflects it in the yy-axis. The range stays the same, and the domain is divided by bb.

Learn this: a f(x)a\,f(x) sends (x,y)(x, y) to (x, ay)(x,\ ay); f(bx)f(bx) sends (x,y)(x, y) to (xb, y)\left(\dfrac{x}{b},\ y\right).

With ff again having domain [−2,4][-2, 4] and range [0,6][0, 6]: −3f(x)-3f(x) has range [−18,0][-18, 0], f(2x)f(2x) has domain [−1,2][-1, 2], and f(−x)f(-x) has domain [−4,2][-4, 2].

Key idea

Outside changes act on outputs exactly as written; inside changes act on inputs in reverse, so you divide by bb and add hh.

Check yourself

The range of ff is [−1,5][-1, 5]. What is the range of y=−2f(x)y = -2f(x)?
Show answerHide answer

[−10,2][-10, 2]. Multiplying the ends by −2-2 gives 22 and −10-10, and they swap order.

In what order do combined transformations act?

In g(x)=a f(b(x−h))+kg(x) = a\,f\big(b(x - h)\big) + k, follow the order of operations on each axis.

  • Horizontal: dilate by 1b\dfrac{1}{b} (reflecting if b<0b < 0), then translate by hh.
  • Vertical: dilate by aa (reflecting if a<0a < 0), then translate by kk.

Learn this: a point (x,y)(x, y) on y=f(x)y = f(x) moves to (xb+h, ay+k)\left(\dfrac{x}{b} + h,\ ay + k\right).

The inside must be written as b(x−h)b(x - h) before you read hh. In f(2x−6)f(2x - 6), factor out the 22: f(2(x−3))f\big(2(x - 3)\big) is a horizontal compression by 12\dfrac{1}{2} followed by a shift right 33, not 66.

With f(x)=x2f(x) = x^2 and g(x)=−2f(x−3)+1g(x) = -2f(x - 3) + 1, the vertex (0,0)(0, 0) moves to (3,1)(3, 1), and (1,1)(1, 1) moves to (3+1, −2+1)=(4,−1)(3 + 1,\ -2 + 1) = (4, -1). The graph of y=x2y = x^2 and its image y=−2(x−3)2+1y = -2(x - 3)^2 + 1 shows the parabola flipped, narrowed and moved to the new vertex.

Examiner's eye

Marks are lost when hh is read from f(bx−c)f(bx - c) without factoring out bb. Rewrite the inside as b(x−h)b(x - h) first.

Check yourself

The point (4,2)(4, 2) is on the graph of y=f(x)y = f(x). Which point must be on the graph of y=f(2(x+1))−3y = f\big(2(x + 1)\big) - 3?
Show answerHide answer

(1,−1)(1, -1). The new xx is 42−1=1\dfrac{4}{2} - 1 = 1, and the new yy is 2−3=−12 - 3 = -1.

How do you identify a transformation from a table or a graph?

Match up corresponding points, then ask which coordinate changed and how.

  • If the outputs are the same list moved to different inputs, the change is horizontal: compare the inputs to find bb and hh.
  • If the inputs are the same and the outputs differ, the change is vertical: two columns give two equations for aa and kk.
xx0011223344
f(x)f(x)3311440022
g(x)g(x)7733991155

The inputs match, so try g(x)=a f(x)+kg(x) = a\,f(x) + k. At x=3x = 3, a(0)+k=1a(0) + k = 1, so k=1k = 1. At x=0x = 0, 3a+1=73a + 1 = 7, so a=2a = 2. Then test a column you did not use: at x=2x = 2, 2(4)+1=92(4) + 1 = 9. So g(x)=2f(x)+1g(x) = 2f(x) + 1.

On a graph, do the same with features you can read exactly: a vertex, an intercept or an endpoint.

Check yourself

f(0)=1f(0) = 1, f(2)=5f(2) = 5, f(4)=3f(4) = 3, f(6)=8f(6) = 8, and g(0)=1g(0) = 1, g(1)=5g(1) = 5, g(2)=3g(2) = 3, g(3)=8g(3) = 8. Write gg in terms of ff.
Show answerHide answer

g(x)=f(2x)g(x) = f(2x). The same outputs appear at half the inputs, which is a horizontal compression by a factor of 12\dfrac{1}{2}.

Worked example 1: Domain and range after a transformation

Question: The function ff has domain −4≤x≤2-4 \le x \le 2 and range −1≤y≤3-1 \le y \le 3. Let g(x)=2f(x−5)+1g(x) = 2f(x - 5) + 1. Find the domain and range of gg.

What tells you the method

Domain and range of a transformed function mean you move the endpoints: inside changes for the domain, outside changes for the range.

  1. Step 1: Move the domain.

    h=5h = 5, so −4+5=1-4 + 5 = 1 and 2+5=72 + 5 = 7.

    Why

    f(x−5)f(x - 5) needs x−5x - 5 in [−4,2][-4, 2], which means xx is in [1,7][1, 7].

  2. Step 2: Move the range.

    2(−1)+1=−12(-1) + 1 = -1 and 2(3)+1=72(3) + 1 = 7.

    Why

    Each output is doubled, then raised by 11; a=2>0a = 2 > 0, so the ends keep their order.

Check it

The smallest output of ff is −1-1, and 2(−1)+1=−12(-1) + 1 = -1 is the smallest output of gg; the largest, 33, becomes 77.

Answer

The domain of gg is 1≤x≤71 \le x \le 7 and the range is −1≤y≤7-1 \le y \le 7.

Worked example 2: A combined transformation

Question: The point (4,−2)(4, -2) lies on the graph of y=f(x)y = f(x). Let g(x)=−f(2x+6)+4g(x) = -f(2x + 6) + 4. Describe the transformations from ff to gg in order, and find the point on the graph of gg that (4,−2)(4, -2) moves to.

What tells you the method

A number multiplying xx inside ff means you factor it out before reading the shift.

  1. Step 1: Rewrite the inside.

    2x+6=2(x+3)2x + 6 = 2(x + 3), so g(x)=−f(2(x+3))+4g(x) = -f\big(2(x + 3)\big) + 4, with a=−1a = -1, b=2b = 2, h=−3h = -3 and k=4k = 4.

    Why

    hh can only be read from the form b(x−h)b(x - h).

  2. Step 2: Describe the transformations.

    Horizontal: compress by a factor of 12\dfrac{1}{2}, then shift left 33. Vertical: reflect in the xx-axis, then shift up 44.

    Why

    On each axis, the dilation or reflection comes before the translation.

  3. Step 3: Move the point.

    xx: 42−3=−1\dfrac{4}{2} - 3 = -1. yy: −(−2)+4=6-(-2) + 4 = 6.

    Why

    (x,y)→(xb+h, ay+k)(x, y) \to \left(\dfrac{x}{b} + h,\ ay + k\right).

Check it

At x=−1x = -1, the inside is 2(−1)+6=42(-1) + 6 = 4, so g(−1)=−f(4)+4=−(−2)+4=6g(-1) = -f(4) + 4 = -(-2) + 4 = 6.

Answer

The image of (4,−2)(4, -2) is (−1,6)(-1, 6).

Worked example 3: Reading the parameters from a table

Question: The table gives values of ff and gg, where g(x)=a f(x−3)+kg(x) = a\,f(x - 3) + k and f(x)≥1f(x) \ge 1 for all xx.

xx−2-2−1-1001122
f(x)f(x)5522112255
xx1122334455
g(x)g(x)−7-7−1-111−1-1−7-7

(a) Find aa and kk. (b) Determine the range of gg.

What tells you the method

h=3h = 3 is given, so g(x)g(x) pairs with f(x−3)f(x - 3); two pairs give two equations for aa and kk.

  1. Step 1: Pair the values.

    g(3)=a f(0)+kg(3) = a\,f(0) + k, so a+k=1a + k = 1. g(4)=a f(1)+kg(4) = a\,f(1) + k, so 2a+k=−12a + k = -1.

    Why

    x=3x = 3 and x=4x = 4 give the simplest values of ff.

  2. Step 2: Solve.

    Subtracting gives a=−2a = -2, so k=3k = 3.

    Why

    The two equations share kk, so subtracting removes it.

  3. Step 3: Find the range.

    f(x)≥1f(x) \ge 1, so −2f(x−3)≤−2-2f(x - 3) \le -2, and g(x)≤−2+3=1g(x) \le -2 + 3 = 1.

    Why

    Multiplying by a negative number reverses the inequality.

Check it

g(1)=−2f(−2)+3=−10+3=−7g(1) = -2f(-2) + 3 = -10 + 3 = -7, which matches the table.

Answer

(a) a=−2a = -2 and k=3k = 3. (b) The range of gg is y≤1y \le 1.

Your turn

Question: The point (6,2)(6, 2) lies on the graph of y=f(x)y = f(x). Find the point it moves to on the graph of g(x)=3f(12(x+1))−4g(x) = 3f\left(\dfrac{1}{2}(x + 1)\right) - 4.

  1. Step 1:

    Read the parameters: a=3a = 3, b=12b = \dfrac{1}{2}, h=−1h = -1, k=−4k = -4.

  2. Step 2:

    The new xx must make the inside equal 66: 12(x+1)=6\dfrac{1}{2}(x + 1) = 6, so x=11x = 11. Now find the new yy.

Show the full solutionHide the solution

At x=11x = 11, g(11)=3f(6)−4=3(2)−4=2g(11) = 3f(6) - 4 = 3(2) - 4 = 2. The formula agrees: 61/2−1=11\dfrac{6}{1/2} - 1 = 11 and 3(2)−4=23(2) - 4 = 2.

Answer: The image point is (11,2)(11, 2).

Traps

Trap

The graph of y=f(x−3)y = f(x - 3) is the graph of ff moved 3 units left.

It seems right because "minus" sounds like moving toward negative numbers. But f(x−3)f(x - 3) reaches each output 33 units later, at a larger input, so the graph moves right.

Check yourself

Where is the vertex of y=(x+4)2y = (x + 4)^2?
Show answerHide answer

(−4,0)(-4, 0). The graph of y=x2y = x^2 moves 44 units left, because x+4=x−(−4)x + 4 = x - (-4).

Trap

The graph of y=f(2x−6)y = f(2x - 6) is the graph of y=f(2x)y = f(2x) shifted right 6.

It seems right because 66 is the number subtracted. But the shift is read from b(x−h)b(x - h): 2x−6=2(x−3)2x - 6 = 2(x - 3), so the shift is 33.

Check yourself

What is the horizontal shift in y=f(3x+12)y = f(3x + 12)?
Show answerHide answer

44 units left. 3x+12=3(x+4)3x + 12 = 3(x + 4), so h=−4h = -4.

Trap

The graph of y=f(2x)y = f(2x) is twice as wide as the graph of y=f(x)y = f(x).

It seems right because multiplying by 22 usually makes things bigger. But f(2x)f(2x) reaches each output at half the input, so the graph is compressed to half its width.

Check yourself

ff has domain [0,8][0, 8]. What is the domain of y=f(2x)y = f(2x)?
Show answerHide answer

[0,4][0, 4]. The input 2x2x must lie in [0,8][0, 8], so xx lies in [0,4][0, 4].

What's examined

Transformations belong to Unit 1, Polynomial and Rational Functions, on the AP® Precalculus exam, and reappear with every later function type. Questions in both sections give ff as a graph, a table or a rule. Expect "Identify" (the transformation or a parameter), "Determine" (a domain, range or image point), "Write an expression" (for gg from a description) and "Justify" (citing which coordinate changed and how). These are by-hand skills; a graphing calculator can confirm a sketch by overlaying ff and gg.

Practice questions

  1. Recall The graph of y=f(x)y = f(x) is translated 44 units left and 22 units down. Which is an equation of the new graph?
  • A) y=f(x−4)−2y = f(x - 4) - 2
  • B) y=f(x+2)−4y = f(x + 2) - 4
  • C) y=f(x+4)−2y = f(x + 4) - 2
  • D) y=f(x+4)+2y = f(x + 4) + 2
Show answer

Answer: C) y=f(x+4)−2y = f(x + 4) - 2.

Marking points:

  • Left 44 means h=−4h = -4, so the inside is x+4x + 4; down 22 means k=−2k = -2.
  • A moves right; B swaps the two shifts; D moves up.
  1. Recall The point (−3,8)(-3, 8) lies on the graph of y=f(x)y = f(x). Find the point it moves to on the graph of y=12f(−x)y = \dfrac{1}{2}f(-x).
Show answer

Answer: The image point is (3,4)(3, 4).

Marking points:

  • f(−x)f(-x) reflects in the yy-axis: x=−3x = -3 becomes 33.
  • 12\dfrac{1}{2} halves the output: 88 becomes 44.
  1. Apply The function ff has domain [−6,2][-6, 2] and range [−4,10][-4, 10]. What is the range of g(x)=−12f(x)+3g(x) = -\dfrac{1}{2}f(x) + 3?
  • A) [−2,5][-2, 5]
  • B) [1,8][1, 8]
  • C) [−5,2][-5, 2]
  • D) [−132,12]\left[-\dfrac{13}{2}, \dfrac{1}{2}\right]
Show answer

Answer: A) [−2,5][-2, 5].

Marking points:

  • −12(−4)+3=5-\dfrac{1}{2}(-4) + 3 = 5 and −12(10)+3=−2-\dfrac{1}{2}(10) + 3 = -2, so the range is [−2,5][-2, 5].
  • B ignores the reflection; C leaves out the +3+3; D adds 33 before multiplying.
  1. Apply Let f(x)=x2f(x) = x^2. The graph of gg is obtained from the graph of ff by a horizontal dilation by a factor of 33, then a reflection in the xx-axis, then a translation 55 units up. Write an expression for g(x)g(x).
Show answer

Answer: g(x)=−(x3)2+5g(x) = -\left(\dfrac{x}{3}\right)^2 + 5.

Marking points:

  • A horizontal dilation by a factor of 33 means b=13b = \dfrac{1}{3}, so the input is x3\dfrac{x}{3}.
  • The reflection in the xx-axis gives a=−1a = -1, and the translation gives k=5k = 5.
  • Test a point: (3,9)(3, 9) on ff moves to (9,−9+5)=(9,−4)(9, -9 + 5) = (9, -4), and g(9)=−(93)2+5=−4g(9) = -\left(\dfrac{9}{3}\right)^2 + 5 = -4.
  1. Apply Values of ff are f(0)=3f(0) = 3, f(1)=7f(1) = 7, f(2)=2f(2) = 2, f(3)=5f(3) = 5 and f(4)=9f(4) = 9. Values of gg are g(0)=7g(0) = 7, g(1)=2g(1) = 2, g(2)=5g(2) = 5 and g(3)=9g(3) = 9. Which could define gg?
  • A) g(x)=f(x−1)g(x) = f(x - 1)
  • B) g(x)=f(x+1)g(x) = f(x + 1)
  • C) g(x)=f(x)+1g(x) = f(x) + 1
  • D) g(x)=f(x)−1g(x) = f(x) - 1
Show answer

Answer: B) g(x)=f(x+1)g(x) = f(x + 1).

Marking points:

  • Each output of gg equals the output of ff one input later: g(0)=f(1)=7g(0) = f(1) = 7, g(3)=f(4)=9g(3) = f(4) = 9.
  • A shifts the wrong way: it would need g(1)=f(0)=3g(1) = f(0) = 3; C and D are vertical shifts, but g(0)−f(0)=4g(0) - f(0) = 4 while g(1)−f(1)=−5g(1) - f(1) = -5.
  1. Exam-style The function ff has domain −2≤x≤6-2 \le x \le 6 and range 0≤y≤40 \le y \le 4. Let g(x)=3f(1−x)−2g(x) = 3f(1 - x) - 2. Determine the domain and the range of gg.
Show answer

Answer: The domain of gg is −5≤x≤3-5 \le x \le 3 and the range is −2≤y≤10-2 \le y \le 10.

Marking points:

  • The input 1−x1 - x must lie in [−2,6][-2, 6]: −2≤1−x≤6-2 \le 1 - x \le 6 gives −5≤x≤3-5 \le x \le 3.
  • The range: 3(0)−2=−23(0) - 2 = -2 and 3(4)−2=103(4) - 2 = 10; a=3>0a = 3 > 0, so the order is kept.
  1. Exam-style The point (2,−3)(2, -3) lies on the graph of y=f(x)y = f(x). Which point must lie on the graph of y=−2f(12x−1)y = -2f\left(\dfrac{1}{2}x - 1\right)?
  • A) (2,6)(2, 6)
  • B) (5,6)(5, 6)
  • C) (6,−6)(6, -6)
  • D) (6,6)(6, 6)
Show answer

Answer: D) (6,6)(6, 6).

Marking points:

  • The inside must equal 22: 12x−1=2\dfrac{1}{2}x - 1 = 2 gives x=6x = 6.
  • The output is −2(−3)=6-2(-3) = 6.
  • A multiplies by bb instead of dividing; B reads the shift as 11 without factoring out 12\dfrac{1}{2}; C ignores the reflection.

Key points

Recall, then reveal

Say the main points from memory first, then check them.

Show key pointsHide key points
  • In a f(b(x−h))+ka\,f\big(b(x - h)\big) + k, the outside numbers aa and kk change outputs and the range; the inside numbers bb and hh change inputs and the domain.
  • Inside changes work in reverse: f(x−h)f(x - h) moves right hh, and f(bx)f(bx) dilates horizontally by 1b\dfrac{1}{b}.
  • A point moves from (x,y)(x, y) to (xb+h, ay+k)\left(\dfrac{x}{b} + h,\ ay + k\right); dilations and reflections come before translations.
  • Factor bb out of the inside before reading hh.
  • From a table, matching outputs at new inputs signal a horizontal change; changed outputs at the same inputs signal a vertical one.

Figures

The upward parabola y = x² with vertex at the origin, and its image y = −2(x − 3)² + 1, a narrower downward parabola with vertex at (3, 1). (open full size in a new tab)
The graph of y = x² and its image y = −2(x − 3)² + 1

Keep learning

Explore AP Precalculus tutoring →

View the full Precalculus syllabus →

More in this unit

Polynomial and Rational Functions

All Transformations and Function Models notes

Part of Novark's AP Precalculus notes