topic badge

2.01 Functions and relations

Lesson

What is a relation?

A relation is a relationship between sets of information. For example, think of the names of the people in your class and their heights. If I gave you a height (e.g. $162$162 cm), you could tell me all the names of the people who are this tall and there may be more than one person. Let's say someone came to your class looking for the person who was $162$162 cm tall, that description might fit four people! There's not one clear answer. This data could be expressed as a relation.

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.

 

What is a function?

A function is a special type of relation, where each input only has one output. We've already learnt about the dependent and independent variables in equations. Functions work in a similar way, where the dependent variable, $y$y, varies depending on the rule that is applied to the independent variable, $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 expression $y=2x$y=2x. Let's construct a table of values to record the results:

$x$x $-1$1 $0$0 $1$1 $2$2
$y$y $-2$2 $0$0 $2$2 $4$4

See how each $x$x value gives a unique (just one) $y$y value? This means this data displays a function.

Compare this result to the table below which shows a table of values for the rule $y^2=x$y2=x

$x$x $4$4 $4$4 $9$9 $9$9
$y$y $-2$2 $2$2 $-3$3 $3$3

 

See how this time it's possible that one $x$x value has $2$2 different $y$yvalues? This means it is not a function, so we call it a relation. 

Distinguishing between relations and functions

The vertical line test

If you can draw a vertical line anywhere on a graph so that 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. See how when we draw in the blue vertical line, it crosses the graph in two places? That means there are two $y$y values for a single $x$x value, so it's not a function.

 

 

 

In other words, functions have to pass the vertical line test at every point

Here is one example of a function.

Here is another function.

Distinguishing without graphing

If you can write a relationship between $x$x and $y$y then we have a relation. However, if this relationship only yields one value of $y$y for each $x$x value, then it is a function.

Exploration

If we make $y$y the subject of $2y-4x=10$2y4x=10, we can tell whether it's a function or a relation.

$2y-4x=10$2y4x=10

$2y=4x+10$2y=4x+10

$y=2x+5$y=2x+5

See that each value of $x$x only yields one $y$y value, which means that it is a function.

Let's try this process for the equation $y^2=x$y2=x:

$y=\pm\sqrt{x}$y=±x

See how $y$y could be $\sqrt{x}$x or $-\sqrt{x}$x? Since there are two possible values of $y$y, we can only say it is a relation.

Remember!

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

 

Worked examples

example 1

Do the following set of points describe a function or a relation?

A) $\left(1,5\right)$(1,5), $\left(1,1\right)$(1,1), $\left(7,-2\right)$(7,2), $\left(-5,-10\right)$(5,10)

Think: Does each $x$x value have a unique $y$y value?

Do: There are $2$2 possible $y$y values when $x=1$x=1. This describes a relation.

 

B) $\left(1,5\right)$(1,5)$\left(7,-2\right)$(7,2), $\left(-5,-10\right)$(5,10), $\left(13,-13\right)$(13,13)

Think: Does each $x$x value have a unique $y$y value?

Do: In this set of coordinates, each $x$x value has only one unique $y$y value. This describes a 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

The pairs of values in the table represent a relation between $x$x and $y$y. Do they represent a function?

$x$x $-9$9 $-5$5 $-4$4 $-2$2 $0$0 $2$2 $4$4 $4$4 $9$9
$y$y $12$12 $-9$9 $-3$3 $-5$5 $9$9 $-12$12 $14$14 $11$11 $-14$14
  1. Yes

    A

    No

    B

Question 3

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

  1. $y=9x$y=9x

    Select all answers that apply.

    Function

    A

    Relation

    B
  2. $y=x^2+2$y=x2+2

    Select all answers that apply.

    Function

    A

    Relation

    B

 

Outcomes

1.1.23

understand the concept of a function as a mapping between sets, and as a rule or a formula that defines one variable quantity in terms of another

1.1.25

understand the concept of the graph of a function

1.1.28

recognise the distinction between functions and relations and apply the vertical line test

What is Mathspace

About Mathspace