Chapter 9 · Functions

What Is a Function? Variables, Tables and Ordered Pairs

Learn what makes a relationship a function, name its independent and dependent variables, and decide whether a table or a list of ordered pairs shows a function.

18 min read

You already know more about this topic than you might think. When you graphed a line such as y=2x+1y = 2x + 1, you chose a value of xx and worked out the value of yy. Choosing x=3x = 3 gives y=2(3)+1=6+1=7y = 2(3) + 1 = 6 + 1 = 7. It gives 77 every time you try it, and never a second answer.

This lesson gives names to that idea. The value you start with is the input. The value you end with is the output. A rule, such as y=2x+1y = 2x + 1, tells you how to find the output for an input. A relationship is any pairing of inputs with outputs, with or without a rule.

You will learn which relationships are called functions, how to name the variables in a function, and how to recognize a function in a table or in a list of ordered pairs, like the (x,y)(x, y) pairs you have plotted.

What makes y=2x+1y = 2x + 1 so dependable? Two things.

  • You know which values of xx you may choose. For that line, you may choose any number on the number line.
  • Each value you may choose leads to one value of yy: never none, and never two different ones.

The domain is the set, or collection, of all the inputs you may choose. The inputs in the domain are the permitted inputs.

A situation often limits the domain. A number of people, for example, must be a whole number, so 2.52.5 people is not a permitted input. That is why you always state the domain.

A relationship that keeps its promise of one output for every permitted input has a special name.

Key concept

A function: exactly one output for each permitted input

A function is a relationship that gives each permitted input exactly one output. The permitted inputs make up the domain. State the domain whenever you describe a function, especially when a situation limits it.

  • Different inputs may share the same output.
  • One input may not have two different outputs.
  • A table or a list of ordered pairs with a limited number of entries tells you only about the inputs it shows. You can say more only when a rule is established for the other inputs in the domain.
Four words and the number of letters in each
WordNumber of letters
cat
33
bird
44
dog
33
horse
55

Worked example

Testing the definition in both directions

Use the four words in the table. Relationship A pairs each word (the input) with the number of letters in that word (the output). Relationship B reverses the roles: it pairs each number of letters (the input) with every word in the table that has that many letters (the output). Which relationship is a function?

  1. State the domain of Relationship A, because the definition speaks only about permitted inputs. The permitted inputs are the four words in the table. Braces list the members of a set.

    Domain of A={cat, bird, dog, horse}\text{Domain of A} = \lbrace \text{cat},\ \text{bird},\ \text{dog},\ \text{horse} \rbrace
  2. Count the outputs for each permitted input. Counting the letters in a word gives one number and no other, so every word in the domain has exactly one output. Read each arrow as 'gives'.

    cat→3,bird→4,dog→3,horse→5\text{cat} \to 3, \quad \text{bird} \to 4, \quad \text{dog} \to 3, \quad \text{horse} \to 5
  3. Look at the shared output. The words cat and dog both give 3. That is allowed, because the definition limits how many outputs one input has, not how many inputs lead to one output. So Relationship A is a function on its domain.

  4. State the domain of Relationship B. Its permitted inputs are the numbers of letters that appear in the table.

    Domain of B={3, 4, 5}\text{Domain of B} = \lbrace 3,\ 4,\ 5 \rbrace
  5. Count the outputs for each permitted input. Relationship B pairs the input 4 only with bird and the input 5 only with horse, but it pairs the input 3 with two different words. One permitted input with two different outputs is enough to break the definition.

    3→catand3→dog3 \to \text{cat} \quad \text{and} \quad 3 \to \text{dog}

Answer

Relationship A is a function on its domain of four words, because each word has exactly one number of letters. Relationship B is not a function on the domain {3,4,5}\lbrace 3, 4, 5 \rbrace, because the input 33 has two different outputs, cat and dog.

Letters often stand for the input and the output of a function. These letters are variables, and they play two different roles.

  • The independent variable stands for the input. You choose its value from the domain.
  • The dependent variable stands for the output. Its value depends on the input you chose.

Because the relationship is a function, each permitted value of the independent variable gives exactly one value of the dependent variable. Two different input values may still give the same output value.

To tell the two variables apart, ask two questions.

  • Which quantity do you choose first? Its variable is independent.
  • Which quantity does that choice then determine? Its variable is dependent.

When you choose xx in y=2x+1y = 2x + 1 and work out yy, the variable xx is independent and yy is dependent. But the letters do not decide the roles. The situation does. So before you use a variable, say what quantity it stands for and what unit measures it. State the domain too.

Worked example

Naming the variables and the domain

A shop rents bikes for a whole number of hours, from 11 hour to 66 hours. The cost is a fee of 55 dollars plus 33 dollars for each hour. Let hh be the number of hours rented and let cc be the total cost in dollars. Name the independent variable, the dependent variable and the domain. Then find the output for the input h=4h = 4.

  1. Ask which quantity you choose first. A customer chooses how many hours to rent, so the number of hours is the input. The variable h stands for that input, so h is the independent variable.

  2. Ask which quantity that choice determines. Once the customer chooses the hours, the pricing rule fixes the cost: 5 dollars plus 3 dollars for each of the h hours, which is 3 times h dollars. The variable c stands for that output, so c is the dependent variable.

    c=5+3hc = 5 + 3h
  3. State the domain. The shop allows only whole numbers of hours from 1 to 6, so those six values are the only permitted inputs. Values such as 2.5 and 9 are not in the domain.

    Domain={1, 2, 3, 4, 5, 6}\text{Domain} = \lbrace 1,\ 2,\ 3,\ 4,\ 5,\ 6 \rbrace
  4. Find the output for the input 4, which is in the domain. Replace h with 4 in the rule. Multiply before you add, because that is the order of operations.

    c=5+3(4)=5+12=17c = 5 + 3(4) = 5 + 12 = 17
  5. Check the definition. For each of the six permitted inputs, multiplying by 3 and then adding 5 gives one result and no other. Each permitted input has exactly one output, so the rule is a function on this domain.

Answer

The independent variable is hh, the number of hours rented. The dependent variable is cc, the total cost in dollars. The domain is the whole numbers from 11 to 66. The input h=4h = 4 gives the output c=17c = 17, so renting a bike for 44 hours costs 1717 dollars.

The bike rental function: every permitted input and its one output
Hours rented (input)CalculationCost in dollars (output)
11
5+3(1)=5+35 + 3(1) = 5 + 3
88
22
5+3(2)=5+65 + 3(2) = 5 + 6
1111
33
5+3(3)=5+95 + 3(3) = 5 + 9
1414
44
5+3(4)=5+125 + 3(4) = 5 + 12
1717
55
5+3(5)=5+155 + 3(5) = 5 + 15
2020
66
5+3(6)=5+185 + 3(6) = 5 + 18
2323

A table and a list of ordered pairs show the same information in two ways. In this lesson, each ordered pair has the form (input, output): first a value of the independent variable, then the matching value of the dependent variable. Each row of an input and output table is one such pair. In the bike rental table, the row for 44 hours is the ordered pair (4,17)(4, 17).

That table shows the whole function. It lists every input in the domain, and the rule c=5+3hc = 5 + 3h gives the one output for each of them.

A table or a list with no rule is different. It tells you only about the inputs it shows, so the domain is the set of inputs shown. You cannot say anything about another input unless a rule is established.

To decide whether a table or a list of ordered pairs with no rule represents a function, follow these steps.

  1. List the different input values. They form the domain.
  2. Collect the outputs paired with each input.
  3. If any input has two different outputs, the table or list does not represent a function. If every input shown has exactly one output, it represents a function on the inputs shown.

Two cases look like trouble but are not. Different inputs may share an output. And a pair written twice, such as (2,6)(2, 6) and (2,6)(2, 6), still gives the input 22 only one output.

Worked example

Checking a list of ordered pairs

Each ordered pair in this list has the form (input, output): (1,4)(1, 4), (2,7)(2, 7), (3,4)(3, 4), (5,9)(5, 9). No rule comes with the list. Does the list represent a function?

  1. State the domain. No rule comes with the list, so the permitted inputs are the first numbers of the pairs shown.

    Domain={1, 2, 3, 5}\text{Domain} = \lbrace 1,\ 2,\ 3,\ 5 \rbrace
  2. Collect the outputs for each input. The inputs 1, 2, 3 and 5 are all different, so each input appears in one pair and has one output.

    1→4,2→7,3→4,5→91 \to 4, \quad 2 \to 7, \quad 3 \to 4, \quad 5 \to 9
  3. Check the number that repeats. The output 4 appears twice, once with the input 1 and once with the input 3. Different inputs may share an output, so this does not break the definition.

  4. Draw the conclusion and keep it to the inputs shown. Each of the four permitted inputs has exactly one output. The list says nothing about the input 4, because 4 is not in the domain and no rule is established.

Answer

Yes. The list represents a function on the domain {1,2,3,5}\lbrace 1, 2, 3, 5 \rbrace, because each of those four inputs has exactly one output.

Table T
RowInputOutput
1
22
66
2
55
11
3
22
66
4
88
11
5
55
33

Worked example

A table with repeated inputs

Table T lists five rows. Each row shows an input and its output, and no rule comes with the table. Does Table T represent a function?

  1. State the domain. No rule comes with the table, so the permitted inputs are the different values in the Input column. The values 2 and 5 each appear in two rows, but each one is a single input.

    Domain={2, 5, 8}\text{Domain} = \lbrace 2,\ 5,\ 8 \rbrace
  2. Collect the outputs for the input 2. Rows 1 and 3 both pair 2 with 6. The same pair written twice still gives 2 only one output, so there is no problem here.

    2→6and2→62 \to 6 \quad \text{and} \quad 2 \to 6
  3. Collect the outputs for the input 8. Only row 4 has this input, so 8 has exactly one output. That output, 1, also appears in row 2 with the input 5, but different inputs may share an output.

    8→18 \to 1
  4. Collect the outputs for the input 5. Row 2 pairs 5 with 1, and row 5 pairs 5 with 3. The numbers 1 and 3 are different, so the input 5 has two different outputs.

    5→1and5→3,1≠35 \to 1 \quad \text{and} \quad 5 \to 3, \qquad 1 \neq 3
  5. Apply the definition. A function gives every permitted input exactly one output. The input 5 is in the domain and has two different outputs, and one such input is enough to decide.

Answer

No. Table T does not represent a function on the domain {2,5,8}\lbrace 2, 5, 8 \rbrace, because the input 55 is paired with two different outputs, 11 and 33.

Here is the idea to keep. A function gives each permitted input exactly one output, so start by stating the domain. Different inputs may share an output, but one input may never have two different outputs. The independent variable stands for the input you choose, and the dependent variable stands for the output that the input determines. A table or a list of ordered pairs with no rule tells you only about the inputs it shows.

Next, you will identify functions from their graphs and use the graph of a function to find values.