Tutorials › Calculus I › Relations and the Function Rule

Function Notation and Representations · Tutorial 1 of 1495

Relations and the Function Rule

A relation is a function precisely when every specified input is assigned one and only one output.

Beginner 9 min read

What You'll Learn

  • Define a relation using ordered pairs from an input set and an output set.
  • State the function rule using the condition “exactly one output for each input.”
  • Classify relations with a repeated input assigned different outputs.
  • Explain why different inputs may share the same output.
  • Check whether every input in a stated input set has an assignment.
  • Distinguish a relation that is a function from one input set from the same relation considered with a larger input set.

When Is a Relation a Function?

A relation records which outputs are associated with which inputs. Some relations satisfy the rule that each input is assigned exactly one output. Those relations are functions; others are not.

The key is to check two things at once: every input must have an assigned output, and no input may have two different assigned outputs. It is important to keep the stated input set in view. A relation can assign one output to every input that appears in its list, yet still fail to be a function if the specified input set contains an input that is missing from that list.

Relations as Ordered Pairs

Let \(A\) be a set of possible inputs and \(B\) a set of possible outputs. The Cartesian product \(A\times B\) is the set of all ordered pairs \((a,b)\) with \(a\in A\) and \(b\in B\). A relation from \(A\) to \(B\) is any collection of such pairs: it is a subset of \(A\times B\).

In a pair \((a,b)\), the first entry \(a\) is the input and the second entry \(b\) is the output assigned to it. For example, if \(A=\{1,2\}\) and \(B=\{p,q\}\), then \(\{(1,p),(2,q)\}\) is a relation from \(A\) to \(B\). This notation says that input \(1\) is paired with output \(p\), and input \(2\) is paired with output \(q\).

Definition: A function \(f:A\to B\) is a relation from \(A\) to \(B\) such that for every \(a\in A\), there exists exactly one \(b\in B\) for which \((a,b)\) belongs to the relation.

The word exactly combines two requirements. “At least one” means no input in \(A\) is left without an output. “At most one” means no input in \(A\) is paired with two different outputs. Together, they require one and only one output for each input.

$$ \text{For every }a\in A,\text{ there is a unique }b\in B \text{ such that }(a,b)\in f. $$

The sets \(A\) and \(B\) matter because they say which inputs must be assigned and which values are allowed as outputs. A list of ordered pairs alone does not always give enough information to decide whether the relation is a function: the input set must also be specified.

Repeated Inputs and Repeated Outputs

A repeated input is a warning to check carefully. If the same input is paired with two different outputs, the relation is not a function. If different inputs share one output, there is no conflict with the function rule. A function is allowed to assign the same output to several inputs.

What appears in the relation?Effect on the function rule
One input paired with two different outputsNot a function: that input has more than one output.
Different inputs paired with the same outputAllowed: each input can still have exactly one output.
An input in \(A\) with no pairNot a function from \(A\): that input has no assigned output.

There is a small but useful distinction when a pair is written more than once. A relation is a set of ordered pairs, so listing the identical pair twice does not create two different outputs for its input. What matters is whether an input is associated with two distinct output values.

Worked Examples

Worked Example: Different Inputs Share an Output

Let \(A=\{1,2,3\}\), \(B=\{p,q\}\), and let \(R=\{(1,p),(2,p),(3,q)\}\). Determine whether \(R\) is a function from \(A\) to \(B\).

Check the input \(1\): the only pair beginning with \(1\) is \((1,p)\), so its assigned output is \(p\). Check input \(2\): the only pair beginning with \(2\) is \((2,p)\), so its assigned output is also \(p\). Check input \(3\): the only pair beginning with \(3\) is \((3,q)\), so its assigned output is \(q\).

Each input in \(A\) appears and has exactly one output. The fact that \(1\) and \(2\) share output \(p\) does not violate the rule, because the rule limits the number of outputs for each input, not the number of inputs that can share an output.

Check: The inputs \(1,2,3\) are all assigned, and their respective outputs \(p,p,q\) are each unique for that input. Therefore \(R\) is a function from \(A\) to \(B\).

Worked Example: One Input Has Two Different Outputs

Let \(A=\{1,2\}\), \(B=\{a,b,c\}\), and let \(R=\{(1,a),(1,b),(2,c)\}\). Determine whether \(R\) is a function from \(A\) to \(B\).

For input \(1\), the relation contains both \((1,a)\) and \((1,b)\). Since \(a\ne b\), input \(1\) has two different outputs. Input \(2\) has the single output \(c\), but that does not repair the problem at input \(1\).

Check: Although every input in \(A\) appears at least once, input \(1\) does not have a unique output. The “at most one” part of the rule fails, so \(R\) is not a function from \(A\) to \(B\).

Worked Example: An Input Is Missing

Let \(A=\{2,4,6\}\), \(B=\{x,y\}\), and let \(R=\{(2,x),(4,y)\}\). Determine whether \(R\) is a function from \(A\) to \(B\).

Input \(2\) is paired with \(x\), and input \(4\) is paired with \(y\). There is no pair whose first entry is \(6\). Thus input \(6\in A\) has no assigned output.

Each input that does appear has only one output, but the rule requires an output for every input in \(A\), not just every input that happens to occur in the relation.

Check: The “at most one” condition holds for the listed inputs, but the “at least one” condition fails at \(6\). Therefore \(R\) is not a function from \(A\) to \(B\).

Worked Example: The Input Set Changes the Decision

Consider the relation \(R=\{(1,u),(2,v)\}\). First take \(A=\{1,2\}\) and \(B=\{u,v\}\). Then input \(1\) has exactly the output \(u\), and input \(2\) has exactly the output \(v\). Both inputs in \(A\) are assigned once, so \(R\) is a function from \(\{1,2\}\) to \(\{u,v\}\).

Now keep the same relation and output set, but take \(A=\{1,2,3\}\). The pairs still assign \(u\) to \(1\) and \(v\) to \(2\), but there is no pair beginning with \(3\). Since \(3\) belongs to the stated input set, the relation is not a function from \(\{1,2,3\}\) to \(\{u,v\}\).

Check: With input set \(\{1,2\}\), every required input has one output. With input set \(\{1,2,3\}\), input \(3\) has none. Thus the same collection of pairs is a function for the first specified input set and not for the second.

Why the Rule Has Two Parts

The definition can be unpacked directly. For a fixed input \(a\), consider the outputs paired with it: all \(b\in B\) for which \((a,b)\in R\). A function requires that this collection contain exactly one element. It cannot contain zero elements, because then the input has no output. It cannot contain two or more distinct elements, because then the input has more than one output.

Equivalent test: A relation \(R\) from \(A\) to \(B\) is a function if and only if both conditions hold:
  • For every \(a\in A\), at least one pair \((a,b)\) belongs to \(R\).
  • If \((a,b_1)\in R\) and \((a,b_2)\in R\), then \(b_1=b_2\).

Here is why the two-condition test is equivalent to the definition. The first condition says that every input has an output. The second says that any two outputs assigned to the same input must be equal, so there cannot be two different outputs. Therefore each input has at least one output and at most one distinct output; it consequently has exactly one. In the other direction, if each input has exactly one output, then it certainly has at least one, and any two outputs paired with the same input must be that same unique output. Both conditions follow.

A Common Mistake

A frequent error is to reject a relation merely because two inputs share an output. For example, consider \(S=\{(1,m),(2,m)\}\) with input set \(A=\{1,2\}\). One might incorrectly reason, “The output \(m\) appears twice, so this is not a function.” That checks how often an output appears, rather than how many outputs each input receives.

The correct check is input by input: input \(1\) is paired only with \(m\), and input \(2\) is paired only with \(m\). Every input in \(A\) has exactly one output. Thus \(S\) is a function from \(A\) to any output set that contains \(m\). Sharing an output is allowed; assigning two different outputs to the same input is not.

Why This Distinction Matters

The function rule makes an input determine a single output. This is what allows a function to model a dependable assignment: once an input is chosen, there is one output to report. If one input could produce two different outputs under the same relation, the assignment would be ambiguous. If an input had no assigned output, the assignment would be incomplete for the specified input set.

When checking a proposed function, do not begin by asking whether the outputs are all different. Instead, identify the stated input set and check each of its members. Confirm that each is paired with an allowed output, then confirm that no input is paired with two different outputs. This procedure follows the definition exactly.

Check Your Understanding

For each question, apply the function rule to the stated input set and output set.

  1. Let \(A=\{a,b\}\), \(B=\{1,2\}\), and \(R=\{(a,1),(b,1)\}\). Is \(R\) a function from \(A\) to \(B\)? Explain why the shared output matters or does not matter.
  2. Let \(A=\{1,2\}\), \(B=\{p,q\}\), and \(R=\{(1,p),(1,q),(2,p)\}\). Which part of the function rule fails?
  3. Let \(A=\{x,y,z\}\), \(B=\{0,1\}\), and \(R=\{(x,0),(y,1)\}\). Is every required input assigned?
  4. Can two different inputs of a function have the same output? State a small example or explain why not.
  5. Suppose \((r,s)\) is listed twice but no pair assigns a different output to \(r\). Does the repeated listing alone prevent the relation from being a function? Explain.

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon