Function Notation

f(4) means put 4 in, not f times 4.

A rule with a name

A function is a rule that takes an input and gives exactly one output. Function notation gives the rule a name, usually a letter such as f, and writes it with its input: f(x) = 3x + 1 says that the function f takes the input x, multiplies it by 3 and adds 1.

f(x) is read "f of x". The x in brackets stands for whatever number goes in, and f(x) stands for the number that comes out.

x× 33x+ 13x + 1f(x) = 3x + 1

The function f: the input x is multiplied by 3, then 1 is added, and the output is 3x + 1.

f(4) means put 4 in

f(4) is the output when the input is 4. Put 4 in place of the x in the rule: f(4) = 3 × 4 + 1 = 12 + 1 = 13.

f(4) does not mean f multiplied by 4. The brackets hold the input, and f is the name of the rule, not a number. The statement f(4) = 13 records both numbers at once: when 4 goes in, 13 comes out.

4× 312+ 113f(4) = 13

With 4 as the input, f multiplies by 3 to get 12, then adds 1: f(4) = 13.

Negative inputs, and letters as inputs

Put a negative input in with its brackets. f(−2) = 3 × (−2) + 1 = −6 + 1 = −5. The brackets matter most when the input is squared: for g(x) = x² − 3x, g(−2) = (−2)² − 3 × (−2) = 4 + 6 = 10. Without the brackets, −2² would be read as −4.

The input can be an expression too. Every x in the rule is replaced by the whole expression, in brackets: f(a + 1) = 3(a + 1) + 1 = 3a + 3 + 1 = 3a + 4, and f(2x) = 3 × 2x + 1 = 6x + 1.

Working backward from an output

The equation f(x) = 22 asks a different question: which input gives the output 22? Write it as an equation and solve: 3x + 1 = 22, so 3x = 21 and x = 7. Check: f(7) = 3 × 7 + 1 = 22.

Keep the two questions apart. f(22) is the output when 22 goes in, which is 3 × 22 + 1 = 67.

Exactly one output

A function gives each input exactly one output: for f(x) = 3x + 1, the input 4 gives 13 and nothing else. A rule such as "a number whose square is x" is not a function, because the input 9 has two such numbers, 3 and −3. The square root √x is a function, because √ means the root that is not negative, so √9 = 3 only.

The graph of a function

Work out f for several inputs: f(0) = 1, f(1) = 4, f(2) = 7, f(3) = 10. Each input and its output make a point, with the input as the x-coordinate and the output as the y-coordinate: (0, 1), (1, 4), (2, 7), (3, 10).

The points lie on the straight line y = 3x + 1, which is the graph of f, written y = f(x). Every point of the graph is an input with its output: the point (3, 10) is on it because f(3) = 10.

xy

The graph y = f(x) of f(x) = 3x + 1. The marked points are (1, 4) and (3, 10), because f(1) = 4 and f(3) = 10.

The usual mistakes

Stopping after the multiply. For f(x) = 3x + 1, 3 × 4 = 12 is only halfway through the rule; adding 1 gives f(4) = 13.

Putting the constant into the multiplier. (3 + 1) × 4 = 16 is not f(4). Only the 3 multiplies x, and the 1 is added afterward.

Leaving out the brackets on a negative input. For g(x) = x² − 3x, g(−2) is (−2)² − 3 × (−2) = 10, not −4 + 6 = 2.

Looking ahead: one function after another

The output of one function can be the input of another. Take f(x) = 3x + 1 and g(x) = x + 2, and put 4 into g first: g(4) = 6. Then put that 6 into f: f(6) = 3 × 6 + 1 = 19. This is written f(g(4)) = 19, or fg(4) = 19. The function written nearest the input acts first.

The order matters. g(f(4)) puts 4 into f first, giving 13, then into g, giving 13 + 2 = 15.

As a formula, fg(x) = f(g(x)) = f(x + 2): the whole of g(x) is the input to f, so fg(x) = 3(x + 2) + 1 = 3x + 7. Check: fg(4) = 3 × 4 + 7 = 19.

4g: + 26f: × 3, + 119fg(4) = f(g(4)) = 19

For fg(4), the 4 goes through g first, which adds 2 to make 6, and then through f, which multiplies by 3 and adds 1 to make 19.

Worked example: A Fee Taken Before a Currency Exchange: Two Functions in Order

Question A bureau de change takes a fee of $5 from the money a customer hands over, and then changes what is left into pesos at 40 pesos to the dollar. Let g(x) = x − 5 and f(x) = 40x. (a) Find fg(x), and the number of pesos a customer receives for $120. (b) Find gf(120), and say what the order gf would mean at the bureau.

  1. 1.The fee is taken first, so g acts first: g(120) = 120 − 5 = 115 dollars are left. Then f changes them: f(115) = 40 × 115 = 4600 pesos.

    fg: the fee first, then the exchangex − 5g40xf1201154600g(120) = 120 − 5 = 115 dollarsf(115) = 40 × 115 = 4600 pesos
    fg: the fee first, then the exchangex − 5g40xf1201154600g(120) = 120 − 5 = 115 dollarsf(115) = 40 × 115 = 4600 pesos
    The fee comes off first: g(120) = 115. Then the exchange: f(115) = 40 × 115 = 4600 pesos.
  2. 2.In fg(x) the function nearest to x acts first. Put g(x) into f: fg(x) = f(x − 5) = 40(x − 5) = 40x − 200.

    fg: the fee first, then the exchangex − 5g40xf1201154600fg(x) = f(x − 5) = 40(x − 5)fg(x) = 40x − 200
    fg: the fee first, then the exchangex − 5g40xf1201154600fg(x) = f(x − 5) = 40(x − 5)fg(x) = 40x − 200
    The output of g is the input of f: fg(x) = f(x − 5) = 40(x − 5) = 40x − 200.
  3. 3.(a) fg(x) = 40x − 200, and fg(120) = 4800 − 200 = 4600, so the customer receives 4600 pesos. The −200 is the fee of $5 seen in pesos, because 5 × 40 = 200.

    fg: the fee first, then the exchangex − 5g40xf1201154600fg(120) = 4800 − 200 = 4600 pesosthe fee of $5 is 5 × 40 = 200 pesos
    fg: the fee first, then the exchangex − 5g40xf1201154600fg(120) = 4800 − 200 = 4600 pesosthe fee of $5 is 5 × 40 = 200 pesos
    (a) fg(x) = 40x − 200 and fg(120) = 4600 pesos. The 200 is the fee of $5 in pesos.
  4. 4.In the other order f acts first: f(120) = 40 × 120 = 4800, and then g(4800) = 4800 − 5 = 4795. As a formula, gf(x) = 40x − 5.

    fg: the fee first, then the exchangex − 5g40xf1201154600gf: the exchange first, then the fee40xfx − 5g12048004795f(120) = 4800, then g(4800) = 4795gf(x) = 40x − 5
    fg: the fee first, then the exchangex − 5g40xf1201154600gf: the exchange first, then the fee40xfx − 5g12048004795f(120) = 4800, then g(4800) = 4795gf(x) = 40x − 5
    In the other order the exchange comes first: f(120) = 4800, and then g(4800) = 4795, so gf(x) = 40x − 5.
  5. 5.(b) gf(120) = 4795. The order gf would mean changing all of the money first and then taking a fee of 5 pesos, which leaves the customer 195 pesos better off. The two orders give different functions, so fg ≠ gf.

    fg: the fee first, then the exchangex − 5g40xf1201154600gf: the exchange first, then the fee40xfx − 5g12048004795gf(120) = 4795: a fee of only 5 pesos4795 − 4600 = 195, so fg and gf differ
    fg: the fee first, then the exchangex − 5g40xf1201154600gf: the exchange first, then the fee40xfx − 5g12048004795gf(120) = 4795: a fee of only 5 pesos4795 − 4600 = 195, so fg and gf differ
    (b) gf(120) = 4795. That order would take a fee of 5 pesos after the exchange, 195 pesos better for the customer, so fg ≠ gf.

Answer: (a) fg(x) = 40x − 200; 4600 pesos; (b) gf(120) = 4795, which would mean changing the money first and then taking a fee of 5 pesos, 195 pesos more for the customer

Common mistakes

  • Reading fg(x) from left to right, as f first and then g. The function nearest to x acts first, so fg(x) = f(g(x)): the fee comes off before the money is changed.
  • Multiplying the two rules together, fg(x) = 40x(x − 5). A composite is one function put inside the other, not a product: the output of g becomes the input of f.

More functions problems, worked step by step →

Practice Function Notation in the app