topic badge

2.01 Definitions

Lesson

Relation

A relation is a relationship between sets of information. For example, let's say we recorded all the names and heights of the people in your class. Then, for a given height (input), we could determine the names of all of the people (output) who are this tall. Each height is related to one or more peoples' names. We can describe a relation using a table, a rule, a graph, a set of ordered pairs or a diagram mapping elements of two different sets.

Function

A function is a special type of relation where each input only has one output. Using the example above, if we found more than one person in your class with the same height this would be classified as a relation, not a function. 

Functions comprise a dependent variable that varies depending on the rule that is applied to the independent variable. Instead of a single dependent variable we commonly express functions using the notation $f(x)$f(x). It indicates that the expression is a function of the independent variable  $x$x.

We can think of a function like a machine that has an input and an output, like you can see below. We take a value, $x$x, apply a rule (i.e. put it through the function machine) and get an output value, $f(x)$f(x). The output value can also be referred to as "$f$f of $x$x".

 

For example, if we think of a vending machine selling juice, the amount of money we have to pay (the dependent variable) depends on the amount of juice we want to buy (the independent variable). Let's say each bottle of juice cost $\$3$$3. If we bought one bottle, it would cost $\$3$$3, if we bought two bottles, it would cost $\$6$$6 and so on. Do you notice how the value of our independent variable (the number of bottles of juice) always produces a different, unique dependent variable (cost)? This is an example of a function. 

Let's look at another example. Say we have the rule $y=3x$y=3x. Let's construct a table of values of the output $y$y for a given input $x$x according to the rule given:

$x$x $-1$1 $0$0 $1$1 $2$2
$y$y $-3$3 $0$0 $3$3 $6$6

See how each $x$x value gives a unique $y$y value? This means this rule is considered a function.

Functions or relations test

We can distinguish between relations and functions by carefully inspecting the ordered pairs. For example, 

do the following set of points  $\left(1,5\right)$(1,5), $\left(1,1\right)$(1,1), $\left(7,-2\right)$(7,2), $\left(-5,-10\right)$(5,10)  describe a function or a relation? A function requires each $x$x value have a unique $y$y value. But there are  $2$2 possible $y$y values when $x=1$x=1. So this set describe a relation.

If we have a graph of a relation, we can utilise the vertical line test to check if we have a function. If you can draw a vertical line anywhere on a graph and it crosses the graph in more than one place, then the relation is not a function. 

 

Here is an example of a relation that is not a function. Consider the blue vertical line, it crosses the circle in two places? Hence, for the given input of $x=-5$x=5 there are two outputs. In other words, functions have to pass the vertical line test for every input value. 

 

 

 

 

 

 

Here are two examples of functions:

 

Remember!

While all functions are relations, not all relations are functions.

 

Types of functions and relations

The formal definition of a function is that it is a set of ordered pairs $(x,y)$(x,y) of real numbers that exists such that no two ordered pairs have the same first ($x$x) component. This is often visualised as a mapping of $x$x values to $y$y values, like in the diagram below:

 

For starters, every $x$x value must produce a $y$y value, or $f(x)$f(x) value, after its "trip through the function machine". It is possible that two $x$x values can produce the same $y$y value, as you can see happens in the diagram above. But the set is not considered a function if one $x$x value produces two or more $y$y values - this is what happens in a circle, for instance, which we saw failed the vertical line test. 

We can introduce the following language to describe these distinctions. 

  • A one-to-one function means every $x$x input creates its own distinct $f(x)$f(x) output 

  • A many-to-one function means that there are multiple $x$x values that create a certain $f(x)$f(x) value

  • One-to-many is what happens in relations such as a circle - one $x$x input creating more than one $f(x)$f(x) output. This is not a function 

  • Many-to-many is hard to visualise, but exists when two or more $x$x inputs are related to two or more $f(x)$f(x) outputs. It is also not a function!

 

One-to-one functions

One-to-one functions are particularly important for later study in inverse functions and so, we are very interested in being able to find them. The definition of one-to-one functions states that every $x$x input creates its own distinct $f(x)$f(x) output. This means the graph must either be always increasing or always decreasing left to right! So, we can test these functions with the horizontal line test. If at any horizontal position, a line 'passes over' two or more points on the curve or line, then the function cannot be one-to-one.

Consider the diagram below, showing a sketch of a straight line and a parabola. Both are functions since they pass the vertical line test. But only the straight line passes the horizontal line test. This means we can describe the line as a one-to-one function and the parabola as a many-to-one function. 

Practice Questions

Question 1

Determine whether the following graphs describe relations, and whether they describe functions.

  1. Loading Graph...
    A graph of a rectangular hyperbola on a Cartesian coordinate plane marked from -6 to 6 on both $x$x- and $y$y-axes. The x- and y-axes are the asymptotes of the curve.

    Select all answers that apply.

    Function

    A

    Relation

    B
  2. Loading Graph...
    A Cartesian coordinate plane marked from -6 to 6 on both $x$x- and $y$y-axes. A parabola is graphed whose vertex is at the origin $\left(0,0\right)$(0,0) and it opens to the right of the $y$y-axis. The coordinates of the vertex are not explicitly given.

    Select all answers that apply.

    Function

    A

    Relation

    B

Question 2

Consider these ordered pairs:

$\left\{\left(-9,-5\right),\left(-5,-10\right),\left(-5,-4\right),\left(-3,7\right),\left(-2,-4\right),\left(-1,1\right)\right\}${(9,5),(5,10),(5,4),(3,7),(2,4),(1,1)}

  1. Plot the ordered pairs on the number plane.

    Loading Graph...

  2. Is this relation a function?

    Yes

    A

    No

    B
  3. Which ordered pair would need to be removed from the set so that the remaining ordered pairs represent a function? Express your answer in the form $\left(a,b\right)$(a,b).

Question 3

Is the following a graph of a one-to-one function?

Loading Graph...

  1. Yes

    A

    No

    B

Outcomes

MA11-1

uses algebraic and graphical techniques to solve, and where appropriate, compare alternative solutions to problems

What is Mathspace

About Mathspace