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.
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. Writing this 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 , 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.
On the other hand, 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 to only one value of y.
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 being associated to the same values of y. The point (1,5) shows up twice, and 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!
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 to more than one element in the range. The element 15 has two arrows pointing to both 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 mapping diagram a function?
If you think example 3 was “bad”, this is “worse”. A single element in the domain is being paired to four elements in the range. Remember, if an element in the domain is being associated to more than one element in range, the relation is automatically disqualified to be a function. Thus, this relation is absolutely not a function.
Example 5: Is the mapping diagram a relation, or function?
Let me throw in this example to highlight a very important idea. Your teacher may give something like this just to check if you pay attention to details.
So far it looks normal. But there’s a little problem. The element “2” in the domain is not being paired to any element in the range. Every element in the domain must have some kind of correspondence to the range for it be considered a relation at least. Since this is not a relation, it follows that it can’t be a function.
So, the final answer is neither a relation, nor a function.