fbpx

What you need to know

In maths, a function is something that takes an input and produces an output. In other words, if you feed some number/term into the function, the function will then do a series of things to it and output the result. Functions may be given in the form of function machines – diagrams that break down each step of the function – or they may be given as mathematical expressions. In this example, we’ll see how you can get from one to the other.

Example: Determine the output of the inputting the following 4 terms: 3, -2, x, 4m into the function machine below. Bonus: what input gives the output of 16?

This function tells us that the first thing done to our input is to multiply it by 3. Then, we must add 1 to result of that first multiplication to get the output.

  • Input of 3: 3\times 3=9, and 9+1=10, so 10 is the output.
  • Input of -2: -2\times 3=-6, and -6+1=-5, so -5 is the output.
  • Input of x:\hspace{2mm}x\times 3=3x, and 3x+1 cannot be written more simply, so 3x+1 is the output.
  • Input of 4m:\hspace{2mm}4m\times 3=12m, and 12m+1 cannot be written more simply, so 12m+1 is the output.

The third output here is precisely the function machine written as an expression. In other words, this function can be expressed like 3x+1, where x is the input.

Bonus: to find an input given an output, we must work backwards along the function machine doing the opposite operations as we go. That means that we need to take our output, 16, subtract 1 (opposite of adding), and then divide the result by 3 (opposite of multiplying). Once we get the resulting input, try putting it back in to see that it works.

16-1=15,\text{ and }15 \div 3 = 5,\text{ so the input of 5 matches the output of 16}.

The rest of this topic page is for higher students only. Going forward, we will often use the phrasing “apply this function to x” to mean “input x into the function”.

Firstly: notation. The function above was given by 3x+1 where x was the input. To express this more formally, we write

f(x) = 3x+1

Where f(x) means “function of x”. If we were then to input 10 into this function that would look like: f(10) = 3\times 10 + 1 = 31.

If we want to talk about multiple different functions at the same time, we might call the others g(x), h(x) and so on.

Composite Functions

A composite function is the result of one function being applied immediately after the other. Suppose we have two functions: f(x) and g(x). Then,

fg(x)

is a composite function. What this notation means is: g(x) is applied to some input x, and the output of this then becomes the input for f(x), which produces the final output. Note: we could’ve also considered the composite function gf(x), which is not the same thing – in this case, we would do f(x) first and then feed the result of that into g(x) – this is the opposite way around to the way that fg(x) produces an output.

The main point is to apply the one closest to the x first – it might help to think of fg(x) like f\left(g(x)\right).

Example: Let f(x)=x-3 and g(x)=x^2. Find: fg(10), gf(-4), and find an expression for fg(x).

For fg(10), we must find g(10) then apply f(x) to the answer.

g(10) = 10^2 = 100,\text{ so } fg(10) = f(100) = 100 - 3 = 97.

For gf(-4), we must find f(-4) then apply g(x) to the answer.

f(-4) = -4-3 = -7,\text{ so } gf(-4) = g(-7) = (-7)^2 = 49.

To find an expression for fg(x), we need to literally input g(x) into f(x), i.e. every x in the expression for f(x) must be replaced with a g(x).

So, we get

fg(x) = f\left(g(x)\right) = g(x) - 3 = x^2 - 3.

If you consider that when working out fg(10) we first squared 10 and then subtracted 3, this answer makes sense.

Inverse Functions

An inverse function is a function acting in reverse. The inverse function of f(x) is given by f^{-1}(x), and it tells us how to go from an output of f(x) back to its input. The process of finding an inverse function amounts to a little bit of algebraic rearranging.

Example: Find the inverse function of f(x) = 3x - 9.

To do this, write the function as y=3x-9 and rearrange this equation to make x the subject. Once this is done, swap every y with an x – and vice versa – and you have the correct expression of the inverse function.

So, adding 9 to both sides of the equation, we get

y + 9 = 3x

Then, dividing both sides by 3 makes x the subject:

\dfrac{y + 9}{3} = x

Now, swap each x with a y and vice versa to get

y = \dfrac{x + 9}{3}\text{ which we express properly as } f^{-1}(x) = \dfrac{x + 9}{3}.

Functions Questions

Here we will write both function machine operations in one go, putting brackets around the first one since we must do that one first. In the case of going from output to input, we must do the opposite operations and start with the one on the right first.

 

Input 12: (12 \div 6) - 5 = (2) - 5 = -3.

 

Output -9: (-9 + 5) \times 6 = (-4) \times 6 = -24.

 

Input 42a: (42a \div 6) - 5 = (7a) - 5 = 7a - 5.

 

Output z+4: (z + 4 + 5) \times 6 = (z + 9) \times 6 = 6z + 54.

 

Input 3x: (3x \div 6) - 5 = \dfrac{x}{2} - 5 = \dfrac{x}{2} - \dfrac{10}{2} = \dfrac{x - 10}{2}.

The completed table looks like:

g(4) = (2\times 4) - 5 = 8 - 5 = 3,

 

so, we get

 

fg(4) = f(3) = \dfrac{15}{3} = 5.

 

b) For gf(-30) we must first find f(-30) and then take g(x)

 

of the answer.

 

f(-30) = \dfrac{15}{-30} = -\dfrac{1}{2},

 

so, we get

 

gf(-30) = g\left(-\dfrac{1}{2}\right) = 2\left(-\dfrac{1}{2}\right) - 5 = -1 - 5 = -6.

 

c) To find an expression for gf(x), substitute f(x) in for every instance of x in g(x). Doing this gives you

 

gf(x) = 2f(x) - 5 = 2\left(\dfrac{15}{x}\right) - 5 = \dfrac{30}{x} - 5

 

So gf(x) = \dfrac{30}{x} - 5.

So, we need to write the function as y=\frac{5}{x-4} and rearrange this equation to make x the subject. Then, we will swap every y with an x – and vice versa.

 

We won’t be able to get x on its own whilst it’s in the denominator, so our first step will be multiplying both sides by (x-4):

 

y(x-4)=5

 

Then, divide both sides by y:

 

x-4=\dfrac{5}{y}

 

Finally, add 4 to both sides to make x the subject:

 

x=\dfrac{5}{y}+4

 

Now, swap each x with a y and vice versa to get

 

y=\dfrac{5}{x}+4\text{ which we express properly as }f^{-1}(x)=\dfrac{5}{x}+4.

From GCSE Maths tutors in York to maths teachers in London, looking for function questions to help deliver lessons and set homework, this dedicated functions page has everything you need to offer high quality tuition. From function worksheets to online tests, the Maths Made Easy function resources will be a welcomed addition to your question bank.

Need some extra help? Find a Maths tutor now

Or, call 020 3633 5145