Lesson 29 of 46 · Algebra

Functions and invented operations

Evaluate functions and compositions with careful substitution, solve for an input, and work any operation a question defines with a new symbol.

About 20 minutes

In this lesson

  • Evaluate f(a)f(a), f(x+1)f(x + 1) and f(2x)f(2x) by substituting with brackets.
  • Work out a composition such as f(g(x))f(g(x)) from the inside out.
  • Solve f(k)=cf(k) = c for the input kk.
  • Apply an operation defined by a new symbol exactly as the definition says, inner brackets first.

The idea

A function is a rule

A function takes an input and gives exactly one output. Writing f(x)=2x2−3xf(x) = 2x^2 - 3x says: whatever goes in the brackets, square it, double that, and subtract three times the input. The letter xx is only a placeholder. f(5)f(5), f(−2)f(-2), f(a+1)f(a + 1) and f(2x)f(2x) all mean "replace every xx in the rule with what is in the brackets".

Substitute with brackets

The safest habit is to rewrite the rule with empty brackets where each xx was, then fill them:

f(  )=2(  )2−3(  )f(\;) = 2(\;)^2 - 3(\;)

For f(−2)f(-2): 2(−2)2−3(−2)=8+6=142(-2)^2 - 3(-2) = 8 + 6 = 14. Without the brackets it is easy to write −22=−4-2^2 = -4, or to lose the sign in −3×(−2)-3 \times (-2).

For f(x+1)f(x + 1), the whole of x+1x + 1 goes into each bracket:

f(x+1)=2(x+1)2−3(x+1)=2x2+4x+2−3x−3=2x2+x−1f(x + 1) = 2(x + 1)^2 - 3(x + 1) = 2x^2 + 4x + 2 - 3x - 3 = 2x^2 + x - 1

Four expressions that look alike

Expression Meaning For f(x)=3x+2f(x) = 3x + 2
f(x+1)f(x + 1) change the input, then apply ff 3x+53x + 5
f(x)+1f(x) + 1 apply ff, then change the output 3x+33x + 3
f(2x)f(2x) double the input 6x+26x + 2
2f(x)2f(x) double the output 6x+46x + 4

These are different unless ff happens to be special. In particular f(2x)f(2x) and 2f(x)2f(x) are equal only for functions like f(x)=kxf(x) = kx with no constant term. A comparison that sets one against the other is testing exactly this.

Composition: inside out

f(g(x))f(g(x)) means: apply gg first, then feed its output to ff. Work from the innermost brackets outwards. With f(x)=3x−1f(x) = 3x - 1 and g(x)=x2+2g(x) = x^2 + 2:

  • f(g(2))f(g(2)): g(2)=6g(2) = 6, then f(6)=17f(6) = 17.
  • g(f(2))g(f(2)): f(2)=5f(2) = 5, then g(5)=27g(5) = 27.

The order matters, and the two results are usually different. Read the expression from the inside, not from left to right.

Solving for the input

Some questions give the output and ask for the input. "If f(k)=10f(k) = 10" means: substitute kk into the rule and set the result equal to 10, then solve the equation that results. If the rule is quadratic, expect two inputs, and check whether the stem limits which is allowed.

Where a function is defined

A rule can fail for some inputs. At this level, two things cause it: a denominator that would be zero, and an even root of a negative number. For h(x)=1x−4h(x) = \frac{1}{x - 4}, the input 4 is not allowed. For r(x)=x+3r(x) = \sqrt{x + 3}, inputs must satisfy x≥−3x \ge -3.

Operations with invented symbols

Questions often define a new operation with an unfamiliar symbol, for example

a⋆b=a+ba−b(a≠b)a \star b = \frac{a + b}{a - b} \quad (a \neq b)

There is nothing to know in advance; the definition is the whole rule. Treat it exactly like a function of two inputs:

  1. Match the inputs by position: the first number replaces aa, the second replaces bb.
  2. Work innermost brackets first, as with composition.
  3. Assume nothing the definition does not say. An invented operation need not be commutative (a⋆ba \star b may differ from b⋆ab \star a) or associative ((a⋆b)⋆c(a \star b) \star c may differ from a⋆(b⋆c)a \star (b \star c)).

With the definition above, 3⋆1=42=23 \star 1 = \frac{4}{2} = 2, but 1⋆3=4−2=−21 \star 3 = \frac{4}{-2} = -2. Swapping the inputs changed the answer.

Functions on a graph

When a function is drawn, f(a)f(a) is the height of the graph at x=ax = a, and "f(x)=0f(x) = 0" asks where the graph crosses the xx-axis. The same substitution rules apply; the graph is just the rule drawn as points (x,f(x))(x, f(x)).

Worked examples

Example 1: A negative input and a shifted input

If f(x)=2x2−3xf(x) = 2x^2 - 3x, find f(−2)f(-2) and write f(x+1)f(x + 1) in simplest form.

  1. Substitute −2-2 with brackets: f(−2)=2(−2)2−3(−2)=2(4)+6=14f(-2) = 2(-2)^2 - 3(-2) = 2(4) + 6 = 14.

  2. For f(x+1)f(x + 1), put x+1x + 1 in each bracket: 2(x+1)2−3(x+1)2(x + 1)^2 - 3(x + 1).

  3. Expand: 2x2+4x+2−3x−3=2x2+x−12x^2 + 4x + 2 - 3x - 3 = 2x^2 + x - 1.

  4. Check with x=1x = 1: the formula gives 2+1−1=22 + 1 - 1 = 2, and directly f(2)=8−6=2f(2) = 8 - 6 = 2.

Answer

f(−2)=14f(-2) = 14 and f(x+1)=2x2+x−1f(x + 1) = 2x^2 + x - 1. Writing −22-2^2 as −4-4 gives f(−2)=−2f(-2) = -2, a common wrong value.

Example 2: Composition in both orders

If f(x)=3x−1f(x) = 3x - 1 and g(x)=x2+2g(x) = x^2 + 2, find f(g(2))f(g(2)) and g(f(2))g(f(2)).

  1. f(g(2))f(g(2)): the inner function is gg. g(2)=4+2=6g(2) = 4 + 2 = 6, then f(6)=18−1=17f(6) = 18 - 1 = 17.

  2. g(f(2))g(f(2)): the inner function is ff. f(2)=6−1=5f(2) = 6 - 1 = 5, then g(5)=25+2=27g(5) = 25 + 2 = 27.

  3. Check with the general forms: f(g(x))=3(x2+2)−1=3x2+5f(g(x)) = 3(x^2 + 2) - 1 = 3x^2 + 5, which is 1717 at x=2x = 2; g(f(x))=(3x−1)2+2g(f(x)) = (3x - 1)^2 + 2, which is 25+2=2725 + 2 = 27 at x=2x = 2.

Answer

f(g(2))=17f(g(2)) = 17 and g(f(2))=27g(f(2)) = 27. Swapping the order is the usual slip, and the other value is likely to be offered.

Example 3: Finding the input from the output

If f(x)=x2−3xf(x) = x^2 - 3x and f(k)=10f(k) = 10, what are the possible values of kk?

  1. Substitute kk and set the result to 10: k2−3k=10k^2 - 3k = 10.

  2. Make one side zero and factor: k2−3k−10=(k−5)(k+2)=0k^2 - 3k - 10 = (k - 5)(k + 2) = 0.

  3. So k=5k = 5 or k=−2k = -2.

  4. Check: f(5)=25−15=10f(5) = 25 - 15 = 10 and f(−2)=4+6=10f(-2) = 4 + 6 = 10.

Answer

k=5k = 5 or k=−2k = -2. Stopping at k=5k = 5 loses the negative input.

Example 4: An invented operation that is not associative

For a≠ba \neq b, let a⋆b=a+ba−ba \star b = \frac{a + b}{a - b}. Find (3⋆1)⋆4(3 \star 1) \star 4 and 3⋆(1⋆4)3 \star (1 \star 4).

  1. Inner bracket first: 3⋆1=3+13−1=23 \star 1 = \frac{3 + 1}{3 - 1} = 2. Then 2⋆4=6−2=−32 \star 4 = \frac{6}{-2} = -3.

  2. For the other grouping: 1⋆4=5−3=−531 \star 4 = \frac{5}{-3} = -\frac{5}{3}.

  3. Then 3⋆(−53)=3−533+53=43143=414=273 \star \left(-\frac{5}{3}\right) = \frac{3 - \frac{5}{3}}{3 + \frac{5}{3}} = \frac{\frac{4}{3}}{\frac{14}{3}} = \frac{4}{14} = \frac{2}{7}.

Answer

(3⋆1)⋆4=−3(3 \star 1) \star 4 = -3 and 3⋆(1⋆4)=273 \star (1 \star 4) = \frac{2}{7}. The grouping changes the result, so always follow the brackets as written.

Common traps

  • Substituting without brackets

    For g(x)=x2−4xg(x) = x^2 - 4x, g(−3)g(-3) is (−3)2−4(−3)=9+12=21(-3)^2 - 4(-3) = 9 + 12 = 21. Without brackets you may write −9-9 for the square or −12-12 for the second term. Put every substituted value in brackets.

  • Treating f(2x)f(2x) as 2f(x)2f(x)

    f(2x)f(2x) doubles the input; 2f(x)2f(x) doubles the output. For f(x)=3x+2f(x) = 3x + 2 they are 6x+26x + 2 and 6x+46x + 4. The same goes for f(a+b)f(a + b), which is not f(a)+f(b)f(a) + f(b) in general.

  • Composing in the wrong order

    f(g(x))f(g(x)) applies gg first. Reading left to right and applying ff first gives g(f(x))g(f(x)), a different function.

  • Assuming an invented operation is commutative

    A new symbol has only the properties its definition gives it. Keep the inputs in their positions, and work innermost brackets first.

Check yourself

Answer each question before you open its answer.

Question 1: Brackets around a negative

Algebra

If g(x)=x2−4xg(x) = x^2 - 4x, what is g(−3)g(-3)?

  1. A.−21-21
  2. B.−3-3
  3. C.33
  4. D.99
  5. E.2121
Show the answer

Answer: E. 2121

Working

g(−3)=(−3)2−4(−3)=9+12=21g(-3) = (-3)^2 - 4(-3) = 9 + 12 = 21. Check with the factored form g(x)=x(x−4)g(x) = x(x - 4): (−3)(−7)=21(-3)(-7) = 21.

Why the other options are wrong

  • A. Takes (−3)2(-3)^2 as −9-9 and also writes −4(−3)-4(-3) as −12-12.
  • B. Squares correctly but writes −4(−3)-4(-3) as −12-12 instead of +12+12.
  • C. Takes (−3)2(-3)^2 as −9-9; squaring a negative number gives a positive result.
  • D. Evaluates only the squared term and drops −4x-4x.

What carries over

Put every substituted value in brackets, especially a negative one.

Question 2: Doubling the input or the output

Quantitative Comparison

f(x)=3x+2f(x) = 3x + 2 for all numbers xx.

Quantity A Quantity B
f(2x)f(2x) 2f(x)2f(x)
  1. A.Quantity A is greater.
  2. B.Quantity B is greater.
  3. C.The two quantities are equal.
  4. D.The relationship cannot be determined from the information given.
Show the answer

Answer: B. Quantity B is greater.

Working

f(2x)=3(2x)+2=6x+2f(2x) = 3(2x) + 2 = 6x + 2 and 2f(x)=2(3x+2)=6x+42f(x) = 2(3x + 2) = 6x + 4. Quantity B minus Quantity A is 22 for every xx. Check with x=0x = 0: f(0)=2f(0) = 2 and 2f(0)=42f(0) = 4.

Why the other options are wrong

  • A. Doubling the input doubles only the 3x3x part; doubling the output doubles the constant too, so Quantity B is always 2 larger.
  • C. Assumes f(2x)=2f(x)f(2x) = 2f(x), which holds only for a rule with no constant term.
  • D. Both quantities change with xx, but their difference is the constant 2, whatever xx is.

What carries over

Write out f(2x)f(2x) and 2f(x)2f(x) separately; they match only when the rule has no constant term.

Question 3: Follow the definition and the brackets

Algebra

For all numbers aa and bb, let a#b=a2−2ba \# b = a^2 - 2b. What is the value of (2#3)#1(2 \# 3) \# 1?

  1. A.−10-10
  2. B.−9-9
  3. C.−6-6
  4. D.−2-2
  5. E.22
Show the answer

Answer: E. 22

Working

Inner bracket: 2#3=22−2(3)=4−6=−22 \# 3 = 2^2 - 2(3) = 4 - 6 = -2. Then (−2)#1=(−2)2−2(1)=4−2=2(-2) \# 1 = (-2)^2 - 2(1) = 4 - 2 = 2.

Why the other options are wrong

  • A. Groups the operation the other way, 2#(3#1)=2#7=4−142 \# (3 \# 1) = 2 \# 7 = 4 - 14.
  • B. Swaps the roles of the inputs, using b2−2ab^2 - 2a: 32−4=53^2 - 4 = 5, then 1−10=−91 - 10 = -9.
  • C. Squares −2-2 as −4-4 in the second step; (−2)2=4(-2)^2 = 4.
  • D. This is only the inner value 2#32 \# 3; the operation still has to be applied with 1.

What carries over

With an invented symbol, substitute by position, bracket negatives, and work the innermost brackets first.

Key points

  • A function is a rule; substitute the whole input, in brackets, for every xx.

  • f(x+1)f(x + 1), f(x)+1f(x) + 1, f(2x)f(2x) and 2f(x)2f(x) are four different things.

  • f(g(x))f(g(x)) applies gg first: work inside out.

  • An invented operation has only the properties its definition states.

All questions here are original and written for UniExamer; none comes from the test maker.

Written by the UniExamer team with AI assistance. Every worked example and check question was re-solved by an independent checker before publication. No subject expert has reviewed this lesson yet. If you find a mistake, write to support@uniexamer.com.

Practise this topic

Fresh questions on this skill, with worked explanations. Practice needs a Single Exam Pass or Plus.