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.

Core concept

Transformations of y=f(x)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))f(g(x)) applies one function's output as the input for another, representing a sequence of operations.

Understanding the notation y=f(x)y = f(x) is the foundation for mastering graph transformations. This notation states that the yy value above any given xx value is calculated using the rule f(x)f(x). For example, if y=x2+3y = x^2 + 3, the yy value for x=2x = 2 is 22+3=72^2 + 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)y = a f(x)

Consider the transformation y=af(x)y = a f(x). If we take f(x)=x3f(x) = x^3 and a=4a = 4, we compare y=x3y = x^3 with y=4x3y = 4x^3. Every yy value in the new function is exactly four times as large as the corresponding yy value in the original. Geometrically, this is a vertical stretch away from the xx axis by a factor of 4. If yy is positive, the point moves further up: if yy is negative, the point moves further down.

img-78.jpeg

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

img-79.jpeg

Vertical Translations: y=f(x)+ay = f(x) + a

If we take f(x)=x2f(x) = x^2 and a=3a = 3, we compare y=x2y = x^2 with y=x2+3y = x^2 + 3. In this case, every yy value increases by 3 units. The entire graph shifts upwards parallel to the yy axis. Formally, we describe this as a translation by the vector (03)\binom{0}{3}.

In general, y=f(x)+ay = f(x) + a represents a translation of y=f(x)y = f(x) by the vector (0a)\binom{0}{a}. If aa is negative, the graph shifts downwards. In trigonometry, note that a+cosxa + \cos x is often written instead of cosx+a\cos x + a to avoid ambiguity with cos(x+a)\cos(x + a).

Horizontal Translations: y=f(x+a)y = f(x + a)

This transformation is often misunderstood. Students frequently assume that adding aa to xx shifts the graph to the right, but the opposite is true: y=f(x+a)y = f(x + a) shifts the graph to the left when aa is positive. To find the expression for f(x+a)f(x+a), every xx in the original expression must be replaced by (x+a)(x+a).

Example 1: Given f(x)=x2+2x5f(x) = x^2 + 2x - 5, find f(x+3)f(x + 3). We replace every xx with (x+3)(x + 3): f(x+3)=(x+3)2+2(x+3)5f(x + 3) = (x + 3)^2 + 2(x + 3) - 5.

Example 2: Given f(x)=cos(2x)f(x) = \cos(2x), find f(xπ2)f(x - \frac{\pi}{2}). We replace xx with (xπ2)(x - \frac{\pi}{2}): f(xπ2)=cos(2(xπ2))=cos(2xπ)f(x - \frac{\pi}{2}) = \cos(2(x - \frac{\pi}{2})) = \cos(2x - \pi). Note that the factor of 2 multiplies the entire replacement term.

To understand the shift, consider f(x)=2xf(x) = 2^x. At x=5x=5 on y=f(x)y=f(x), the yy value is 25=322^5 = 32. On the graph y=f(x+3)y = f(x+3), we get this same yy value of 32 when x=2x=2 because f(2+3)=f(5)f(2+3) = f(5). Thus, the point that was at x=5x=5 has moved to x=2x=2, which is 3 units to the left.

img-80.jpeg

img-81.jpeg

In general, y=f(x+a)y = f(x + a) is a translation of y=f(x)y = f(x) by the vector (a0)\binom{-a}{0}.

Horizontal Stretches: y=f(ax)y = f(ax)

To find the expression for f(ax)f(ax), we replace every xx with axax. For example, if f(x)=x2f(x) = x^2, then f(3x)=(3x)2=9x2f(3x) = (3x)^2 = 9x^2. If f(x)=cos(2x+30)f(x) = \cos(2x + 30), then f(4x)=cos(2(4x)+30)=cos(8x+30)f(4x) = \cos(2(4x) + 30) = \cos(8x + 30).

Geometrically, y=f(ax)y = f(ax) squashes the graph towards the yy axis by a factor of aa. Consider f(x)=x33x2+2f(x) = x^3 - 3x^2 + 2. On y=f(x)y=f(x), the value y=2y=2 occurs at x=0x=0. On y=f(2x)y=f(2x), the yy value at x=1x=1 is f(2×1)=f(2)=2f(2 \times 1) = f(2) = -2, which is the yy value that originally occurred at x=2x=2. The graph has been squashed horizontally by a factor of 2.

img-82.jpeg

img-83.jpeg

In general, y=f(ax)y = f(ax) is a horizontal stretch parallel to the xx axis by a scale factor of 1a\frac{1}{a}. If a<0a < 0, the graph is also reflected in the yy axis.

Composing Transformations

When multiple transformations are applied, the order of operations is critical. Consider transforming y=cosxy = \cos x into y=cos(2x+π6)y = \cos(2x + \frac{\pi}{6}). There are two ways to achieve this correctly:

  1. Translate by (π60)\binom{-\frac{\pi}{6}}{0} first, then squash horizontally by factor 2: cosxcos(x+π6)cos(2x+π6)\cos x \rightarrow \cos(x + \frac{\pi}{6}) \rightarrow \cos(2x + \frac{\pi}{6}).

  2. Squash horizontally by factor 2 first, then translate by (π120)\binom{-\frac{\pi}{12}}{0}: cosxcos2xcos2(x+π12)=cos(2x+π6)\cos x \rightarrow \cos 2x \rightarrow \cos 2(x + \frac{\pi}{12}) = \cos(2x + \frac{\pi}{6}).

Note that squashing by factor 2 first and then translating by π6\frac{\pi}{6} would result in cos2(x+π6)=cos(2x+π3)\cos 2(x + \frac{\pi}{6}) = \cos(2x + \frac{\pi}{3}), which is incorrect.

Composite Function Notation: f(g(x))f(g(x))

The notation f(g(x))f(g(x)) means that the output of g(x)g(x) becomes the input for f(x)f(x).

Example: If g(x)=2xg(x) = 2x and f(x)=x2+3x2f(x) = x^2 + 3x - 2, then to find f(g(x))f(g(x)), we replace every xx in ff with g(x)g(x): f(g(x))=(2x)2+3(2x)2=4x2+6x2f(g(x)) = (2x)^2 + 3(2x) - 2 = 4x^2 + 6x - 2.

It is generally not true that f(g(x))=g(f(x))f(g(x)) = g(f(x)). For instance, if f(x)=x2f(x) = x^2 and g(x)=x3g(x) = x - 3, then f(g(x))=(x3)2f(g(x)) = (x-3)^2 while g(f(x))=x23g(f(x)) = x^2 - 3.

Key takeaways

  • Transformations outside the function brackets, like f(x)+af(x)+a and af(x)af(x), affect the yy coordinates vertically as expected.
  • Transformations inside the function brackets, like f(x+a)f(x+a) and f(ax)f(ax), affect the xx coordinates horizontally and often behave counter-intuitively.
  • A translation of y=f(x)y = f(x) by (hk)\binom{h}{k} results in the new function y=f(xh)+ky = 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+ba))f(a(x + \frac{b}{a})), to identify the correct translation.
Tips

When dealing with combined horizontal transformations like f(ax+b)f(ax+b), always substitute the value x=0x=0 to see where the original yy intercept has moved, or find the new xx value that makes the bracket zero to identify the shift of the original origin point.

Cautions

The most common error is applying horizontal translations in the wrong direction. Remember that f(x+3)f(x+3) is a shift of 3 units in the negative xx direction (left).

Insight

Graph transformations are essentially a way of re-labelling the coordinate axes. y=f(x2)y = f(x-2) can be viewed as the original graph y=f(x)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)y = f(x + a) move the graph to the left if aa is positive?

Because we are adding aa to the input before the function calculates the yy value, we reach the same 'output' earlier on the xx axis. If you want the same yy value that used to be at x=10x=10, and you are using f(x+2)f(x+2), you only need x=8x=8 to get f(8+2)=f(10)f(8+2)=f(10). Thus, every point moves 2 units to the left.

What is the difference between af(x)af(x) and f(ax)f(ax)?

af(x)af(x) is a vertical stretch by factor aa (the yy values change). f(ax)f(ax) is a horizontal squash by factor aa, which is a horizontal stretch by factor 1a\frac{1}{a} (the xx values change).

How do I handle a negative factor in y=f(x)y = f(-x)?

A negative factor inside the function, f(x)f(-x), results in a reflection in the yy axis. Similarly, f(x)-f(x) results in a reflection in the xx 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.