Sub topic 8
Combining Transformations in the Right Order
Assume you can evaluate function notation, plot points, and recognize the graphs of basic parent functions. A transformation changes a graph’s position, size, or orientation. Several transformations can be combined in one equation, but the input and output changes must be interpreted separately.
The combined form
A useful general form is
\[ g(x)=a\cdot f\bigl(b(x-h)\bigr)+k. \]
Each parameter has a specific effect:
| Part | Effect | Column | Column |
|---|---|---|---|
| \(h\) | Horizontal shift right by \(h\) | ||
| \(b\) | Horizontal scale by \(1/ | b | \); reflect across the \(y\)-axis if \(b<0\) |
| \(a\) | Vertical scale by \( | a | \); reflect across the \(x\)-axis if \(a<0\) |
| \(k\) | Vertical shift up by \(k\) |
The horizontal changes appear inside \(f\), so they affect the input. The vertical changes appear outside \(f\), so they affect the output.
A reliable order
For
\[ g(x)=a\cdot f\bigl(b(x-h)\bigr)+k, \]
read the transformations in this order:
- Start with the parent graph \(y=f(x)\).
- Shift horizontally by \(h\).
- Apply the horizontal scale \(1/|b|\).
- Reflect across the \(y\)-axis if \(b<0\).
- Apply the vertical scale \(|a|\).
- Reflect across the \(x\)-axis if \(a<0\).
- Shift vertically by \(k\).
Horizontal scaling and reflection are both connected to the input. Vertical scaling and reflection are connected to the output. The order within each group can sometimes be rearranged, but separating input changes from output changes prevents most errors.
Worked example
Let
\[ g(x)=-2f\bigl(x-3\bigr)+1. \]
Here, \(a=-2\), \(b=1\), \(h=3\), and \(k=1\).
- \(x-3\) shifts the graph right 3 units.
- The value \(-2\) outside the function reflects the graph across the \(x\)-axis and stretches it vertically by 2.
- \(+1\) shifts the result up 1 unit.
If \(f(x)=x^2\), then
\[ g(x)=-2(x-3)^2+1. \]
The parent parabola has vertex \((0,0)\). After the horizontal shift, the vertex is \((3,0)\). The vertical reflection and stretch do not change its \(x\)-coordinate. The final upward shift gives the vertex \((3,1)\).
def transform(f, a=1, b=1, h=0, k=0):
"""Return g(x) = a * f(b * (x - h)) + k."""
return lambda x: a * f(b * (x - h)) + k
f = lambda x: x ** 2
g = transform(f, a=-2, b=1, h=3, k=1)
print(g(3)) # 1
print(g(4)) # -1
print(g(2)) # -1Tracking points directly
Instead of performing each step on a drawing, map a point from the parent graph. If \((x,y)\) lies on \(y=f(x)\), then its corresponding point on \(g\) is
\[ (x,y)\longmapsto \left(\frac{x}{b}+h,\ ay+k\right). \]
For \(g(x)=-2f(x-3)+1\), the point \((2,4)\) becomes
\[ \left(\frac{2}{1}+3,\ -2(4)+1\right)=(5,-7). \]
This rule is especially useful when \(b\neq1\), because horizontal factors are easy to reverse accidentally.
Common errors
- Treating \(f(2x)\) as a horizontal stretch by 2 instead of a compression by \(1/2\).
- Reading \(f(x-4)\) as a shift left. The graph shifts right 4 units.
- Applying \(k\) to the input instead of adding it to the output.
- Forgetting that a negative \(a\) reflects across the \(x\)-axis and a negative \(b\) reflects across the \(y\)-axis.
- Using \((bx+h,ay+k)\) instead of \((x/b+h,ay+k)\) for point mapping.
Exercise
Starting with y = |x|, describe and write the equation for a graph shifted left 2 units, horizontally stretched by 3, reflected across the x-axis, and shifted up 5 units.
Show answer
The equation is g(x) = -|((x + 2)/3)| + 5. The graph shifts left 2, stretches horizontally by 3, reflects across the x-axis, and shifts up 5.