Relations vs. Functions
Lesson: Relations vs. Functions
In math, we often study how one value is connected to another value. These connections are called relations. A relation can match inputs with outputs in many different ways.
A function is a special kind of relation. In a function, each input must match with exactly one output. This is the most important idea in this lesson.
If you remember one rule, remember this: a relation is any set of ordered pairs, but a function is a relation where no input is paired with more than one output.
1. What is a relation?
A relation is any set of ordered pairs. An ordered pair looks like \\((x, y)\\), where:
- the first number, \\(x\\), is the input
- the second number, \\(y\\), is the output
For example, the set
$$\{(1,2), (2,4), (3,6)\}$$
is a relation because it is a set of ordered pairs.
A relation can be shown in different ways:
- as ordered pairs
- in a table
- on a graph
- with a mapping diagram
2. What is a function?
A function is a relation with a stricter rule. Every input must have one and only one output.
This means:
- an input can have one output
- different inputs can share the same output
- but one input cannot have two different outputs
For example,
$$\{(1,5), (2,5), (3,8)\}$$
is a function. Even though both \\(1\\) and \\(2\\) go to \\(5\\), that is allowed because each input still has only one output.
But this set is not a function:
$$\{(1,5), (1,7), (2,8)\}$$
It is not a function because the input \\(1\\) has two outputs: \\(5\\) and \\(7\\).
3. Domain and range
To understand relations and functions, it helps to know two important words:
- Domain: the set of all inputs
- Range: the set of all outputs
For the relation
$$\{(2,3), (4,7), (6,7)\}$$
the domain is \\(\{2,4,6\}\\) and the range is \\(\{3,7\}\\).
Notice that the range does not repeat values. Even though \\(7\\) appears twice as an output, we list it once in the set.
4. How to tell if a relation is a function
There are several ways to check.
A. From ordered pairs
Look at the inputs. If any input is repeated with a different output, then the relation is not a function.
B. From a table
Check the input column. If the same input appears more than once with different outputs, it is not a function.
C. From a mapping diagram
Each input should have exactly one arrow going out. If one input points to two different outputs, it is not a function.
D. From a graph
Use the vertical line test. If a vertical line touches the graph more than once, then the graph is not a function.
This works because a vertical line represents one input value \\(x\\). If that line hits the graph twice, then that one input has two outputs.
5. Relation vs. function
Here is the key difference:
- Relation: any pairing of inputs and outputs
- Function: a relation where each input has exactly one output
So, every function is a relation, but not every relation is a function.
6. Worked Examples
Example 1: Ordered pairs
Decide whether this relation is a function:
$$\{(2,1), (3,4), (4,9), (5,16)\}$$
Step 1: Look at the inputs: \\(2, 3, 4, 5\\).
Step 2: Check whether any input repeats with a different output.
No input repeats.
Answer: Yes, this relation is a function.
Example 2: Repeated input
Decide whether this relation is a function:
$$\{(1,3), (2,5), (1,7), (4,9)\}$$
Step 1: Look at the inputs: \\(1, 2, 1, 4\\).
Step 2: Notice that the input \\(1\\) appears twice.
Step 3: Check the outputs for that input. The input \\(1\\) is paired with \\(3\\) and \\(7\\).
Since one input has two different outputs, the relation breaks the function rule.
Answer: No, this relation is not a function.
Example 3: Table of values
Use the table to decide if the relation is a function.
$$ \begin{array}{c|c} x & y \\\ \hline -1 & 2 \\ 0 & 5 \\ 1 & 2 \\ 2 & 8 \end{array} $$
Step 1: Look at the input values: \\(-1, 0, 1, 2\\).
Step 2: Each input appears only once.
Step 3: Notice that the output \\(2\\) appears twice. That is okay, because different inputs can have the same output.
Answer: Yes, the relation is a function.
Example 4: Thinking about a graph
Suppose a graph is a circle. Is it a function?
Imagine drawing a vertical line through the middle of the circle. That line would touch the circle at two points.
That means one input value has two output values.
Answer: A circle is not a function.
7. Common mistakes to avoid
- Mistake 1: Thinking repeated outputs mean it is not a function. Repeated outputs are allowed.
- Mistake 2: Looking at outputs instead of inputs. The function rule is about inputs having exactly one output.
- Mistake 3: Forgetting that a repeated input with the same output is still okay in many school examples of relations, because it does not change the output. But usually in a set of ordered pairs, repeated identical pairs are not listed more than once.
- Mistake 4: On graphs, forgetting to use vertical lines. The vertical line test checks whether one \\(x\\)-value has more than one \\(y\\)-value.
8. Quick check questions
Try these on your own:
- Is \\(\{(3,1), (4,2), (5,3)\}\\) a function?
- Is \\(\{(2,6), (2,7), (3,8)\}\\) a function?
- If a mapping diagram shows one input pointing to two outputs, is it a function?
- If two different inputs point to the same output, is it still a function?
Answers:
- Yes
- No
- No
- Yes
9. Summary
A relation is any set of ordered pairs that connects inputs and outputs. A function is a special relation where each input has exactly one output.
To decide if something is a function, focus on the inputs. If one input is matched with more than one output, it is not a function. If every input has only one output, then it is a function.
Remember: all functions are relations, but not all relations are functions.
Put what you read to the test
You've worked through Relations vs. Functions. Try answering a few questions to see what stuck — and what might deserve a quick reread before you move on.