Sub topic 9
Shifting, Reflecting and Scaling Graphs
Prerequisites
Assume that you can plot points, work with functions, and understand the coordinate plane. The key idea is that a change inside the input usually affects horizontal position, while a change outside the function affects vertical position.
Basic transformations
If \(y=f(x)\) is the original graph, these rules describe common transformations:
| New function | Transformation | Column | Column |
|---|---|---|---|
| \(f(x)+k\) | Shift up by \(k\) units | ||
| \(f(x)-k\) | Shift down by \(k\) units | ||
| \(f(x-h)\) | Shift right by \(h\) units | ||
| \(f(x+h)\) | Shift left by \(h\) units | ||
| \(-f(x)\) | Reflect in the \(x\)-axis | ||
| \(f(-x)\) | Reflect in the \(y\)-axis | ||
| \(a f(x)\) | Vertical scaling by \( | a | \) |
| \(f(bx)\) | Horizontal scaling by \(1/ | b | \) |
The signs inside the brackets can feel reversed. For example, \(f(x-4)\) shifts the graph right, not left.
A complete example
Let
\[ f(x)=x^2 \]
and define
\[ g(x)=-2f(x-3)+1. \]
Since \(f(x-3)\) shifts the parabola right by 3, its vertex moves from \((0,0)\) to \((3,0)\). Multiplication by \(-2\) reflects the graph in the \(x\)-axis and stretches it vertically by a factor of 2. Finally, adding 1 shifts it up by 1.
Therefore:
- The vertex is \((3,1)\).
- The axis of symmetry is \(x=3\).
- The parabola opens downward.
- It is narrower than \(y=x^2\).
- Its equation in expanded form is
\[ g(x)=-2(x-3)^2+1. \]
To find the roots, set \(g(x)=0\):
\[ -2(x-3)^2+1=0 \]
\[ (x-3)^2=\frac12 \]
\[ x=3\pm\frac{1}{\sqrt2}. \]
The graph crosses the \(x\)-axis at these two values.
def f(x):
return x ** 2
def g(x):
return -2 * f(x - 3) + 1
for x in [2, 3, 4]:
print(x, g(x))The output shows the transformed points \((2,-1)\), \((3,1)\), and \((4,-1)\).
Transforming points
If \((x,y)\) lies on \(y=f(x)\), then:
- \(f(x-h)+k\) sends it to \((x+h,y+k)\).
- \(-f(x)\) sends it to \((x,-y)\).
- \(f(-x)\) sends it to \((-x,y)\).
- \(a f(x)\) sends it to \((x,ay)\).
For horizontal scaling, be careful. The graph of \(f(2x)\) is compressed horizontally by a factor of \(2\), so \((x,y)\) becomes \((x/2,y)\).
Common errors
- Treating \(f(x-2)\) as a shift left. It shifts right.
- Forgetting that a negative outside the function reflects in the \(x\)-axis.
- Assuming \(f(2x)\) stretches horizontally. It compresses the graph.
- Applying transformations to the wrong coordinate. Inside changes affect \(x\); outside changes affect \(y\).
Exercise
The graph of y = |x| is changed to y = -3|x + 2| - 1. State its vertex, axis of symmetry, direction, and vertical scale.
Show answer
The vertex is (-2, -1), the axis is x = -2, the graph opens downward, and it is vertically stretched by a factor of 3.