Let's look at an example to understand what a composite function is. Consider the sets:

A = {- 2, -1,0,1,2}

B = {- 2,1,4,7,10}

C = {3,0,15,48,99}

And the functions:

f: AB defined by f (x) = 3x + 4

g: BC defined by g (y) = y^{2}-1

As shown in the diagram above for all x A we have a single y B such that y = 3x + 4, and for all y B there is a single z C such that z = y^{2}-1. Then we conclude that there is a function h of A in C, defined by h (x) = z or h (x) = 9x^{2}+ 24x + 15 because:

h (x) = z h (x) = y^{2}-1

And where y = 3x + 4, then h (x) = (3x + 4)^{2}-1 h (x) = 9x^{2}+ 24x + 15.

The function h (x) is called function **composed of g with f**. We can indicate it by **g o f** (we read “g composed with f”) or **gf (x)** (we read “g of f of x”). Let's look at some exercises to better understand the idea of compound function.

Exercises solved

1) Given the functions f (x) = x^{2}-1 and g (x) = 2x, calculate fg (x) and gf (x).

Resolution:

fg (x) = f (2x) = (2x)^{2}-1 = 4x^{2}-1

gf (x) = g (x^{2}-1) = 2 (x^{2}-1) = 2x^{2}-2

2) Given the functions f (x) = 5x and fg (x) = 3x + 2, calculate g (x).

Resolution:

Since f (x) = 5x, then fg (x) = 5.g (x).

However, fg (x) = 3x + 2, therefore:

5.g (x) = 3x + 2, hence g (x) = (3x + 2) / 5

3) Given the functions f (x) = x^{2}+1 and g (x) = 3x-4, determine fg (3).

Resolution: g (3) = 3.3-4 = 5 fg (3) = f (5) = 5^{2}+1 = 25+1= 26.