Transformations of graphs
From the graph of y = f(x), the graph of y = f(x − a) + b is obtained by translating by the vector (a, b): a units right (left if a < 0) and b units up (down if b < 0). The graph of y = −f(x) is the reflection of y = f(x) in the Ox axis. In y = m·f(x) the ordinates are stretched |m| times (|m| > 1) or compressed (|m| < 1). In y = f(kx) the abscissas are compressed |k| times (|k| > 1) or stretched (|k| < 1). When several transformations are applied one after another, the order matters: for example y = 2 − (x + 3)² is obtained from y = x² by shifting 3 units left, reflecting in Ox, and then raising by 2 units. The graph of y = sin 2x comes from y = sin x by compressing it twice towards the Oy axis, so its period is 2π/2 = π.
| Function | Transformation |
|---|---|
| y = f(x − a) + b | shift by the vector (a, b) |
| y = −f(x) | reflection in Ox |
| y = m·f(x) | ordinates stretched |m| times |
| y = f(kx) | abscissas compressed |k| times |
In a sound-editing program a sound wave is shown as a graph. Making it louder stretches the graph vertically (m·f(x)), raising the pitch squeezes it horizontally (f(kx)), and delaying it shifts the graph to the right (f(x − a)). Each effect is controlled by a separate number in the formula.
Sound and video editors reshape waves in this way, animators and game programmers move, stretch and reflect objects, and signal engineers design filters.
On squared paper draw a simple shape (for example a house) using point coordinates. Draw a new shape with every y coordinate multiplied by 2, then shift it by adding 3 to every x, and see how the shape changes.
On graph paper draw y = x², copy it onto tracing paper and slide it to obtain y = (x − 2)² + 1; then check both graphs point by point.