A7 - Functions, composites and inverses

A7 - Functions, composites and inverses

A function turns an input into one output by following a rule. You will interpret simple expressions as function machines. The Higher parts introduce function notation, combine functions in a chosen order, and find an inverse rule that reverses a process.

Functions with inputs and outputs

A machine doubles a number, then adds 33. Feed in 55 and it gives 1313. Swap the steps and it gives 1616. How can the same two operations produce different answers? Their order is part of the rule.

You already know

An expression such as 2x+32x+3 means multiply xx by 22, then add 33. Brackets change the order: 2(x+3)2(x+3) adds 33 first.

Think of the input as a number arriving at the machine and the output as the number leaving it. For 2x+32x+3, each input has one definite output. Inputs do not have to be positive whole numbers unless the question says so.

[DIAGRAM: asset_name: Why the order of function-machine steps matters; asset_slug: aqa8300_a08_machine_order; caption: Doubling then adding 3 gives a different output from adding 3 then doubling; description: Two horizontal function-machine rows. Top row shows input 5, multiply by 2, intermediate value 10, add 3, output 13. Bottom row shows input 5, add 3, intermediate value 8, multiply by 2, output 16. Blue boxes consistently mean multiply by 2 and green boxes mean add 3. Arrows run left to right.]
Doubling then adding 3 gives a different output from adding 3 then doubling

The two rows start with the same number. The bottom row doubles the added 33 as well as doubling the input, so its output is 33 larger.

Function

A rule that assigns exactly one output to each allowed input. For example, “square the input” is a function: input 33 gives output 99. Different inputs may share an output: −3-3 also gives 99. A rule that gives both 22 and 77 as separate outputs for the same input is not a function.

The expression specifies the machine. This interpretation of an expression is not on the formulae sheet: learn it. Both examples are non-calculator.

Worked example 1: double then add

Question. A function has rule 2x+32x+3. Work out the output when the input is 44.

Plan. Double the input, then add 33.

output=2(4)+3replace x by 4=8+3multiply first=11add 3\begin{aligned} \text{output}&=2(4)+3&&\text{replace }x\text{ by }4\\ &=8+3&&\text{multiply first}\\ &=11&&\text{add }3 \end{aligned}

Why this step? The rule says 2x+32x+3, so only the input is doubled. The added 33 is outside that multiplication.

Answer. 1111.

Check. The output is 33 more than twice 44, as the rule requires.

Change only the input to a negative number. Keep exactly the same operations.

Worked example 2: a negative input

Question. A function has rule 2x+32x+3. Work out the output when the input is −4-4.

Plan. Put the negative input in brackets, multiply, then add.

output=2(−4)+3substitute the input=−8+3multiply=−5add 3\begin{aligned} \text{output}&=2(-4)+3&&\text{substitute the input}\\ &=-8+3&&\text{multiply}\\ &=-5&&\text{add }3 \end{aligned}

Why this step? The input is the whole number −4-4. Brackets keep its minus sign attached during multiplication.

Answer. −5-5.

Check. Increasing the input from −4-4 to 44 adds 88, so the output should increase by 1616. Indeed, 11−(−5)=1611-(-5)=16.

An output can be negative. A function does not promise a positive answer; it promises one answer for each allowed input.

Watch out

Wrong: 2(−4)+3=−22(-4)+3=-2, obtained by adding 33 before doubling. Right: multiply first to get −8+3=−5-8+3=-5. If the rule were 2(x+3)2(x+3), the bracket would tell you to add first.

Try a new negative input with the same machine.

Function notation (Higher)

Writing f(x)\mathrm{f}(x) gives a function a name and shows its input. If f(x)=3x−4\mathrm{f}(x)=3x-4, the letter f\mathrm{f} names the rule; it does not multiply xx.

Read f(5)\mathrm{f}(5) as “the output of function f when the input is 55”. For an algebraic input such as t+1t+1, replace every xx in the rule by the whole expression t+1t+1, using brackets: f(t+1)=3(t+1)−4=3t−1\mathrm{f}(t+1)=3(t+1)-4=3t-1.

Function notation

In f(x)\mathrm{f}(x), the expression inside the brackets is the input and f(x)\mathrm{f}(x) is the output. For example, if f(x)=3x−4\mathrm{f}(x)=3x-4, then f(5)=11\mathrm{f}(5)=11. It does not mean f×5\mathrm{f}\times5.

Function notation is not on the formulae sheet: learn it. In both non-calculator examples, keep the whole negative input inside brackets.

Worked example 3: evaluating a named function

Question. f(x)=3x−4\mathrm{f}(x)=3x-4. Work out f(−2)\mathrm{f}(-2).

Plan. Replace xx by −2-2, then follow the order of operations.

f(−2)=3(−2)−4substitute −2=−6−4multiply=−10subtract\begin{aligned} \mathrm{f}(-2)&=3(-2)-4&&\text{substitute }-2\\ &=-6-4&&\text{multiply}\\ &=-10&&\text{subtract} \end{aligned}

Why this step? The number inside the function brackets tells you the input to substitute; it is not an extra factor.

Answer. f(−2)=−10\mathrm{f}(-2)=-10.

Check. The rule triples the input, then moves 44 lower. Tripling −2-2 gives −6-6, so −10-10 has the correct sign and size.

Now change only the rule by squaring its input before multiplying by 33. The input stays −2-2.

Worked example 4: the input is squared

Question. g(x)=3x2−4\mathrm{g}(x)=3x^2-4. Work out g(−2)\mathrm{g}(-2).

Plan. Square the whole input before multiplying by 33 and subtracting 44.

g(−2)=3(−2)2−4substitute in brackets=3(4)−4square first=8multiply and subtract\begin{aligned} \mathrm{g}(-2)&=3(-2)^2-4&&\text{substitute in brackets}\\ &=3(4)-4&&\text{square first}\\ &=8&&\text{multiply and subtract} \end{aligned}

Why this step? (−2)2=4(-2)^2=4. Squaring only the 22 while leaving a minus outside would change the input's meaning.

Answer. g(−2)=8\mathrm{g}(-2)=8.

Check. Inputs 22 and −2-2 have the same square, so g(2)=g(−2)=8\mathrm{g}(2)=\mathrm{g}(-2)=8.

The name may be f, g or h. It labels the chosen rule and does not change the substitution method.

Watch out

Wrong: 3(−2)2=−123(-2)^2=-12. The brackets make the whole negative number the base of the power. Right: 3(−2)2=3×4=123(-2)^2=3\times4=12.

Use the same squared-input method with a new rule and input.

Composite functions (Higher)

A composite function feeds the output from one function into another. The opening machine puzzle showed why the order matters.

If you square an input and then double it and add 33, that differs from doubling and adding 33 before squaring. Function notation records exactly which process comes first.

Composite function

A function formed by applying one function and then another. In AQA notation, fg(x)=f(g(x))\mathrm{fg}(x)=\mathrm{f}(\mathrm{g}(x)): apply g\mathrm{g} first, then f\mathrm{f}. It does not mean multiply the two outputs.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account