As we start our study of Calculus, we begin by looking at the fundamental idea of a function. We need to know what a function is and different properties it may have. In order to accomplish this, we will give the definition of a function, then go through a couple examples to see if they satisfy the properties of a function.

**A function**

In general, a function is a mapping between to sets of elements. That is, we start inside one set, that we will call the domain, and the function tells us how to get to the second set, that we will call the codomain. The set of elements that actually get mapped to will be the range of \(f\). Pictorially, we would have the following picture. Note that we denote our domain as the set \(A\) and our codomain as \(B\).

In this case, on the left we have our domain, \(A\), on the left and our codomain, \(B\), on the right. The element \(x\) represents an arbitrary element of \(A\). The arrow shows where \(f\) would send \(x\), so that \(f(x)\) would be \(y\) in this case. Since there is exactly one \(y\) for each \(x\), this would be a function.

In addition to telling us how to get from our domain to our codomain, a function must also satisfy the property that for every \(x\) in the domain (we can denote \(x\) in the domain as \(x \in A\), there exists exactly one \(y\) in the codomain (y \in B) such that \(f(x)=y\). This means that every thing in the domain must go somewhere and that it cannot go to multiple elements. In the following pictures we look at some ways we wouldn’t have a mapping and the situation where we would.

In this case, we have another mapping from \(A\) to \(B\). However, we would note that \(w \in A\), but there is no element in \(B\) which is equal to \(f(w)\). Therefore, this would not represent a function.

For the above picture, we note that \(v\) is mapped to two different values in \(B\). Therefore, this would not be a function.

In our last example, we will note that both \(w\) and \(x\) get mapped to the same point \(y\). Furthermore, there is nothing that get mapped to \(z\). However, both of these are allowed for a function. The important point is that everything in \(A\) is mapped to exactly one thing in \(B\). Hence, this would represent a function.

While we can represent functions using such pictures, we often write them in different ways. This includes using sentences, tables, graphs and function notation. We will now look at some examples.

**Sentences**

Here we will define a mapping from the set of students to the classes they are enrolled in different scenarios. Which of the following would describe a function?

- Suppose that the number of classes a given student was enrolled in was between 1 and 6 classes.
- Suppose that students were allowed to register for at most one class, but some students were not enrolled in any class.
- Suppose there was only one class offered and every student was required to be enrolled in this class.

- In this case, we will have that some students are signed up for more than one class. That is, there would exist an \(x\) such that there are more than one \(y\)s such that \(f(x)=y\). Therefore, this would not be a function.
- In this case, we would have some students that were not enrolled in any class. Therefore there would exist an \(x\) such that there was no \(y\) with \(f(x)=y\), so this also is not a function.
- In this case, each student would be enrolled in exactly one class. Therefore, each \(x\) would get mapped to exactly one \(y\) so this would be a function. Note that we do have that all the students get mapped to the same place, so there is \(y\) such that \(f(x)=y\) for multiple \(x\)s in the domain. However, this does not stop our mapping from being a function.

**Graphs**

Suppose that \(f(x)\) is defined by the following graphs. Which of these is a function?

This graph is not a function because at, say, \(x=1\) there are multiple \(y\) values.

This graph is not a function because at \(x=0\) there is no \(y\) value given. Note that, we can turn this graph into a function by restricting the domain. That is, we would say that this is a function on the domain \((-\infty,0) \cup (0, \infty)\), that is for all \(x \in \mathbb{R}\) such that \(x \neq 0\).

This graph is a function, because for all \(x\), there is exactly one \(y\). We can see this by drawing a vertical line across the graph and moving it left and right. As long as the line crosses exactly once, we would say that the graph gives us a function.

**Tables**

In this case, we will define mappings using tables. Determine which of \(f,g\) and \(h\) are functions.

x | f(x) | g(x) | h(x) |
---|---|---|---|

0 | 2 | 2 | 2 |

1 | 3 | 3 | 2 |

2 | 4 | 4 | 2 |

1 | 1 | 3 | 2 |

We note that \(f(x)\) is not a function since \(1\) is mapped to both \(3\) and \(1\). Both \(g(x)\) and \(h(x)\) are functions since each \(x\) is mapped to exactly one \(y\). Note that the repetition of \(y\)s for \(h\) does not stop it from being a function. Furthermore, we would say that \(dom(g)=\left\{0,1,2\right\}\) and \(range(g)=\left\{2,3,4\right\}\), whereas \(dom(h)=\left\{0,1,2\right\}\) and \(range(h)=\left\{2\right\}\).

**Conclusion**

Here we have looked at the definition of a function and gone through examples of what types of mappings are functions and are not. We were able to look at examples using sentences, graphs and tables. While we did not look at function notation, we will look at these representations of mappings in our next post.

If you look like to look at a more detailed description of functions, including topics of one-to-one, onto, and inverses, please see the post and video at Bijective mappings.

I hope you learned something and enjoyed the process. If you did, make sure to share with anyone else that may need help with Calculus. You can find more help on Calculus problems here.