Relations and Functions
Let’s start by saying that a relation is simply a set or collection of ordered pairs. Nothing really special about it. An ordered pair, commonly known as a point, has two components which are the x and y coordinates.
This is an example of an ordered pair.
Main Ideas and Ways How to Write or Represent Relations
As long as the numbers come in pairs, then that becomes a relation. If you can write a bunch of points (ordered pairs) then you already know how a relation looks like. For instance, here we have a relation that has five ordered pairs written in set notation using curly braces.
Relation in set notation:
However, aside from set notation, there are other ways to write this same relation. We can show it in a table, plot it on the xy-axis, and express it using a mapping diagram.
- Relation in table
- Relation in graph
- Relation in mapping diagram
We can also describe the domain and range of a given relation.
- The domain is the set of all x or input values. We may describe it as the collection of the first values in the ordered pairs.
- The range is the set of all y or output values. We may describe it as the collection of the second values in the ordered pairs.
So then in the relation below
our domain and range are as follows:
When listing the elements of both domain and range, get rid of duplicates and write them in increasing order.
What Makes a Relation a Function?
On the other hand, a function is actually a “special” kind of relation because it follows an extra rule. Just like a relation, a function is also a set of ordered pairs; however, every x-value must be associated to only one y-value.
Suppose we have two relations written in tables,
- A relation that is not a function
Since we have repetitions or duplicates of x-values with different y-values, then this relation ceases to be a function.
- A relation that is a function
This relation is definitely a function because every x-value is unique and is associated with only one value of y.
So for a quick summary, if you see any duplicates or repetitions in the x-values, the relation is not a function. How about this example though? Is this not a function because we have repeating entries in x?
Be very careful here. Yes, we have repeating values of x but they are associated with the same value of y. The point (1,5) shows up twice, while the point (3,-8) is written three times. This table can be cleaned up by writing a single copy of the repeating ordered pairs.
The relation is now clearly a function!
Examples of How to Determine if a Relation is also a Function
Let’s go over a few more examples by identifying if a given relation is a function or not.
Example 1: Is the relation expressed in the mapping diagram a function?
Each element of the domain is being traced to one and only element in the range. However, it is okay for two or more values in the domain to share a common value in the range. That is, even though the elements 5 and 10 in the domain share the same value of 2 in the range, this relation is still a function.
Example 2: Is the relation expressed in the mapping diagram a function?
What do you think? Does each value in the domain point to a single value in the range? Absolutely! There’s nothing wrong when four elements coming from the domain are sharing a common value in the range. This is a great example of a function as well.
Example 3: Is the relation expressed in the mapping diagram a function?
Messy? Yes! Confusing? Not really. The only thing I am after is to observe if an element in the domain is being “greedy” by wanting to be paired with more than one element in the range. The element 15 has two arrows pointing to 7 and 9. This is a clear violation of the requirement to be a function. A function is well behaved, that is, each element in the domain must point to one element in the range. Therefore, this relation is not a function.
Example 4: Is the relation expressed in the mapping diagram a function?
If you think example #3 was bad, this example is the absolute worst! A single element in the domain is paired with four elements in the range. Remember, if an element in the domain is associated with more than one element in the range, the relation is automatically disqualified as a function. Thus, this relation is absolutely not a function.