← MATH 161 MathScape 0 MATH161

Combining Transformations

16 min read

Jump to a section

Textbook Reference

Primary source OpenStax Calculus Volume 1, Section 1.3: “New Functions from Old Functions”
Direct link https://openstax.org/books/calculus-volume-1/pages/1-3-the-basic-classes-of-functions
Supplementary OpenStax Algebra and Trigonometry 2e, Section 3.5: “Graphing Functions Using Transformations”
Supplementary link https://openstax.org/books/algebra-and-trigonometry-2e/pages/3-5-graphing-functions-using-transformations

Both sources are free and openly licensed. OpenStax Calculus Volume 1 Section 1.3 presents the standard form $y = Af(B(x-h)) + k$ and the order of transformations.


Try This First

Start with the function $f(x) = x^2$. Its vertex is at $(0, 0)$.

Before reading further, predict the following:

Consider the two sequences of operations applied to the graph:

Sequence A: First shift right 3 units, then stretch vertically by factor 2.

Sequence B: First stretch vertically by factor 2, then shift right 3 units.

  1. Predict: do you think the two sequences produce the same final graph? Write yes or no and your reasoning.

  2. Now apply Sequence A step by step. Write the formula after each step.

  3. Now apply Sequence B step by step. Write the formula after each step.

  4. Compare the final formulas. Do the two sequences give the same result?

Now try a different pair:

Sequence C: First shift right 3 units, then shift up 2 units.

Sequence D: First shift up 2 units, then shift right 3 units.

  1. Do Sequences C and D produce the same graph? Does the order matter here?

Order sometimes matters and sometimes does not, and the standard form organizes all four transformation types together.


Key idea

The previous two skills covered shifts and scalings separately. In practice, functions almost always involve combinations of both. The question is: when applying several transformations, does the order matter?

The short answer: order matters when mixing inside and outside transformations. It does not matter when combining two transformations of the same type (two outside, or two inside).

The standard form $y = Af(B(x - h)) + k$ is a precise way of saying: here are all four parameters, and here is the correct order in which to apply them when reading off or building a transformed graph.

Understand this form deeply rather than memorizing the letters.


Prerequisite Check

Before this lesson, make sure you can do all of the following:

If any of these is uncertain, review Vertical and Horizontal Shifts and Reflections and Stretches first.


Quick Reference

Standard form. \[ y = A f\bigl(B(x - h)\bigr) + k \]

Parameter Role Effect
$A$ Vertical scale factor (outside) Stretches/compresses vertically by $|A|$; reflects over $x$-axis if $A < 0$
$B$ Horizontal scale factor (inside) Compresses horizontally by $|B|$ if $|B| > 1$; reflects over $y$-axis if $B < 0$
$h$ Horizontal shift (inside) Shifts right by $h$ units
$k$ Vertical shift (outside) Shifts up by $k$ units

Order of application when building the graph.

  1. Start with the graph of $f$.
  2. Apply horizontal scaling by $B$ (compress/stretch/reflect horizontally).
  3. Apply horizontal shift by $h$ (move right $h$ units).
  4. Apply vertical scaling by $A$ (stretch/compress/reflect vertically).
  5. Apply vertical shift by $k$ (move up $k$ units).

Key points transform as. $(x, y) \to \left(\dfrac{x}{B} + h,\, Ay + k\right)$


Key Concepts

1. Why Order Matters: Inside vs. Outside

When transformations are of the same type (both inside the function, or both outside), they commute: applying them in either order gives the same result.

When transformations are of different types (one inside, one outside), they generally do not commute.

Example: shift then scale vs. scale then shift.

Start with $f(x) = x^2$.

Shift right 3, then stretch by 2:

Step 1: $f(x - 3) = (x-3)^2$.

Step 2: $2(x-3)^2$.

Result: $y = 2(x-3)^2$.

Stretch by 2, then shift right 3:

Step 1: $2f(x) = 2x^2$.

Step 2: $2(x-3)^2$.

Result: $y = 2(x-3)^2$.

In this case the two orders give the same result! This happens because vertical stretching and horizontal shifting are “perpendicular” -- they act on different coordinates and do not interfere. The situation where order matters is when a horizontal shift and a horizontal scale are both present.

Example: horizontal shift and horizontal scale.

Start with $f(x) = x^2$.

Shift right 3, then compress horizontally by 2 (replace $x$ with $2x$):

Step 1: $(x-3)^2$.

Step 2: Replace $x$ with $2x$: $(2x - 3)^2$.

Compress horizontally by 2, then shift right 3 (replace $x$ with $x - 3$):

Step 1: $(2x)^2 = 4x^2$.

Step 2: $4(x-3)^2$.

The results are different: $(2x-3)^2 \neq 4(x-3)^2$. Order matters when two horizontal transformations are combined (or two vertical transformations that do not simply add/multiply).

The safe rule. To avoid order ambiguity, always work with the standard form $y = Af(B(x-h)) + k$, where $B$ and $h$ are both inside and $A$ and $k$ are both outside. In this form, the four parameters are independent: read $B$ and $h$ from inside the function, read $A$ and $k$ from outside.


2. The Standard Form $y = Af(B(x - h)) + k$

Every combination of the four basic transformation types can be written in this form. Each parameter plays exactly one role.

Reading the parameters.

Given $y = 3f(2(x - 5)) - 1$:

Caution: the formula inside is $B(x - h)$, not $Bx - h$.

The expressions $2(x - 5)$ and $2x - 5$ are different:

$2(x-5) = 2x - 10$ (horizontal compression by 2 AND shift right 5).

$2x - 5$ (if written this way) must be rewritten: $2(x - 5/2)$, so $h = 5/2$.

Always factor out $B$ from the inside expression before reading off $h$.

Predict-then-check. Before working the next example, predict: what is $h$ if the inside expression is $3x - 6$? Write your answer. Then factor: $3x - 6 = 3(x - 2)$, so $B = 3$ and $h = 2$. Does your prediction match?


3. Applying Transformations to Key Points

When a specific function is not given but its graph is known through key points, the standard form tells exactly how each point transforms.

The transformation rule for key points.

If $(x_0, y_0)$ is on the graph of $f$, then the corresponding point on $y = Af(B(x-h)) + k$ is:

\[ \left(\frac{x_0}{B} + h,\; A y_0 + k\right) \]

Why this is true. On the graph of $f$, $y_0 = f(x_0)$. For the transformed function, we need:

$y = A f(B(x - h)) + k$

to equal $A y_0 + k$. This requires $B(x - h) = x_0$, so $x - h = x_0 / B$, giving $x = x_0/B + h$.

The point $(x_0, y_0)$ on $f$ maps to $(x_0/B + h, Ay_0 + k)$ on the transformed graph.

Numerical representation. Let $f$ have the table:

$x$ $-1$ $0$ $1$ $2$
$f(x)$ $4$ $0$ $-1$ $3$

Apply $g(x) = -2f(3(x - 1)) + 5$. Parameters: $A = -2$, $B = 3$, $h = 1$, $k = 5$.

Each $(x_0, y_0)$ maps to $(x_0/3 + 1, -2y_0 + 5)$:

$(x_0, y_0)$ from $f$ $x_0/3 + 1$ $-2 y_0 + 5$ Point on $g$
$(-1, 4)$ $-1/3 + 1 = 2/3$ $-8 + 5 = -3$ $(2/3, -3)$
$(0, 0)$ $0 + 1 = 1$ $0 + 5 = 5$ $(1, 5)$
$(1, -1)$ $1/3 + 1 = 4/3$ $2 + 5 = 7$ $(4/3, 7)$
$(2, 3)$ $2/3 + 1 = 5/3$ $-6 + 5 = -1$ $(5/3, -1)$

Translation prompt. From the table above, describe in words how the $x$-coordinates and $y$-coordinates changed. Which parameters controlled the $x$-changes? Which controlled the $y$-changes? Could you read the parameters $A$, $B$, $h$, $k$ directly from the comparison of two tables, without knowing the formula in advance? Try to describe a procedure for doing so.


4. Recovering Parameters from a Graph

If the transformed graph is given (as key points or a description) and the original graph $f$ is known, the four parameters $A$, $B$, $h$, $k$ can be recovered.

The reverse transformation rule.

If $(x_1, y_1)$ is on the transformed graph and $(x_0, y_0)$ is the corresponding point on $f$, then:

$x_1 = x_0/B + h \implies x_0 = B(x_1 - h)$

$y_1 = Ay_0 + k \implies y_0 = (y_1 - k)/A$

Strategy.

  1. Identify at least two corresponding pairs of points: $(x_0, y_0)$ on $f$ and $(x_1, y_1)$ on $g$.
  2. Use horizontal coordinates to find $B$ and $h$.
  3. Use vertical coordinates to find $A$ and $k$.

Why two points are needed for each type. One pair of corresponding points gives two equations (one for horizontal, one for vertical). Two pairs give four equations, which can determine all four unknowns $A$, $B$, $h$, $k$.


Named Misconception: action-view-of-function

The tempting reasoning. Students sometimes apply multiple transformations by rewriting each step as a new arithmetic action on $x$, in the order they are listed in the formula from left to right. For example, given $y = 2f(3x - 6) + 1$, they may read this as: “Multiply $x$ by 3, subtract 6, apply $f$, multiply by 2, add 1” -- and then describe the graph as compressed horizontally by 3, then shifted left 6, then stretched vertically by 2, then shifted up 1. The shift “left 6” is wrong.

Why this breaks. The correct reading requires factoring first: $3x - 6 = 3(x - 2)$. So the horizontal part is compression by $B = 3$ and shift right $h = 2$, not shift left 6. Applying the shift amount before factoring conflates the horizontal scale $B$ with the shift amount $h$.

Concrete test: the graph of $f(x) = x^2$ has vertex at $(0, 0)$. For $g(x) = 2f(3x-6)+1 = 2(3x-6)^2 + 1$: set the inside equal to zero, $3x - 6 = 0$, gives $x = 2$. The vertex of $g$ is at $(2, 1)$. The wrong reading (shift left 6) would place the vertex at $(-6, 1)$. These are not the same.

The repair. Always rewrite the inside expression in the form $B(x - h)$ before reading off $h$. The formula $3x - 6 = 3(x - 2)$ tells you $B = 3$ (horizontal compression) and $h = 2$ (shift right 2). The number $-6$ is not directly a shift amount; it is the product $-Bh = -(3)(2) = -6$.

A second manifestation. Students sometimes apply a vertical stretch before a vertical shift (or vice versa) without recognizing that the standard form fixes the order: the $Af(\cdot)$ wraps around the shift term $+k$ on the outside, so the correct reading is: the stretch $A$ acts on $f$’s outputs, and then $k$ is added. This is captured in the formula structure itself.


Worked Examples

Worked Example 1: Reading Parameters from Standard Form

Problem. For each function, identify $A$, $B$, $h$, $k$ and describe all transformations applied to $f$.

(a) $g(x) = -3f(x + 4) - 2$

(b) $h(x) = \dfrac{1}{2}f(4(x - 1)) + 7$

(c) $p(x) = 4f(2x - 6)$

Predict first. For each, predict the direction of the horizontal shift and whether the graph is reflected.

Solution.

(a) $g(x) = -3f(x + 4) - 2$.

Inside: $x + 4 = 1 \cdot (x - (-4))$. So $B = 1$, $h = -4$.

Outside: $A = -3$, $k = -2$.

Transformations: no horizontal scaling ($B = 1$); shift left 4 ($h = -4$); vertical stretch by 3 with reflection over $x$-axis ($A = -3$); shift down 2 ($k = -2$).

Key point rule: $(x_0, y_0) \to (x_0/1 + (-4), (-3)y_0 + (-2)) = (x_0 - 4, -3y_0 - 2)$.

(b) $h(x) = \frac{1}{2}f(4(x-1)) + 7$.

Inside: $4(x-1)$. So $B = 4$, $h = 1$.

Outside: $A = 1/2$, $k = 7$.

Transformations: horizontal compression by 4 ($B = 4$); shift right 1 ($h = 1$); vertical compression by $1/2$ ($A = 1/2$); shift up 7 ($k = 7$).

(c) $p(x) = 4f(2x - 6)$.

Factor inside: $2x - 6 = 2(x - 3)$. So $B = 2$, $h = 3$. Outside: $A = 4$, $k = 0$.

Transformations: horizontal compression by 2; shift right 3; vertical stretch by 4; no vertical shift.

The common error here is reading $h = -6$ (from $-6$ in $2x - 6$) rather than $h = 3$ (from $2(x-3)$). Factoring is required before reading $h$.


Worked Example 2: Building the Graph from Standard Form

Problem. The function $f$ has vertex at $(0, 0)$, passes through $(1, 1)$ and $(-1, 1)$, and has the shape of an upward-opening parabola. Write a specific formula for $f$. Then find the vertex and two other points of $g(x) = -2f(3(x - 2)) + 4$.

Predict first. Based on the parameters, predict: will the vertex of $g$ be above or below the $x$-axis? Will the parabola open upward or downward?

Solution.

$f(x) = x^2$.

Parameters: $A = -2$, $B = 3$, $h = 2$, $k = 4$.

Key point rule: $(x_0, y_0) \to (x_0/3 + 2, -2y_0 + 4)$.

Vertex of $f$: $(0, 0) \to (0/3 + 2, -2(0) + 4) = (2, 4)$.

The vertex of $g$ is at $(2, 4)$, above the $x$-axis.

Since $A = -2 < 0$, the parabola opens downward. The vertex $(2, 4)$ is a maximum.

Point $(1, 1)$ on $f$: $(1/3 + 2, -2(1) + 4) = (7/3, 2)$.

Point $(-1, 1)$ on $f$: $(-1/3 + 2, -2(1) + 4) = (5/3, 2)$.

Check. $g(2) = -2f(3(2-2)) + 4 = -2f(0) + 4 = -2(0) + 4 = 4$. Vertex confirmed. $g(7/3) = -2f(3(7/3 - 2)) + 4 = -2f(3 \cdot 1/3) + 4 = -2f(1) + 4 = -2(1) + 4 = 2$. Point $(7/3, 2)$ confirmed.

Direct expansion check. $g(x) = -2(3(x-2))^2 + 4 = -2 \cdot 9(x-2)^2 + 4 = -18(x-2)^2 + 4$. At $x = 2$: $-18(0) + 4 = 4$. At $x = 7/3$: $-18(7/3 - 2)^2 + 4 = -18(1/9) + 4 = -2 + 4 = 2$. Consistent.


Worked Example 3: Recovering Parameters from Key Points

Problem. The function $f$ has a maximum at $(0, 1)$ and zeros at $x = -1$ and $x = 1$ (so $f(x) = 1 - x^2$, although you should use only the key points for this problem).

The transformed graph $g$ has a maximum at $(3, 5)$ and zeros at $x = 1$ and $x = 5$.

Find $A$, $B$, $h$, $k$ so that $g(x) = Af(B(x-h)) + k$.

Predict first. The maximum moved from $(0, 1)$ to $(3, 5)$. Predict: is there a horizontal shift? A vertical shift? Is there a reflection?

Solution.

The maximum of $f$ is at $(0, 1)$; the maximum of $g$ is at $(3, 5)$. Use the key point rule:

$x_0/B + h = 3$ and $Ay_0 + k = 5$, with $x_0 = 0$ and $y_0 = 1$:

$0/B + h = 3 \implies h = 3$.

$A(1) + k = 5 \implies A + k = 5$. ... (Equation 1)

Now use a zero of $f$: $f(1) = 0$. The corresponding zero of $g$ is at $x = 5$.

$x_0/B + h = 5$ with $x_0 = 1$: $1/B + 3 = 5 \implies 1/B = 2 \implies B = 1/2$.

So horizontal stretch by factor $1/2$ (since $B = 1/2 < 1$).

Check with the other zero: $f(-1) = 0$. Corresponding zero: $-1/B + h = -1/(1/2) + 3 = -2 + 3 = 1$. The zero of $g$ at $x = 1$ matches.

Now use the zero of $g$: $g(5) = 0$. With $y_0 = 0$: $A(0) + k = 0 \implies k = 0$.

From Equation 1: $A + 0 = 5 \implies A = 5$.

So $A = 5$, $B = 1/2$, $h = 3$, $k = 0$.

$g(x) = 5f\bigl((1/2)(x - 3)\bigr) = 5\left(1 - \left(\frac{x-3}{2}\right)^2\right) = 5 - \frac{5(x-3)^2}{4}$.

Check. $g(3) = 5 - 0 = 5$. Maximum at $(3, 5)$. $g(1) = 5 - 5(1-3)^2/4 = 5 - 5(4)/4 = 5 - 5 = 0$. Zero at $x = 1$. $g(5) = 5 - 5(5-3)^2/4 = 5 - 5(4)/4 = 0$. Zero at $x = 5$. All conditions verified.


Worked Example 4: The Order of Operations Matters

Problem. Two students apply transformations to $f(x) = \sqrt{x}$ to obtain $g(x) = \sqrt{4x - 8}$.

Student A says: “Compress horizontally by 4, then shift right 8.”

Student B says: “Compress horizontally by 4, then shift right 2.”

Determine which student is correct by factoring and by checking a specific point.

Predict first. Factor $4x - 8$ before deciding. Which description matches the factored form?

Solution.

Factor: $4x - 8 = 4(x - 2)$. So $B = 4$ (horizontal compression) and $h = 2$ (shift right 2).

Student B is correct.

Why Student A is wrong. Student A read $-8$ as the shift amount. But $-8$ is the product $-Bh = -(4)(2) = -8$; it is not directly the shift amount. The shift amount is $h = 2$, obtained by factoring.

Check at a specific point. The graph of $f(x) = \sqrt{x}$ passes through $(4, 2)$. Using the key point rule with $B = 4$, $h = 2$: $(4/4 + 2, 2) = (3, 2)$. So $g(3) = \sqrt{4(3) - 8} = \sqrt{12 - 8} = \sqrt{4} = 2$. Confirmed.

If Student A were correct (shift right 8), the point $(4, 2)$ would map to $(4/4 + 8, 2) = (9, 2)$. Check: $g(9) = \sqrt{4(9) - 8} = \sqrt{36 - 8} = \sqrt{28} \neq 2$. Student A is incorrect.


Common Errors

Error Example Correction
Reading shift amount before factoring $f(3x-6)$: shift left 6 Factor first: $3(x-2)$; shift right 2; $h=2$ not $-6$
Wrong order for horizontal inside Applying shift before scale when both are inside Use standard form $B(x-h)$; scale by $B$, then shift by $h$
Confusing $B$ as stretch vs. compress $f(4x)$ stretches the graph wider $B=4>1$ compresses horizontally; features move to $x/4$
Sign error on $h$ $f(x-3)$ shifts left 3 Inside minus sign: shift right 3
Forgetting $A$ can include a reflection Describing $-2f(x)$ as “stretch by $-2$” $A=-2$: stretch by 2 AND reflect over $x$-axis

Common Misconceptions

Common misconception

the number subtracted inside $f(Bx - c)$ is the horizontal shift amount.

This is the action-view-of-function error. Treating the formula as a left-to-right sequence of arithmetic actions causes the reader to take $-c$ as a shift amount without first factoring. For $f(2x - 6)$, the action-view reading assigns a shift of $-6$ units, placing the vertex at $x = -6$ rather than $x = 3$. Factoring gives $2(x - 3)$, revealing $B = 2$ and $h = 3$: the shift is right 3, not left 6. The number $-6$ is the product $-Bh = -(2)(3)$, not a shift directly.


Leveled Practice

Level 1: Direct Application

Problem 1. For each function, identify $A$, $B$, $h$, $k$ (factor the inside expression first if needed).

(a) $g(x) = 5f(x - 3) + 2$

(b) $h(x) = -f(2x + 4)$

(c) $p(x) = \dfrac{1}{3}f(6x - 12) - 1$

Show answer

(a) Inside: $x - 3 = 1(x-3)$. $A = 5$, $B = 1$, $h = 3$, $k = 2$.

No horizontal scaling; shift right 3; vertical stretch by 5; shift up 2.

(b) Inside: $2x + 4 = 2(x + 2) = 2(x - (-2))$. $A = -1$, $B = 2$, $h = -2$, $k = 0$.

Horizontal compression by 2; shift left 2; reflection over $x$-axis (no stretch); no vertical shift.

(c) Inside: $6x - 12 = 6(x - 2)$. $A = 1/3$, $B = 6$, $h = 2$, $k = -1$.

Horizontal compression by 6; shift right 2; vertical compression by $1/3$; shift down 1.


Problem 2. The function $f$ has vertex at $(0, 0)$ and passes through $(1, 1)$ (so $f(x) = x^2$). For each transformation, find the vertex and one additional point of the graph.

(a) $g(x) = 3f(x - 2) + 1$ (b) $h(x) = -f(2x) + 4$

Show answer

(a) $A=3$, $B=1$, $h=2$, $k=1$. Key point rule: $(x_0, y_0) \to (x_0 + 2, 3y_0 + 1)$.

Vertex $(0,0) \to (2, 1)$. Point $(1,1) \to (3, 4)$.

Check: $g(2) = 3(2-2)^2 + 1 = 1$. $g(3) = 3(3-2)^2 + 1 = 3 + 1 = 4$. Correct.

(b) $A=-1$, $B=2$, $h=0$, $k=4$. Key point rule: $(x_0, y_0) \to (x_0/2, -y_0 + 4)$.

Vertex $(0,0) \to (0, 4)$. Point $(1,1) \to (1/2, 3)$.

Check: $h(0) = -(2 \cdot 0)^2 + 4 = 4$. $h(1/2) = -(2 \cdot 1/2)^2 + 4 = -1 + 4 = 3$. Correct.

The vertex is a maximum (parabola opens downward because $A = -1 < 0$).


Level 2: Recovering Parameters

Problem 3. The graph of $f$ passes through $(0, 0)$, $(1, 1)$, $(4, 2)$ (so $f(x) = \sqrt{x}$). The transformed graph $g$ passes through $(2, 3)$, $(3, 5)$, $(6, 7)$.

(a) Find the shift amounts by comparing the $x$ and $y$ coordinates at the points $(0, 0) \to (2, 3)$.

(b) Confirm your answer using the second pair: $(1, 1) \to (3, 5)$.

(c) Write the formula for $g$ in the form $g(x) = Af(\cdots) + k$.

Show answer

(a) $x_0 = 0 \to x_1 = 2$: horizontal shift right 2 (since $x_0/B + h = 2$ with $x_0 = 0$ gives $h = 2$; need another pair to find $B$).

$y_0 = 0 \to y_1 = 3$: $A(0) + k = 3 \implies k = 3$.

But $k = 3$ means the zero of $f$ maps to $y = 3$, which is not a zero of $g$. Check: is $(2, 3)$ a zero of $g$? The problem says $g$ passes through $(2, 3)$ with $y = 3 \neq 0$. So there is no reflection (the zero of $f$ is not a zero of $g$ unless $k = 0$). With $k = 3$.

(b) Second pair: $(1, 1) \to (3, 5)$. $x_0/B + h = 3$ with $h = 2$ gives $1/B = 1 \implies B = 1$. $A(1) + 3 = 5 \implies A = 2$.

(c) $A = 2$, $B = 1$, $h = 2$, $k = 3$: $g(x) = 2f(x - 2) + 3 = 2\sqrt{x-2} + 3$.

Check with third pair: $(4, 2) \to (6, 7)$. $g(6) = 2\sqrt{6-2} + 3 = 2\sqrt{4} + 3 = 4 + 3 = 7$. Correct.


Problem 4. Determine whether the following two expressions define the same function. If not, find a specific $x$-value where they differ.

$p(x) = f(2x - 4)$ and $q(x) = f(2(x-4))$

Show answer

Factor $p$: $2x - 4 = 2(x-2)$. So $p(x) = f(2(x-2))$: compression by 2, shift right 2.

$q(x) = f(2(x-4))$: compression by 2, shift right 4.

These are different. The shift amounts differ ($h = 2$ vs. $h = 4$).

Specific $x$-value: $p(3) = f(2(3)-4) = f(2)$. $q(3) = f(2(3-4)) = f(-2)$. Unless $f(2) = f(-2)$, these differ. For $f(x) = x^2$: $p(3) = f(2) = 4$; $q(3) = f(-2) = 4$. For $f(x) = \sqrt{x}$: $p(3) = \sqrt{2}$; $q(3) = \sqrt{-2}$ (undefined). So for $f(x) = x + 1$: $p(3) = f(2) = 3$; $q(3) = f(-2) = -1$. These are different.


Level 3: Extension and Justification

Problem 5. Consider $f(x) = \sin x$.

(a) Write $g(x) = \sin(2x - \pi)$ in the form $Af(B(x-h)) + k$.

(b) Identify $A$, $B$, $h$, $k$ and describe all transformations.

(c) The graph of $\sin x$ crosses zero at $x = 0$. Where does the graph of $g$ cross zero?

(d) The graph of $\sin x$ has a maximum at $x = \pi/2$. Where does $g$ have a maximum?

Show answer

(a) Factor inside: $2x - \pi = 2(x - \pi/2)$. So $g(x) = \sin(2(x - \pi/2)) = f(2(x - \pi/2))$.

$A = 1$, $B = 2$, $h = \pi/2$, $k = 0$.

(b) Horizontal compression by 2 (period halved from $2\pi$ to $\pi$); horizontal shift right $\pi/2$; no vertical change.

(c) $\sin x = 0$ at $x = 0$, $\pi$, $2\pi$, $-\pi$, ... Using the key point rule with $B = 2$, $h = \pi/2$: $x_0/2 + \pi/2$. At $x_0 = 0$: zero at $x = \pi/2$. At $x_0 = \pi$: zero at $\pi/2 + \pi/2 = \pi$. At $x_0 = -\pi$: zero at $-\pi/2 + \pi/2 = 0$.

So $g$ crosses zero at $x = 0, \pi/2, \pi, 3\pi/2, \ldots$

(d) $\sin x$ has maximum at $x = \pi/2$. Key point rule: $(\pi/2)/2 + \pi/2 = \pi/4 + \pi/2 = 3\pi/4$. The maximum of $g$ is at $x = 3\pi/4$.

Check: $g(3\pi/4) = \sin(2(3\pi/4) - \pi) = \sin(3\pi/2 - \pi) = \sin(\pi/2) = 1$. Maximum value 1. Correct.


Problem 6 (LFHC Extension). Given the transformed graph, recover all four parameters $A$, $B$, $h$, $k$.

The original function $f$ satisfies: maximum at $(0, 4)$, zeros at $x = -2$ and $x = 2$, minimum value $-4$ at $x = $ (unknown -- you may use only the information given).

Wait -- use $f(x) = 4\cos(\pi x/2)$ as your baseline, which matches: $f(0) = 4$, $f(\pm 2) = 4\cos(\pi) = -4$... actually use $f(x) = -x^2 + 4$ for concreteness: maximum $(0,4)$, zeros $x = \pm 2$.

The transformed graph $g$ has the following properties:

(a) Use the maximum to write two equations involving $A$, $h$, $k$ and $B$.

(b) Use one of the zeros to find $B$ (given $h$ from part a).

(c) Check with the second zero.

(d) Write the final formula.

Show answer

$f(x) = -x^2 + 4$. Key points: maximum $(0, 4)$; zeros $(\pm 2, 0)$.

(a) Maximum $(0, 4)$ on $f$ maps to $(5, 12)$ on $g$:

$x$-equation: $0/B + h = 5 \implies h = 5$.

$y$-equation: $A(4) + k = 12 \implies 4A + k = 12$. ... (Equation 1)

(b) Zero $(2, 0)$ on $f$ maps to a zero of $g$ at $x = 2$ or $x = 8$. Try $(2, 0) \to (2, ?)$:

$2/B + 5 = 2 \implies 2/B = -3 \implies B = -2/3$.

Negative $B$ means reflection over $y$-axis. That is allowed but let us check the other zero.

Try $(2, 0) \to (8, ?)$:

$2/B + 5 = 8 \implies 2/B = 3 \implies B = 2/3$.

For the zero of $f$ at $x = -2$: $-2/B + 5 = -2/(2/3) + 5 = -3 + 5 = 2$. So the zero $(-2, 0)$ maps to $(2, ?)$.

Both zeros of $f$ are accounted for: $(-2,0) \to (2, y)$ and $(2,0) \to (8, y)$.

$y$-coordinates at zeros: $A(0) + k = k$. So $k = 0$ if zeros of $g$ are at $y = 0$.

From the problem, zeros of $g$ are at $x = 2$ and $x = 8$, so $g(2) = 0$ and $g(8) = 0$, meaning $k = 0$.

(c) From Equation 1: $4A + 0 = 12 \implies A = 3$.

Check: $g$ has maximum $A f(x_0) + k = 3(4) + 0 = 12$ at $x = 5$. Confirmed.

(d) $A = 3$, $B = 2/3$, $h = 5$, $k = 0$.

$g(x) = 3f\!\left(\tfrac{2}{3}(x - 5)\right) = 3\left(-\left(\tfrac{2(x-5)}{3}\right)^2 + 4\right) = 3\left(-\tfrac{4(x-5)^2}{9} + 4\right) = -\tfrac{4(x-5)^2}{3} + 12$.

Spot check: $g(5) = 0 + 12 = 12$. $g(8) = -4(9)/3 + 12 = -12 + 12 = 0$. $g(2) = -4(9)/3 + 12 = 0$. All correct.


Mastery Checklist

You have mastered this skill when you can do all of the following without referring to notes:


Mental Model

Think of the standard form $y = Af(B(x-h)) + k$ as a recipe that processes a point in two separate stages.

Stage 1: input processing (inside the function).

The input $x$ first has $h$ subtracted from it ($x \to x - h$: horizontal shift), and then is multiplied by $B$ ($x - h \to B(x-h)$: horizontal scale). This processed input is fed into $f$.

Stage 2: output processing (outside the function).

$f$ produces its output. That output is multiplied by $A$ (vertical scale or reflection), and then $k$ is added (vertical shift).

The stages are independent: the inside stage handles horizontal geometry; the outside stage handles vertical geometry. Within each stage, the standard form fixes a definite order: scale before shift inside, scale before shift outside. (Because $B(x-h)$ is scaling followed by shifting -- or equivalently, you can read it as shifting followed by scaling if you track the coordinates of a specific point using the rule.)

The parameter recovery direction reverses the recipe: to find $B$ and $h$, look at how $x$-coordinates of key points changed; to find $A$ and $k$, look at how $y$-coordinates changed.


Connections

Within MATH161

Toward Later MATH161

Audience Notes

For students who find combining transformations confusing: The action-view error is extremely common, and working through it with a specific function (like $\sqrt{x}$) is more reliable than memorizing a rule. Pick two points on the original function, apply the key-point rule, and verify by plugging back into the formula. That verification step is always available and always decisive.

For students who want the deeper structure: The set of transformations $y = Af(B(x-h)) + k$ forms a group under composition (the affine group of the plane, acting separately on $x$ and $y$). The standard form is one canonical way to parameterize this group. When $A = \pm 1$ and $B = \pm 1$, only shifts and reflections remain; these form a subgroup (the dihedral group on the plane).

For students interested in applications: In data science, normalizing a data set by subtracting the mean and dividing by the standard deviation is exactly a transformation of this form: $g(x) = (1/\sigma)(x - \mu)$, with $A = 1/\sigma$, $B = 1$, $h = \mu$, $k = 0$. Understanding transformations of functions gives direct intuition for why normalization works.


Back to Ch. 1 Sec. 3 Skills | Previous: Reflections and Stretches | Next: Function Composition