Math Core

Lesson 4.1 · Functions

What is a function?

Press B4 on a vending machine and you get pretzels. Press B4 again tomorrow and you get pretzels again. You never press one button and get two different snacks. A function works the same way: you put in an input, and you get back exactly one output.

Inputs and outputs

A function is often given as a rule. Here is one: "multiply the input by 2, then add 1." Feed it some inputs and record what comes out.

input, xx01234
output, yy13579

You can also write the rule as an equation, y=2x+1y = 2x + 1, or as a list of ordered pairs (input, output):

(0,1), (1,3), (2,5), (3,7), (4,9)(0, 1),\ (1, 3),\ (2, 5),\ (3, 7),\ (4, 9)

Every input goes in and one definite output comes out. That is the whole idea.

Definition

Function

A function is a rule that assigns to each input exactly one output. We often call the input xx and the output yy, and write the pairs as ordered pairs (x,y)(x, y).

Checking a table or a list of pairs

Sometimes you are handed a table with no rule at all. To decide whether it is a function, look at the inputs.

How to spot a function

  • If some input appears twice with different outputs, it is not a function.
  • If every input has just one output, it is a function.
  • Different inputs sharing the same output is fine.

Worked example: Pairs of numbers

Which of these sets of ordered pairs is a function?

  • Set A: (1,4), (2,5), (3,4), (6,0)(1, 4),\ (2, 5),\ (3, 4),\ (6, 0)
  • Set B: (2,1), (3,6), (2,8), (5,5)(2, 1),\ (3, 6),\ (2, 8),\ (5, 5)

Set A is a function. The inputs 1, 2, 3 and 6 each appear once. The output 4 shows up twice (for inputs 1 and 3), but that's allowed. Two buttons on a vending machine can both give pretzels.

Set B is not a function. The input 2 is paired with 1 and with 8. One input, two outputs.

Common mistake

Repeated outputs do not break a function. Only a repeated input with a different output does. Always look down the input column for repeats.

Functions on a graph

When you graph the pairs, each input is a spot on the xx-axis. Here are the points from Set A:

Set A. No two points sit on the same vertical line.Open in grapher →

If two points were stacked one above the other, they would share an input but have different outputs. That gives a quick visual check.

The vertical line test

A graph shows a function if no vertical line crosses it in more than one point.

A circle fails the test. The vertical line x=2x = 2 crosses this circle twice, near (2,3.5)(2, 3.5) and (2,−3.5)(2, -3.5). The input 2 would have two outputs.

The circle is not the graph of a function: the line x = 2 hits it twice.Open in grapher →

A non-vertical straight line always passes. Any vertical line crosses y=2x+1y = 2x + 1 exactly once.

y = 2x + 1 is a function. Every vertical line meets it once.Open in grapher →

Functions in everyday situations

Worked example: Is it a function?

  1. Input: a student in your class. Output: that student's birthday.
  2. Input: a birthday month. Output: a student born in that month.

Solutions.

  1. Function. Each student has exactly one birthday. (Two students might share a birthday; that's two inputs with the same output, which is fine.)
  2. Not a function. The input "March" could give several different students.

Worked example: Using a rule

A function has the rule y=3x−4y = 3x - 4.

  1. Find the output when the input is 5.
  2. Which input gives an output of 17?

Solutions.

  1. y=3(5)−4=15−4=11y = 3(5) - 4 = 15 - 4 = 11.
  2. Solve 3x−4=173x - 4 = 17. Add 4: 3x=213x = 21. Divide by 3: x=7x = 7. Check: 3(7)−4=173(7) - 4 = 17. ✓

Tip

To check a rule, plug your answer back in. If it gives the output you expected, you're done.

Practice

Practice 1

Which set of ordered pairs is a function?

Practice 2

A function has the rule y=4x+3y = 4x + 3. What is the output when the input is 6?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

A function has the rule y=5x−2y = 5x - 2. Which input gives an output of 33?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

Is this table a function?

xx2446
yy1357
Practice 5

The graph shows four points. It is not a function. Which input causes the problem?

(1, 2)(2, 4)(2, -1)(4, 3)Open in grapher →

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Which of these is not a function?

Practice 7

The set (1,4), (3,6), (a,9), (5,2)(1, 4),\ (3, 6),\ (a, 9),\ (5, 2) is a function. Which value can aa not be?