Graph Transformations and Composite Functions for the ESAT
Updated July 2026
This topic explores how algebraic modifications to functions, such as adding constants or multiplying by factors, result in geometric translations and stretches. Mastering these transformations is essential for sketching complex functions on the ESAT. A key fact is that adding a constant to the input variable shifts the graph horizontally in the opposite direction.
Transformations of y=f(x) alter the position, shape, or orientation of a curve by modifying either the output values (vertical changes) or the input values (horizontal changes). Function composition f(g(x)) applies one function's output as the input for another, representing a sequence of operations.
Understanding the notation y=f(x) is the foundation for mastering graph transformations. This notation states that the y value above any given x value is calculated using the rule f(x). For example, if y=x2+3, the y value for x=2 is 22+3=7. By applying modifications to this rule, we can deduce how the resulting graph relates to the original function.
Vertical Stretches: y=af(x)
Consider the transformation y=af(x). If we take f(x)=x3 and a=4, we compare y=x3 with y=4x3. Every y value in the new function is exactly four times as large as the corresponding y value in the original. Geometrically, this is a vertical stretch away from the x axis by a factor of 4. If y is positive, the point moves further up: if y is negative, the point moves further down.

In general, the graph of y=af(x) is a vertical stretch of y=f(x) parallel to the y axis by scale factor a. If 0<a<1, the graph becomes less tall (it squashes towards the x axis). If a is negative, the graph is reflected in the x axis and stretched by a factor of ∣a∣.

Vertical Translations: y=f(x)+a
If we take f(x)=x2 and a=3, we compare y=x2 with y=x2+3. In this case, every y value increases by 3 units. The entire graph shifts upwards parallel to the y axis. Formally, we describe this as a translation by the vector (30).
In general, y=f(x)+a represents a translation of y=f(x) by the vector (a0). If a is negative, the graph shifts downwards. In trigonometry, note that a+cosx is often written instead of cosx+a to avoid ambiguity with cos(x+a).
Horizontal Translations: y=f(x+a)
This transformation is often misunderstood. Students frequently assume that adding a to x shifts the graph to the right, but the opposite is true: y=f(x+a) shifts the graph to the left when a is positive. To find the expression for f(x+a), every x in the original expression must be replaced by (x+a).
Example 1: Given f(x)=x2+2x−5, find f(x+3). We replace every x with (x+3): f(x+3)=(x+3)2+2(x+3)−5.
Example 2: Given f(x)=cos(2x), find f(x−2π). We replace x with (x−2π): f(x−2π)=cos(2(x−2π))=cos(2x−π). Note that the factor of 2 multiplies the entire replacement term.
To understand the shift, consider f(x)=2x. At x=5 on y=f(x), the y value is 25=32. On the graph y=f(x+3), we get this same y value of 32 when x=2 because f(2+3)=f(5). Thus, the point that was at x=5 has moved to x=2, which is 3 units to the left.


In general, y=f(x+a) is a translation of y=f(x) by the vector (0−a).
Horizontal Stretches: y=f(ax)
To find the expression for f(ax), we replace every x with ax. For example, if f(x)=x2, then f(3x)=(3x)2=9x2. If f(x)=cos(2x+30), then f(4x)=cos(2(4x)+30)=cos(8x+30).
Geometrically, y=f(ax) squashes the graph towards the y axis by a factor of a. Consider f(x)=x3−3x2+2. On y=f(x), the value y=2 occurs at x=0. On y=f(2x), the y value at x=1 is f(2×1)=f(2)=−2, which is the y value that originally occurred at x=2. The graph has been squashed horizontally by a factor of 2.


In general, y=f(ax) is a horizontal stretch parallel to the x axis by a scale factor of a1. If a<0, the graph is also reflected in the y axis.
Composing Transformations
When multiple transformations are applied, the order of operations is critical. Consider transforming y=cosx into y=cos(2x+6π). There are two ways to achieve this correctly:
-
Translate by (0−6π) first, then squash horizontally by factor 2: cosx→cos(x+6π)→cos(2x+6π).
-
Squash horizontally by factor 2 first, then translate by (0−12π): cosx→cos2x→cos2(x+12π)=cos(2x+6π).
Note that squashing by factor 2 first and then translating by 6π would result in cos2(x+6π)=cos(2x+3π), which is incorrect.
Composite Function Notation: f(g(x))
The notation f(g(x)) means that the output of g(x) becomes the input for f(x).
Example: If g(x)=2x and f(x)=x2+3x−2, then to find f(g(x)), we replace every x in f with g(x): f(g(x))=(2x)2+3(2x)−2=4x2+6x−2.
It is generally not true that f(g(x))=g(f(x)). For instance, if f(x)=x2 and g(x)=x−3, then f(g(x))=(x−3)2 while g(f(x))=x2−3.
Key takeaways
- Transformations outside the function brackets, like f(x)+a and af(x), affect the y coordinates vertically as expected.
- Transformations inside the function brackets, like f(x+a) and f(ax), affect the x coordinates horizontally and often behave counter-intuitively.
- A translation of y=f(x) by (kh) results in the new function y=f(x−h)+k.
- The order of transformations matters: when combining horizontal shifts and stretches, it is often safest to factorise the inner expression, such as f(a(x+ab)), to identify the correct translation.
When dealing with combined horizontal transformations like f(ax+b), always substitute the value x=0 to see where the original y intercept has moved, or find the new x value that makes the bracket zero to identify the shift of the original origin point.
The most common error is applying horizontal translations in the wrong direction. Remember that f(x+3) is a shift of 3 units in the negative x direction (left).
Graph transformations are essentially a way of re-labelling the coordinate axes. y=f(x−2) can be viewed as the original graph y=f(x) but with the origin of the coordinate system moved 2 units to the left.
Frequently asked questions
Why does y=f(x+a) move the graph to the left if a is positive?
Because we are adding a to the input before the function calculates the y value, we reach the same 'output' earlier on the x axis. If you want the same y value that used to be at x=10, and you are using f(x+2), you only need x=8 to get f(8+2)=f(10). Thus, every point moves 2 units to the left.
What is the difference between af(x) and f(ax)?
af(x) is a vertical stretch by factor a (the y values change). f(ax) is a horizontal squash by factor a, which is a horizontal stretch by factor a1 (the x values change).
How do I handle a negative factor in y=f(−x)?
A negative factor inside the function, f(−x), results in a reflection in the y axis. Similarly, −f(x) results in a reflection in the x axis.
Ready to test your knowledge?
You've reached the end of this section. Start a practice session to solidify your understanding and master this topic.