Grade by Grade
A. Characteristics of Functions · Functions and Equivalent Expressions

Relations and Functions: What Makes a Function?

A1.1About 65 minutes
Learning goals
  • I can explain what a function is and how it differs from a relation.
  • I can decide whether a relation is a function from ordered pairs, a mapping diagram, a table, a graph or an equation.
  • I can describe a mapping as one-to-one, many-to-one or one-to-many.
  • I can use the vertical line test.

Words to know

relation
Any set of ordered pairs (x, y). It can be shown in a list, table, mapping diagram, graph or equation.
function
A relation in which each input (x-value) has exactly one output (y-value).
input / output
The first and second coordinates of an ordered pair: x is the input, y is the output.
mapping diagram
A diagram with arrows from each input to its output(s).
one-to-one / many-to-one / one-to-many
Ways inputs can be matched to outputs. The first two are functions; one-to-many is not.
vertical line test
A graph is a function if no vertical line crosses it more than once.

Press B3, get the same snack

Picture a vending machine in the school hallway. You press B3 and out drops a granola bar. Tomorrow you press B3 again and get a granola bar again. That machine is reliable: each button gives exactly one snack.

Now imagine pressing B3 and sometimes getting a granola bar and sometimes getting chips. You would say the machine is broken. In mathematics, a reliable machine like the first one is called a function. This whole course is named after that idea (MCR3U is called Functions), so we start by pinning it down exactly.

Remember from Grades 9 and 10

In Grade 9 you studied relations using tables, graphs and equations, and sorted them into linear and non-linear. You graphed lines such as y = mx + b, and relations such as xy = k. In Grade 10 you worked with parabolas in the forms y = ax² + bx + c and y = a(x − h)² + k. All of those were relations between x and y. This lesson asks a new question about each one: is it a function?

Relations

A relation is any set of ordered pairs (x, y). It can be shown as:

  • a list of ordered pairs, such as {(1, 3), (2, 5), (3, 7)}
  • a table of values
  • a mapping diagram (arrows from inputs to outputs)
  • a graph
  • an equation, such as y = 2x + 1
  • a function machine (input → rule → output)

The first number in each pair, x, is the input. The second, y, is the output.

Functions

A function is a relation in which each input has exactly one output.

Two different inputs are allowed to share an output. For example, with y = x², both x = 2 and x = −2 give y = 4. That is still a function. What is not allowed is one input with two or more different outputs.

We describe the arrow patterns like this:

  • one-to-one: each input goes to its own output, and no output is shared (function)
  • many-to-one: several inputs share one output (still a function)
  • one-to-many: one input goes to several outputs (not a function)
y = x²: a functionx = y²: not a functionx (input)−2−112y (output)14x (input)14y (output)−2−112many-to-one: allowedone-to-many: not allowed
On the left, each x has one arrow leaving it, so y = x² is a function (two arrows may land on the same y). On the right, x = 4 has two arrows (to 2 and −2), so x = y² is not a function.
inputx = 3rule: square it,then subtract 1y = x² − 1outputy = 8Same input in → same output out, every time.
A function machine. Whatever input goes in, the rule produces one output. Here 3² − 1 = 8.

The vertical line test

On a graph, every point with the same x lies on one vertical line. So a graph is a function exactly when no vertical line crosses it more than once. This is the vertical line test.

Imagine sliding a ruler, held straight up and down, across the graph from left to right. If it ever touches the graph at two or more points at the same time, the relation is not a function.

xy−3−2−1123−112345(1.5, 2.25)y = x²xy−112345−3−2−1123(2.5, 1.58)(2.5, −1.58)x = y²every vertical line: 1 hitx = 2.5 hits twice
Left: any vertical line meets y = x² once, so it is a function. Right: the vertical line x = 2.5 meets x = y² at (2.5, 1.58) and (2.5, −1.58), so it is not a function.
Worked example

Example 1: Ordered pairs and mapping

Which relations are functions? Explain.

(a) {(1, 4), (2, 5), (3, 6), (4, 7)} (b) {(−1, 2), (0, 2), (1, 2), (2, 2)} (c) {(3, 1), (3, 2), (4, 5), (6, 0)}

  1. Look only at the x-values (inputs). A repeated x with different y-values breaks the rule.
  2. (a) Inputs 1, 2, 3, 4 are all different. Each has one output. Function (one-to-one).
  3. (b) Inputs −1, 0, 1, 2 are all different. They all share the output 2, which is allowed. Function (many-to-one).
  4. (c) The input 3 appears twice, with outputs 1 and 2. Not a function (one-to-many).

(a) and (b) are functions; (c) is not.

Worked example

Example 2: Is x = y² a function?

Investigate the relation x = y² using a table of values and a graph. Is it a function? Justify your answer.

  1. Because x is given in terms of y, choose y-values and calculate x.
  2. y = −2, −1, 0, 1, 2 gives x = 4, 1, 0, 1, 4. Pairs: (4, −2), (1, −1), (0, 0), (1, 1), (4, 2).
  3. The input x = 4 goes to y = −2 and y = 2. The input x = 1 goes to y = −1 and y = 1.
  4. Graphically, the points form a parabola opening to the right. The vertical line x = 4 passes through two points of it.
  5. Algebraically, solving for y gives y = ±√x: for each positive x there are two values of y.

x = y² is not a function. One input (for example x = 4) has two outputs (2 and −2).

Worked example

Example 3: Equations

Decide whether each equation defines y as a function of x.

(a) y = 3x − 2 (b) y = x² − 4 (c) x² + y² = 25 (d) x = 5 (e) y = 5

  1. (a) A line that is not vertical. Each x gives one y. Function.
  2. (b) A parabola opening up. Each x gives one value of x² − 4. Function.
  3. (c) Solve for y: y² = 25 − x², so y = ±√(25 − x²). For x = 3, y = 4 or −4. This is a circle, and a vertical line through its middle crosses it twice. Not a function.
  4. (d) x = 5 is a vertical line. The single input 5 has infinitely many outputs. Not a function.
  5. (e) y = 5 is a horizontal line. Every input gives the output 5 (many-to-one). Function.

(a), (b) and (e) are functions; (c) and (d) are not.

A quick algebra check

Solve the equation for y. If you need ± (as in y = ±√x) or there is any x that produces two y-values, the relation is not a function. A vertical line x = k is never a function; a horizontal line y = k always is.

Functions in real life

A real situation is a function when knowing the input settles the output.

  • Each student → their birthday: a function (everyone has one birthday, though many share).
  • Each birthday → the students born that day: not a function (one date can have several students).
  • Time since a ball was thrown → its height: a function (at any moment, the ball is at one height).
  • Height of the ball → time: not a function (the ball passes 5 m once going up and once coming down).
Just for fun

Why did the circle fail its job interview at the function factory?

It kept giving two answers to the same question.

Hands-on activity

Household function hunt

You need: paper, a pencil and a ruler; a grown-up or friend helps.

  1. Make a mapping diagram with the people in your home on the left and their birth month on the right. Draw the arrows.
  2. Now make the reverse diagram: months on the left, people on the right.
  3. Graph y = x² on grid paper for x = −3 to 3. Then graph x = y² for y = −3 to 3 on a second grid.
  4. Hold your ruler vertically and slide it across each graph.

What to look for: Diagram 1 is a function, because each person has one birth month (if two people share a month, it is many-to-one, which is still fine). Diagram 2 is a function only if no month has two or more people. In step 4, the ruler crosses y = x² only once at a time but crosses x = y² twice for every x > 0.

Your turn

1

Is {(2, 3), (4, 3), (6, 3)} a function? What kind of mapping is it?

2

Is {(5, 1), (5, −1), (0, 0)} a function?

3

A graph is a circle centred at the origin. Use the vertical line test to decide whether it is a function.

4

Does y = −2x² + 7 define a function? Explain.

5

Does x = y² + 1 define a function? Test with x = 5.

6

Each Canadian province → its capital city. Is this a function?

7

Explain why a vertical line is never the graph of a function.

More practice: warm-up

1

What is the input in the ordered pair (7, −2)?

2

Is the relation shown by y = 4 a function?

3

In a function, may two different inputs have the same output?

4

Is {(1, 2), (2, 1), (1, 3)} a function?

5

Name the test used to decide from a graph whether a relation is a function.

More practice: on your own

1

Make a table for y = |x| using x = −2, −1, 0, 1, 2. Is it a function? Is the mapping one-to-one?

2

Does x² + y = 9 define a function? Explain algebraically.

3

Does x² + 4y² = 16 define a function? Test x = 0.

4

A table shows the number of hours of daylight in Thunder Bay for each date in a year. Is (date → hours) a function? Is (hours → date) a function?

5

Sketch or describe a graph that passes the vertical line test but is not a straight line or a parabola.

Challenge

1

For which values of k is the relation {(1, 4), (k, 7), (3, 4), (2, 5)} not a function?

2

Explain why y² = x² is not a function, and describe its graph.

3

A ball is thrown up. Relation A: time → height. Relation B: height → time. Which is a function? Explain using the moment the ball is at 5 m.

Check your understanding

Quiz

1.

Which relation is a function?

2.

A mapping diagram has arrows from 1 → 5, 2 → 5 and 3 → 6. This mapping is:

3.

Which statement describes the vertical line test?

4.

For x = y², which input has two outputs?

5.

Which equation does not define y as a function of x?

6.

Which real-world relation is a function?

For parents and teachers

Big idea: Expectation A1.1 asks students to explain what a function is and to tell functions from other relations using tables, mapping diagrams, graphs, function machines and equations.

How to help: Play "Is it a function?" with everyday pairings: person → height (yes), height → person (no, two people can be the same height), postal code → city (yes), city → postal code (no). Ask your teen to justify each answer with the phrase "each input has exactly one output".

Common difficulties:

  • Thinking many-to-one is not allowed. Two inputs may share an output; only one input with two outputs breaks the rule.
  • Checking the y-values for repeats instead of the x-values.
  • Using a horizontal line instead of a vertical line on graphs.
  • Forgetting the ± when solving y² = ... for y.