haya.Learning made clear
Unit I · Relations and functions
8 min readConcept sheetPart II (2 marks) to test whether a relation is a function; Part III (5 marks) to represent a function or to evaluate a function defined in pieces

Functions and how to represent them

A function f: A → B links every element of A to exactly one element of B. Show it as pairs, a table, an arrow diagram or a graph.

FunctionEvery x ∈ A has one and only one image f(x) in B
Notationf: A → B; A is the domain and B is the co-domain
Range{f(x) | x ∈ A}, always a subset of B
Vertical line testA graph is a function if no vertical line meets it at more than one point

When is a relation a function?

  • Every element of the domain A must have an image. No element of A is left out.
  • Each element of A has only one image. One input cannot give two outputs.
  • Two elements of A may share the same image. That is still a function.
  • Some elements of B may have no pre-image (no arrow comes to them).
  • If f(x) = y, then y is the image of x and x is a pre-image of y.

Four ways to show f(x) = 2x + 1 on A = {1, 2, 3, 4}

FormHow f looks
Set of ordered pairsf = {(1, 3), (2, 5), (3, 7), (4, 9)}
TableTop row x: 1, 2, 3, 4; bottom row f(x): 3, 5, 7, 9
Arrow diagramOval A holds 1, 2, 3, 4; oval B holds 3, 5, 7, 9; one arrow from each x to f(x)
GraphPoints (1, 3), (2, 5), (3, 7), (4, 9) plotted on graph paper, not joined, because the domain has only four numbers

How to draw the graph of a function and use the vertical line test

  1. 1
    Draw the x-axis and the y-axis on graph paper and mark the origin O.
  2. 2
    Choose a scale, for example 1 cm = 1 unit on both axes, and write it in the top corner.
  3. 3
    Plot each pair (x, f(x)) as a dot and write its coordinates beside it.
  4. 4
    Join the dots with a smooth curve only when the domain is an interval of real numbers.
  5. 5
    Vertical line test: slide a vertical line across the graph. If it ever meets the graph at more than one point, the graph is not a function.

Example 1: is the relation a function?

Problem

Let A = {1, 2, 3, 4} and B = {1, 4, 7, 10, 13}. Is f = {(1, 1), (2, 4), (3, 7), (4, 10)} a function from A to B? If so, find its range.

Working
  1. Each element 1, 2, 3, 4 of A appears exactly once as a first entry.
  2. So every element of A has one and only one image in B.
  3. Therefore f is a function from A to B.
  4. Range = {1, 4, 7, 10}.
  5. 13 ∈ B has no pre-image, so the range is not equal to the co-domain.
Answer

Yes, f is a function, with range {1, 4, 7, 10}.

Example 2: a function defined in pieces

Problem

A function f: [−2, 6) → R is defined by f(x) = 2x + 1 for −2 ≤ x < 1, f(x) = x² for 1 ≤ x < 4 and f(x) = 20 − x for 4 ≤ x < 6. Find f(0), f(3), f(5) and f(3) − 2f(0). ([−2, 6) means all real numbers from −2 up to 6, including −2 but not 6.)

Working
  1. Pick the rule whose interval contains the given x.
  2. 0 lies in −2 ≤ x < 1, so f(0) = 2(0) + 1 = 1.
  3. 3 lies in 1 ≤ x < 4, so f(3) = 3² = 9.
  4. 5 lies in 4 ≤ x < 6, so f(5) = 20 − 5 = 15.
  5. f(3) − 2f(0) = 9 − 2(1) = 7.
Answer

f(0) = 1, f(3) = 9, f(5) = 15 and f(3) − 2f(0) = 7.

In real life

An auto meter works like a function: each trip distance shows exactly one fare. Two different trips may cost the same, but one trip never shows two fares.

Exam angle

2 marks: “Let A = {1, 2, 3} and B = {4, 5, 6}. Is R = {(1, 4), (1, 5), (2, 6), (3, 6)} a function from A to B? Give a reason.” No. The element 1 has two images, 4 and 5, so R is not a function.

2 marks: “If f(x) = x² − 3x, find f(2) and f(−1).” f(2) = 4 − 6 = −2; f(−1) = 1 + 3 = 4.

5 marks: “Represent the function f = {(1, 4), (2, 4), (3, 6), (4, 8)} as (i) an arrow diagram (ii) a table (iii) a graph.” Arrow diagram: A = {1, 2, 3, 4}, B containing 4, 6, 8; arrows 1 → 4, 2 → 4, 3 → 6, 4 → 8. Table: x = 1, 2, 3, 4 with f(x) = 4, 4, 6, 8. Graph: plot (1, 4), (2, 4), (3, 6), (4, 8) as separate points, with a scale.

Remember it

Every input, one output. Many inputs may share an output; one input may never have two.