Function Transformations
A detailed lesson on vertical/output transformations and horizontal/input transformations, with coordinate mappings and examples beyond quadratics.
On this page
- Coordinate idea
- Vertical transformations
- Horizontal transformations
- Reflections
- Combining transformations
- Videos
- Practice
1. What a transformation does to coordinates
A transformation changes a graph by moving, stretching, compressing or reflecting it. The best way to understand transformations is to track how a point \((x,y)\) on \(y=f(x)\) moves.
Vertical transformations change the output. They affect the y-coordinate directly. Horizontal transformations change the input. They affect the x-coordinate, often in the opposite way students expect.
2. Vertical transformations: changing the output
Vertical transformations are outside the function. They act on \(f(x)\), so they change y-values.
| Transformation | Coordinate effect | Description |
|---|---|---|
| \(y=f(x)+k\) | \((x,y)\mapsto(x,y+k)\) | Translate up if \(k>0\), down if \(k<0\). |
| \(y=af(x)\) | \((x,y)\mapsto(x,ay)\) | Vertical stretch/compression by factor \(|a|\). If \(a<0\), also reflect in the x-axis. |
| \(y=-f(x)\) | \((x,y)\mapsto(x,-y)\) | Reflect in the x-axis. |
Worked example 1: vertical translation of \(y=\sqrt{x}\)
Sketch \(y=\sqrt{x}+2\).
This is a vertical translation 2 units upward. The starting point \((0,0)\) moves to \((0,2)\). The domain stays \([0,\infty)\), while the range becomes \([2,\infty)\).
A vertical translation changes the output values but not the allowed input values.
Worked example 2: vertical stretch of \(y=\sin x\)
Compare \(y=\sin x\) and \(y=2\sin x\).
The y-values are doubled. The amplitude changes from 1 to 2. The period remains \(2\pi\).
Only the y-values are scaled. The x-coordinates of peaks and troughs do not move.
3. Horizontal transformations: changing the input
Horizontal transformations are inside the function. They affect the input before the function acts.
| Transformation | Coordinate effect | Description |
|---|---|---|
| \(y=f(x-h)\) | \((x,y)\mapsto(x+h,y)\) | Translate right by \(h\). If the expression is \(x+h\), move left by \(h\). |
| \(y=f(bx)\) | \((x,y)\mapsto(x/b,y)\) | Horizontal scale factor \(1/b\). |
| \(y=f(-x)\) | \((x,y)\mapsto(-x,y)\) | Reflect in the y-axis. |
Inside changes are the ones that feel backwards: \(f(x-3)\) moves right 3, not left 3; \(f(2x)\) compresses horizontally by scale factor \(1/2\).
Worked example 3: horizontal translation of a cubic
Sketch \(y=(x+2)^3\) from \(y=x^3\).
The input has changed from \(x\) to \(x+2\). This moves the graph 2 units left. The centre point \((0,0)\) moves to \((-2,0)\).
The cubic shape is unchanged; the whole curve is shifted left.
Worked example 4: horizontal compression of a reciprocal graph
Compare \(y=f(x)=1/x\) and \(y=f(2x)=1/(2x)\).
Since the input is multiplied by 2, x-coordinates are divided by 2. The graph is horizontally compressed by scale factor \(1/2\).
The asymptotes stay at \(x=0\) and \(y=0\), but points move closer to the y-axis.
4. Reflections: horizontal versus vertical
There are two common reflections and they are easy to confuse.
- \(y=-f(x)\) changes outputs, so it reflects in the x-axis.
- \(y=f(-x)\) changes inputs, so it reflects in the y-axis.
Worked example 5: reflections of \(y=\sin x\)
The red graph \(y=-\sin x\) is a reflection in the x-axis. The gold graph \(y=\sin(-x)\) is a reflection in the y-axis. For sine, these two happen to coincide because sine is an odd function, but the transformation meanings are different.
The coordinate mappings explain the reflection, even when two results look the same for a special function.
5. Combining transformations
For combined transformations, separate the vertical and horizontal changes. A useful general form is
- Horizontal shift: \(h\)
- Horizontal scale factor: \(1/b\)
- Vertical scale factor: \(a\)
- Vertical shift: \(k\)
For independent study, always write down the coordinate mapping. It prevents most sign mistakes.
7. Practice with solutions
- A point \((4,5)\) lies on \(y=f(x)\). Where does it move on \(y=f(x-3)+2\)?
Show solution
Right 3 and up 2: \((4,5)\mapsto(7,7)\).
- Describe the transformation from \(y=\sqrt{x}\) to \(y=-\sqrt{x}+4\).
Show solution
Reflect in the x-axis, then translate up 4.
- What is the horizontal scale factor from \(y=f(x)\) to \(y=f(3x)\)?
Show solution
The horizontal scale factor is \(1/3\).