math.wiki
Functions › Transformations of functions › Combining transformations and the general form
Open on the map
Algebra 2 · F.BF.B.3 · G.CO.A.2

Combining transformations and the general form

A rule like y = -2(x - 5)^3 + 7 moves its parent graph several ways at once. Which moves, in what order, and where does each point land?

Where you are 7 in Transformations of functions

When you reach for it

Each lesson before this one taught a single move: shifts, reflections and stretches. Most rules do several at once. In

y = -2(x - 5)^3 + 7

the parent y = x^3 is shifted, stretched, flipped and shifted again. Reach for this lesson when you need to read every move off such a rule, put the moves in the order they really happen, and carry single points of the parent across to the new graph. Those carried points are what graphing by transformations joins into a whole curve.

The procedure

The general form

Every rule built from a parent f by these moves can be written as

g(x) = a\,f\big(b(x - h)\big) + k

with a \ne 0 and b \ne 0. Two numbers sit outside f and act on the output, the height. Two sit inside and act on the input, the horizontal position.

NumberWhere it sitsWhat it does to the graph
aoutside, multipliesvertical stretch by \lvert a \rvert (a compression if \lvert a \rvert < 1); a reflection across the x-axis if a < 0
koutside, addedshift up k (down if k < 0)
binside, multiplieshorizontal compression by \displaystyle \frac{1}{\lvert b \rvert} (a stretch if \lvert b \rvert < 1); a reflection across the y-axis if b < 0
hinside, subtractedshift right h (left if h < 0)

Each row is one earlier lesson’s result. What is new is how they fit together.

Where one point goes

Take a point (p, q) on the graph of f, so f(p) = q. Choose the input \displaystyle x = \frac{p}{b} + h. Then

b(x - h) = b \cdot \frac{p}{b} = p

so g(x) = a\,f(p) + k = aq + k. The point therefore lands at

(p,\ q) \;\mapsto\; \left(\frac{p}{b} + h,\ aq + k\right)

Read \mapsto as “goes to”. The new x-coordinate uses only b and h; the new y-coordinate uses only a and k.

The order the moves apply in

Read the order straight off the image point. The height aq + k is worked out as the Order of operations says: multiply by a, then add k. So the vertical stretch (with any flip) comes before the vertical shift. The position \displaystyle \frac{p}{b} + h has the same shape: divide by b, then add h. So the horizontal stretch (with any flip) comes before the horizontal shift.

The inside looks backwards because it is. The rule takes x, subtracts h, multiplies by b, and only then hands the result to f. To find which x reaches the parent’s input p, you undo those steps in reverse: divide by b, then add h. It is the same reversal that makes f(x - 5) a shift to the right.

The two directions do not interfere. Horizontal moves never change a height and vertical moves never change a position, so the horizontal pair and the vertical pair can be done in either order, or interleaved. Within each direction, though, the stretch or flip comes first and the shift second.

Getting the inside into shape first

The table reads h only when the inside is written b(x - h), with b multiplying the whole bracket. So \displaystyle \sqrt{3x + 6} must be factored first: 3x + 6 = 3(x + 2), giving b = 3 and h = -2, a shift of 2 to the left, not 6. A minus sign in front of x is a b of -1: 5 - x = -(x - 5), so h = 5.

Worked examples

Example 1

Reading the moves and moving four points

Describe, in order, how y = -2(x - 5)^3 + 7 is built from y = x^3. Then carry the parent’s points (-1, -1), (0, 0), (1, 1) and (2, 8) across.

Solution

Matching with a\,f\big(b(x - h)\big) + k for f(x) = x^3 gives a = -2, b = 1, h = 5, k = 7. With b = 1 there is no horizontal stretch. The moves: shift right 5; stretch vertically by 2 and reflect across the x-axis; then shift up 7. The stretch must come before the shift up; the shift right, being horizontal, could come at any point.

Each point goes to (p + 5,\ -2q + 7):

Parent pointx: add 5y: times -2, then add 7Image
(-1, -1)42 + 7 = 9(4, 9)
(0, 0)50 + 7 = 7(5, 7)
(1, 1)6-2 + 7 = 5(6, 5)
(2, 8)7-16 + 7 = -9(7, -9)

Check one in the rule: -2(7 - 5)^3 + 7 = -16 + 7 = -9. The cubic’s center (0, 0) ends up at (h, k) = (5, 7), and the curve now falls from left to right because of the flip.

Example 2

Factoring the inside first

Describe how \displaystyle y = \sqrt{3x + 6} - 4 is built from \displaystyle y = \sqrt{x}, and carry (0, 0), (1, 1), (4, 2) and (9, 3) across.

Solution

The inside is not yet of the form b(x - h), so factor out the 3:

\sqrt{3x + 6} - 4 = \sqrt{3(x + 2)} - 4

So a = 1, b = 3, h = -2, k = -4. The moves: compress horizontally by a factor of \displaystyle \frac{1}{3} toward the y-axis, then shift left 2; and shift down 4. Each point goes to \displaystyle \left(\frac{p}{3} - 2,\ q - 4\right):

\begin{aligned} (0, 0) &\mapsto (-2, -4) \\ (1, 1) &\mapsto \left(-\tfrac{5}{3}, -3\right) \\ (4, 2) &\mapsto \left(-\tfrac{2}{3}, -2\right) \\ (9, 3) &\mapsto (1, -1) \end{aligned}

Check the last: \displaystyle \sqrt{3 \cdot 1 + 6} - 4 = 3 - 4 = -1.

x
y
(9,\,3)
(1,\,-1)
\div 3
-2
-4
\displaystyle y = \sqrt{x}
\displaystyle y = \sqrt{3x + 6} - 4
Figure 1One point of \displaystyle y = \sqrt{x} carried onto \displaystyle y = \sqrt{3x + 6} - 4. The horizontal compression comes before the shift left; the shift down can happen at any time.

Reading the unfactored 3x + 6 as “compress by \displaystyle \frac{1}{3}, then shift left 6” sends 9 to 3 - 6 = -3, where \displaystyle \sqrt{3(-3) + 6} is not even defined. The 6 is a shift of 6 only if it comes before the compression: 9 - 6 = 3, then 3 \div 3 = 1, the same answer. Factoring puts the compression first, the order the table uses.

Example 3

The same two moves in the opposite order

Ashanti starts from \displaystyle y = \frac{1}{x}, shifts it up 7, then compresses it vertically by a factor of \displaystyle \frac{1}{3}. Chinwe does the same two moves the other way round. Write both rules, and follow the point (1, 1) through each.

Solution

A vertical compression multiplies the whole current output by \displaystyle \frac{1}{3}. Ashanti’s output after her shift is \displaystyle \frac{1}{x} + 7, so her rule is

y = \frac{1}{3}\left(\frac{1}{x} + 7\right) = \frac{1}{3} \cdot \frac{1}{x} + \frac{7}{3}

Chinwe compresses first and then adds 7:

y = \frac{1}{3} \cdot \frac{1}{x} + 7

Ashanti’s moves take (1, 1) up to (1, 8), then to a third of the height, \displaystyle \left(1, \frac{8}{3}\right). Chinwe’s take it to \displaystyle \left(1, \frac{1}{3}\right), then up to \displaystyle \left(1, \frac{22}{3}\right). The graphs differ. Both rules have \displaystyle a = \frac{1}{3}, but Ashanti’s has \displaystyle k = \frac{7}{3} and Chinwe’s k = 7. The k of the general form is the shift done last; a shift done before a stretch is stretched along with everything else.

Example 4

A reflection inside the bracket

Describe how \displaystyle y = \frac{1}{3}\sqrt{-x - 2} + 7 is built from \displaystyle y = \sqrt{x}, and carry (0, 0), (1, 1), (4, 2) and (9, 3) across.

Solution

Factor -1 out of the inside: -x - 2 = -(x + 2). So \displaystyle a = \frac{1}{3}, b = -1, h = -2, k = 7. Horizontally: reflect across the y-axis, then shift left 2. Vertically: compress by a factor of \displaystyle \frac{1}{3}, then shift up 7. A point goes to \displaystyle \left(-p - 2,\ \frac{q}{3} + 7\right):

\begin{aligned} (0, 0) &\mapsto (-2, 7) \\ (1, 1) &\mapsto \left(-3, \tfrac{22}{3}\right) \\ (4, 2) &\mapsto \left(-6, \tfrac{23}{3}\right) \\ (9, 3) &\mapsto (-11, 8) \end{aligned}

Check: \displaystyle \frac{1}{3}\sqrt{11 - 2} + 7 = 1 + 7 = 8. The graph starts at (-2, 7) and runs to the left, because the reflection turned it round before the shift. Shifting first would have put the start at (2, 7), where -x - 2 = -4 and the rule is not defined.

Example 5

Running a point backwards

The graph of a function f passes through (-3, 1), and g(x) = -2\,f\big(3(x + 2)\big) + 7. Which point of g does (-3, 1) go to? And if the graph of g passes through (1, -3), which point must lie on the graph of f?

Solution

Here a = -2, b = 3, h = -2, k = 7. The parent can be any function; the moves do not depend on it.

Forwards, \displaystyle (p, q) \mapsto \left(\frac{p}{3} - 2,\ -2q + 7\right), so (-3, 1) \mapsto (-1 - 2,\ -2 + 7) = (-3, 5).

Backwards, undo each move in reverse order with the opposite operation. Vertically the rule multiplied by -2, then added 7: so subtract 7, then divide by -2, giving \displaystyle \frac{-3 - 7}{-2} = 5. Horizontally the point was divided by 3, then moved by -2: so add 2, then multiply by 3, giving 3(1 + 2) = 9. The point (9, 5) is on f. Check: g(1) = -2\,f(9) + 7 = -10 + 7 = -3.

The horizontal undo, 3(x + 2), is exactly the inside of the rule. The rule is an instruction: go back to the parent and look up the height there.

Example 6

A scale model of a ski jump

Efua’s ski club stores the profile of its large landing hill as a table for f: x is meters along from the take-off edge, f(x) is height in meters relative to the edge (negative is below it).

x015304560
f(x)0-3-9-15-18

A training hill is to be built with profile \displaystyle g(x) = \frac{1}{3}\,f\big(3(x - 5)\big) + 7, measured from a fence post. Make the table for g, and explain why the training hill is a true scale model.

Solution

\displaystyle a = \frac{1}{3}, b = 3, h = 5, k = 7, so each point goes to \displaystyle \left(\frac{p}{3} + 5,\ \frac{q}{3} + 7\right). With no formula for f, carrying points is the only way in: the table is the function.

x510152025
g(x)76421

For instance 15 \mapsto 5 + 5 = 10 and -3 \mapsto -1 + 7 = 6. Check: \displaystyle g(10) = \frac{1}{3}\,f(15) + 7 = -1 + 7 = 6.

Both directions shrink by the same factor \displaystyle \frac{1}{3}: the hill is 20 meters long instead of 60 and drops 6 meters instead of 18. So every slope is unchanged. Between x = 15 and x = 30 the big hill drops 6 meters over 15; between 10 and 15 the small one drops 2 over 5, the same steepness. The shifts only place the hill on the site, with its take-off edge at (5, 7).

Boundaries

  • a and b must not be 0. With a = 0 the rule is the flat line y = k, and with b = 0 it is the flat line y = a\,f(0) + k, or no graph at all if f(0) is undefined, as for \displaystyle \frac{1}{x}. The parent’s shape is gone, so there is no move to describe.
  • The table reads h only from the factored inside b(x - h).
  • The moves describe the rule, and one graph can have more than one description. For the parent x^2, (3x)^2 = 9x^2: a horizontal compression by \displaystyle \frac{1}{3} and a vertical stretch by 9 give the same graph. And (-x)^2 = x^2, so reflecting that parabola across the y-axis changes nothing; which graphs have that mirror is the subject of Symmetry about the vertical axis and the origin.
  • Stretches are measured from the axes, not from the curve: a vertical stretch multiplies every height, pulling points away from the x-axis. That is why a stretch done after a shift stretches the shift too.
  • Only these four kinds of move fit the form. A half turn about the origin does fit, since it is the two reflections together, -f(-x), but any other rotation cannot be written as a\,f\big(b(x - h)\big) + k, and a quarter turn usually stops a graph being a function at all.

Where this goes next

Graphing by transformations joins carried points into whole curves and tracks how the domain and range move. Finding the rule of a transformed graph runs this lesson backwards, from a graph or table to a, b, h and k. Vertex form a(x - h)^2 + k is the general form for the parabola with b = 1. And a\,f\big(b(x - h)\big) + k is a function of a function, f sandwiched between two straight-line rules, an idea taken further in Combining and composing functions. Of the moves, shifts and reflections keep every distance, the rigid motions of geometry; stretches do not.

Exercises

Reading the moves

Give a, b, h and k, and describe the moves in order, starting from the parent named.

  1. \displaystyle y = 4\sqrt{x - 6} + 1, from \displaystyle y = \sqrt{x}
  2. \displaystyle y = -\frac{1}{x + 3} - 2, from \displaystyle y = \frac{1}{x}
  3. \displaystyle y = \frac{1}{2}(x - 4)^3 + 5, from y = x^3
  4. \displaystyle y = \sqrt{2x - 8}, from \displaystyle y = \sqrt{x}
  5. \displaystyle y = -3\sqrt{4 - x} + 2, from \displaystyle y = \sqrt{x}

From words to a rule

  1. Start from y = x^3. Compress horizontally by a factor of \displaystyle \frac{1}{2}, shift right 3, stretch vertically by 5, then shift down 1. Write the rule.
  2. Start from \displaystyle y = \sqrt{x}. Shift left 4, then reflect across the y-axis. Write the rule and give its h.
  3. Start from \displaystyle y = \frac{1}{x}. Shift down 2, then stretch vertically by 4. Write the rule in the general form and give a and k.

Moving points

  1. Where does the point (2, 8) of y = x^3 go on y = 3(x + 1)^3 - 5?
  2. Where does the point (4, 2) of \displaystyle y = \sqrt{x} go on \displaystyle y = -\sqrt{2(x - 3)} + 6?
  3. Where does the point \displaystyle \left(\frac{1}{2}, 2\right) of \displaystyle y = \frac{1}{x} go on \displaystyle y = \frac{2}{x - 4} + 1?
  4. A function f has f(6) = -2. Which point is on the graph of g(x) = 5\,f\big(2(x + 1)\big) - 3?
  5. The graph of \displaystyle g(x) = -f\left(\frac{x}{4}\right) + 2 passes through (8, -1). Which point must be on the graph of f?
  6. A function f has f(-2) = 5, f(0) = 1, f(2) = -3 and f(4) = 0. Give the four matching points of g(x) = 2\,f(-x) + 1.

Problems

  1. Hosni models a skateboard ramp with a profile r, in meters, whose lip is the point (12, 3). A larger ramp has profile \displaystyle R(x) = 2\,r\left(\frac{x}{2}\right) - 1. Where is its lip, and why is the larger ramp the same shape?
  2. The graph of y = f(x) has its lowest point at (2, -1). Where does that point go on y = 3\,f(x + 4) + 2, and on y = -3\,f(x + 4) + 2? What kind of point is it on each?

Reasoning

  1. Explain why the two moves in y = f(x - 3) + 2 can be done in either order, but the two moves in y = 2\,f(x) + 1 cannot.
  2. Kamau reads \displaystyle y = \sqrt{4x - 8} as “compress horizontally by \displaystyle \frac{1}{4}, then shift right 8”. Follow the point (4, 2) his way and the correct way, and use the rule to show which is right.
  3. Show that \displaystyle y = \sqrt{4x} and \displaystyle y = 2\sqrt{x} are the same rule. Describe each as a move of \displaystyle y = \sqrt{x}. What does that say about describing a graph by its moves?
  4. Explain why undoing g(x) = a\,f\big(b(x - h)\big) + k takes a point (x, y) of g back to \displaystyle \left(b(x - h),\ \frac{y - k}{a}\right) on f, and why the undo steps come in reverse order.
Answers
  1. a = 4, b = 1, h = 6, k = 1. Shift right 6; stretch vertically by 4, then shift up 1.
  2. a = -1, b = 1, h = -3, k = -2. Shift left 3; reflect across the x-axis, then shift down 2. The minus sign in front of the fraction is a.
  3. \displaystyle a = \frac{1}{2}, b = 1, h = 4, k = 5. Shift right 4; compress vertically by \displaystyle \frac{1}{2}, then shift up 5.
  4. a = 1, b = 2, h = 4, k = 0. Factor: 2x - 8 = 2(x - 4). Compress horizontally by \displaystyle \frac{1}{2}, then shift right 4.
  5. a = -3, b = -1, h = 4, k = 2, since 4 - x = -(x - 4). Reflect across the y-axis, then shift right 4; stretch vertically by 3 and reflect across the x-axis, then shift up 2.
  6. y = 5\big(2(x - 3)\big)^3 - 1, which is y = 40(x - 3)^3 - 1. The compression is b = 2; it comes before the shift, so it multiplies the whole bracket (x - 3).
  7. \displaystyle y = \sqrt{-x + 4} = \sqrt{-(x - 4)}, so h = 4. The shift gives \displaystyle \sqrt{x + 4}; the reflection then replaces x by -x, which carries the shift to the other side.
  8. \displaystyle y = 4\left(\frac{1}{x} - 2\right) = 4 \cdot \frac{1}{x} - 8, so a = 4 and k = -8. The stretch stretches the shift too.
  9. (1, 19). x: 2 - 1 = 1; y: 3 \cdot 8 - 5 = 19. Check: 3(1 + 1)^3 - 5 = 19.
  10. (5, 4). x: \displaystyle \frac{4}{2} + 3 = 5; y: -2 + 6 = 4. Check: \displaystyle -\sqrt{2 \cdot 2} + 6 = 4.
  11. \displaystyle \left(\frac{9}{2}, 5\right). Here a = 2, h = 4, k = 1: x: \displaystyle \frac{1}{2} + 4; y: 2 \cdot 2 + 1 = 5.
  12. (2, -13). x: \displaystyle \frac{6}{2} - 1 = 2; y: 5(-2) - 3 = -13.
  13. (2, 3). Undo: x: \displaystyle \frac{8}{4} = 2; y: \displaystyle \frac{-1 - 2}{-1} = 3. Check: g(8) = -f(2) + 2 = -3 + 2 = -1.
  14. (2, 11), (0, 3), (-2, -5), (-4, 1). Here b = -1 negates each x, and each height q becomes 2q + 1.
  15. (24, 5). \displaystyle b = \frac{1}{2} doubles the x: 24; y: 2 \cdot 3 - 1 = 5. Both directions are stretched by 2, so every slope is unchanged; the -1 only lowers the ramp.
  16. (-2, -1), still the lowest point; and (-2, 5), now the highest point. x: 2 - 4 = -2; y: 3(-1) + 2 = -1, or -3(-1) + 2 = 5. The flip turns the lowest point into the highest.
  17. In f(x - 3) + 2 one move is horizontal and one vertical, and each changes a different coordinate, so neither affects the other. In 2\,f(x) + 1 both act on the height: doubling then adding takes q to 2q + 1, but adding first gives 2(q + 1) = 2q + 2.
  18. Correct: 4x - 8 = 4(x - 2), so (4, 2) \mapsto (1 + 2, 2) = (3, 2), and \displaystyle \sqrt{4 \cdot 3 - 8} = 2. Kamau’s way gives (1, 2) and then (9, 2), but \displaystyle \sqrt{4 \cdot 9 - 8} = \sqrt{28} \ne 2. A shift of 8 is right only before the compression.
  19. For x \ge 0, \displaystyle \sqrt{4x} = \sqrt{4}\,\sqrt{x} = 2\sqrt{x}, and for x < 0 neither is defined, so the rules agree everywhere. \displaystyle \sqrt{4x} reads as a horizontal compression by \displaystyle \frac{1}{4} (b = 4); \displaystyle 2\sqrt{x} reads as a vertical stretch by 2 (a = 2). The moves read off a rule are one description of the graph, not the only one.
  20. g(x) = y means a\,f\big(b(x - h)\big) + k = y, so \displaystyle f\big(b(x - h)\big) = \frac{y - k}{a}: the parent has height \displaystyle \frac{y - k}{a} at input b(x - h). Forwards a height is multiplied by a and then k is added, so the undo subtracts k first and divides by a second. Forwards a position is divided by b and then h is added, so the undo subtracts h, then multiplies by b. Each undo reverses the last step first.
kg1128 · updated 2026-10-14 · CC-BY-SA-4.0