When we discuss the term relation in mathematics we are referring to mapping of how one set of values, called the input or domain, relate to another set of values, called the output or range. There are many examples of relations that you may come across in everyday encounters. One example may be a list of companies and the number of employees each company has working for them. Our input would be companies and the output would be number of employees. Oftentimes though in math we try to map one set of numbers to another set of numbers and try to determine if there is a relationship between these numbers so that we can make predictions about future events.
Relation: a relationship between two sets of values, such that each element in one set corresponds to an element in the other set
An example of this would be if we wanted to determine a relationship between age and height. Below is a sample of the type of data that we might find.
Notice here how we are relating age to height: a 5 year old has a height of 24 inches, a 10 year old has a height of 48 inches, and so on. We say that the age represented by x represents elements in the domain and y represents elements in the range.
Domain: the set of all input values of a function or relation
Range: the set of all output values of a function or relation
Notice in the table above, we have two values in the domain which plot to the same value in the range. This is an important observation to make when distinguishing a relation from a function. Let's take a look at what we mean by the term "function" in mathematics.
Function: a special type of relation, in which every element in the domain corresponds to exactly one element in the range.
This means that unlike the previous example where we had the ages 20 year and 25 year map to the same height, in a function we cannot have this happen. An example of a function might be the volume of water in a container and the containers weight, as shown in the table below.
Notice that each value in the domain, x, maps to only one value in the range, y.
We can say that a function is a relation, but a relation is not necessarily always a function.
Vertical Line Test
There are other ways to determine if a given set of data represents a function. One of the most common ways we do this is to graph the data on a coordinate plane and perform a vertical line test. To perform a vertical line test, we take a vertical line (a line that goes up and down) and move it across the entire graph. If the vertical line touches the function at only one point across the entire graph, then it passes the vertical line test.
If a function passes the vertical line test, then we can claim that the graph represents a function. Let’s look at an example.
Notice that in this graph shown above, several vertical lines were drawn in and no line touches the graph more than once. Therefore, we can conclude that this represents a function.
One the other hand, suppose we have a horizontal parabola, as shown below. If we perform the vertical line test on the graph of this relation, is it also a function?
Notice that there is more than one point at which a vertical line hits the curve. Therefore, we can conclude that this graph does not represent a function.
Let’s now take a look at the notation we use to represent functions.
Suppose I have the linear relation, y = 2x - 4. Notice that if we were to graph this line and apply the vertical line test to it we can confirm that this is a function.
When working with functions we like to write those functions in a notation that let’s us know that we are working with a function, and what inputs the outputs of the function are dependent on. In this process we rewrite y = 2x - 4 as f(x) = 2x - 4. Note that here y and f(x) are the same thing. We read this statement as, “f of x is equal to 2x - 4”, which means that this function, generically represented by f, is dependent on the input x.
Be careful that you do not mistake f(x) for f multiplied by x. When we write f(x), we are noting that we are working with functions, not that we are multiplying quantities. When dealing with functions, f(x) always means that the output of the function is dependent on the input x.
When solving this above function for a given value of x, instead of saying finding the value of y when x = a, as we have done before, we say find f(a). This is read "f of a". While the notation is slightly different, the process we use is generally the same. Let’s look at an example:
When asked to solve a function f(x) for the quantity "a", simply substitute all x variables in the function with "a" and simplify.
the set of input values of a function or relation
a relation in which every element in the domain corresponds to exactly one element in the range
the set of output values of a function or relation
a relation between two sets that matches elements of one set with elements of another set