Skip to main content

Section 1.2 Functions

Given objects \(x,y\text{,}\) an ordered list of the form \((x,y)\) is called an ordered pair. To say that the pair is ordered means that the pairs \((x,y)\) and \((y,x)\) are different if \(x\neq y\text{.}\) The object \(x\) is called the first entry (or the left entry) of the ordered pair \((x,y)\text{,}\) and the object \(y\) is called the second entry (or the right entry). The (Cartesian) product of the set \(A\) with the set \(B\text{,}\) denoted \(A\times B\) is the set
\begin{equation*} A\times B = \{(a,b)\colon a\in A \text{ and } b\in B\} \end{equation*}
of all ordered pairs of the form \((a,b)\text{,}\) where \(a\) is an element of set \(A\) and \(b\) is an element of set \(B\text{.}\)
A subset \(R\subseteq S\times T\) of the product of sets \(S,T\) is called a relation from \(S\) to \(T\). A relation \(f\subseteq S\times T\) is called a function from \(S\) to \(T\) if every element \(s\) in \(S\) is the left entry of exactly one element in \(f\text{.}\) We write \(f\colon S\to T\) to indicate that the relation \(f\subseteq S\times T\) is a function. The set \(S\) is called the domain, the set \(T\) is called the codomain, and the set \(f\subseteq S\times T\) is called the graph of the function \(f\colon S\to T\text{.}\) We write \(f(s)=t\) to indicate that \((s,t)\) is an element of \(f\text{.}\) If \(f(s)=t\text{,}\) we say that \(t\) is the image of \(s\) under \(f\) and that \(s\) is a preimage of \(t\) under \(f\). Informally, we may refer to a function a process that transforms inputs (elements of the domain set) to outputs in the codomain set. When the sets \(S,T\) are understood or implied by context, it is common usage to refer to the function \(f\colon S\to T\) simply as "the function \(f\)".
To express that a relation \(R\subseteq S\times T\) consists of three parts, namely, the sets \(R\text{,}\) \(S\text{,}\) and \(T\text{,}\) we say that a relation is a triple \((R,S,T)\text{.}\) To say that relations \((R,S,T)\) and \((R',S',T')\) are equal means that \(R=R'\text{,}\) \(S=S'\text{,}\) and \(T=T'\text{.}\) In particular, to say that two functions are equal means that they have not only the same graph, but also the same domain and the same codomain.

Checkpoint 1.2.1.

  1. Write all 16 relations from \(S=\{a,b\}\) to \(T=\{x,y\}\text{.}\)
  2. Which of the relations in the previous part are functions?

Checkpoint 1.2.2.

  1. Write the graphs of all possible functions from \(\{x,y,z\}\) to \(\{A,B\}\text{.}\) Suggestion: The graph \(\{(x,f(x)),(y,f(y)),(z,f(x))\}\) of a function \(f\colon \{x,y,z\}\to\{A,B\}\) can be shown in an "input/output" table like this:
    \begin{equation*} \begin{array}{c|ccc}u\amp x\amp y\amp z\\ \hline f(u) \amp f(x) \amp f(y) \amp f(z) \end{array}. \end{equation*}
    If we agree on the ordering of the elements in the top row, then we can fully describe the graph of \(f\) using only the second row. For example, \(f=[A,A,B]\) denotes
     1 
    This shorthand notation for functions is not standard, but we will use it here for convenience. When writing mathematics, it is a good idea to use standard notation by default. But you are allowed to define your own special-purpose notation when you have a good reason.
    the graph \(f=\{(x,A),(y,A),(z,B)\}\text{.}\)
  2. Write the graphs of all possible functions from \(\{A,B\}\) to \(\{x,y,z\}\text{.}\)
  3. Write the graphs of all possible functions from \(\{x,y,z\}\) to \(\{x,y,z\}\text{.}\)
  4. Suppose that the graph of \(f\colon S\to T\) is given by
    \begin{equation*} f=\{(u,1), (v,3), (w,1)\} \end{equation*}
    Is it possible to identify the set \(S\text{?}\) Is it possible to identify the set \(T\text{?}\)
Given functions \(f\colon S\to T\) and \(g\colon T\to U\text{,}\) the function \(g\of f\colon S\to U\), called the composition of \(g\) with \(f\text{,}\) is defined by \((g\of f)(s) = g(f(s))\) for all \(s\in S\text{.}\) This means that if \((s,t)\) is an element of \(f\) and \((t,u)\) is an element of \(g\text{,}\) then \((s,u)\) is an element of \(g\of f\text{.}\)
Given a set \(S\text{,}\) the function \(f\colon S\to S\) defined by \(f(s)=s\) for every \(s\in S\) is called the identity function on \(S\). The identity function on \(S\) is sometimes denoted \(I_S\) , \(\Id_S\), or \(\One_S\), and the subscript \(S\) may be omitted when the context is clear.
Given a relation \(R\subseteq S\times T\text{,}\) the inverse relation to \(R\), denoted \(R^{-1}\text{,}\) is the relation from \(T\) to \(S\) given by
\begin{equation*} R^{-1}=\{(t,s)\colon (s,t)\in R\}\subseteq T\times S. \end{equation*}
In general, the inverse relation \(f^{-1}\subseteq T\times S\) of a function \(f\colon S\to T\) is not a function. To say that the inverse relation \(f^{-1}\subseteq T\times S\) is a function, it must be true that every \(t\) in \(T\) is the left entry of exactly one element in \(f^{-1}\text{.}\) This is the same as saying that every \(t\) in \(T\) is the right entry of exactly one element in \(f\text{,}\) or, to say in another way, every element in the codomain of \(f\colon S\to T\) has exactly one preimage under \(f\text{.}\) In this case, \(f\colon S\to T\) is said to be invertible with inverse function \(f^{-1}\colon T\to S\text{.}\) Proposition 1.2.3 records an important basic property of the relationship between an invertible function and its inverse function.

Checkpoint 1.2.4.

Fill in the blanks in the following proof of Proposition 1.2.3. Let \(s\in S\text{,}\) and let \(t=f(s)\) so that we have \(\fillinmath{XXX}\in f\text{.}\) By the definition of \(\fillinmath{XXX}\text{,}\) we have that \((t,s)\in \fillinmath{XXX} \text{.}\) By the definition of \(\fillinmath{XXX}\text{,}\) we have \((s,s) \in f^{-1}\of f\text{.}\) This holds for all \(s\in S\text{,}\) so we conclude that \(\fillinmath{XXX}\text{.}\) Similarly, let \(t\in T\text{,}\) and let \(s=f^{-1}(t)\text{,}\) so that we have \(\fillinmath{XXX}\in f^{-1}\text{.}\) It follows that \(\fillinmath{XXX} \in f\text{.}\) By the definition of composition, we have \((t,t)\in \fillinmath{XXX} \text{.}\) This holds for all \(t\in T\text{,}\) so we conclude that \(f\of f^{-1}=\One_T\text{.}\)
Image sets and preimage sets. Let \(f\colon S\to T\) be a function, let \(U\subseteq S\) be a subset of the domain \(S\) and let \(V\subseteq T\) be a subset of the codomain \(T\text{.}\) The image of \(U\) under \(f\), denoted \(f(U)\), is defined to be
\begin{equation*} f(U)=\{f(s)\colon s\in U\}. \end{equation*}
The set \(f(S)\) is called the image of the function \(f\).
 2 
The term "range" is used in many texts, sometimes to refer to the image of a function, and sometimes to refer to the codomain. Because the ambiguity, we do not use the term "range" in these notes.
The preimage of \(V\) under \(f\), denoted \(f^{-1}(V)\), is defined to be
\begin{equation*} f^{-1}(V)=\{s\in S\colon f(s)\in V\}. \end{equation*}
Note that we do not assume that \(f^{-1}\) is a function to make this definition. If \(V\) contains only one point, say \(V=\{t_0\}\text{,}\) it is customary to omit the set brackets and write \(f^{-1}(t_0)\) instead of \(f^{-1}(\{t_0\})\text{.}\)

Checkpoint 1.2.5.

This exercise refers to the collections of function in Checkpoint 1.2.2.
  1. Of the collection of functions from \(\{x,y,z\}\) to \(\{A,B\}\text{,}\) which ones are invertible? For each function, give the preimage of \(A\text{.}\)
  2. Of the collection of functions from \(\{A,B\}\) to \(\{x,y,z\}\text{.}\) Which are invertible? For each function, give the preimage of the set \(\{x,y\}\text{.}\)
  3. Of the collection of functions from \(\{x,y,z\}\) to \(\{x,y,z\}\text{.}\) Which are invertible?

Exercises Exercises

1.

Let \(f\colon S\to T\) be a function that is not invertible. One of the following statements is always true, and the other statement is sometimes true, and sometimes false. Determine which is which. Demonstrate the "sometimes true" statement by giving two specific examples — one example for which the statement is true, and one example for which the statement is false. "Specific" means that you will write all of the sets \(S,T,A,B\) or \(S,T,V,W\) as lists of elements inside curly brackets, and write your functions as lists of ordered pairs in curly brackets.
  1. For any subsets \(A,B\) of \(S\text{,}\) we have \(f(A \cap B) = f(A) \cap f(B)\text{.}\)
  2. For any subsets \(V,W\) of \(T\text{,}\) we have \(f^{-1}(V\cap W) = f^{-1}(V)\cap f^{-1}(W)\text{.}\)

2. Permutations.

A permutation of a set \(X\) is an invertible function from \(X\) to itself.
  1. Using the notation explained in Checkpoint 1.2.2, write all 24 of the permutations of \(X=\{a,b,c,d\}\text{.}\) (For example, write \([d,b,a,c]\) to denote the permutation whose graph is \(\{(a,d),(b,b),(c,a),(d,c)\}\text{.}\))
  2. Let \(f=[d,b,a,c]\) and \(g=[a,c,d,b]\) be permutations of the set \(X=\{a,b,c,d\}\text{,}\) using the notation from part a above. Find the permutations \(f\of g\text{,}\) \(g\of f\text{,}\) and \(f^{-1}\text{.}\)

3. Projection.

Let \(\R\) denote the set of real numbers, and let \(\R^2\) denote the set \(\R^2= \R\times \R\) of ordered pairs of real numbers. Let \(X\subseteq \R^2\) denote the line \(X=\{(x,1)\colon x\in \R\}\text{,}\) and let \({O}\in \R^2\) denote the point \({O}=(0,0)\text{.}\) Given a point \(P\) in \(\R^2\text{,}\) let \(L\) denote the line \(L=\overline{OP}\) that passes through \(0\) and \(P\text{.}\) If \(L\) and \(X\) have a point of intersection, say at \(Q=(x_0,0)\text{,}\) we will write \(\pi(P)\) to denote the \(x\)-coordinate \(x_0\) of \(Q\text{.}\) Let \(D\subseteq \R^2\) the set of all points \(P\) for which \(\pi(P)\) exists, and let \(\pi\colon D\to \R\) denote the function that sends \(P\in D\) to \(\pi(P)\in \R\text{.}\) The function \(\pi\) is called a 1-point projection from \(O\text{.}\)
  1. Find \(D\text{.}\)
  2. Find \(\pi(3,4)\text{,}\) \(\pi(2,1/2)\text{,}\) and \(\pi(6,1)\text{.}\)
  3. Find \(\pi^{-1}(3)\text{.}\)
  4. Let \(T\subseteq D\) be the line segment with endpoints \((1,2)\) and \((4,-1)\text{.}\) Find \(\pi(T)\text{.}\)
  5. Let \(U\subseteq \R\) be the interval \(U=\{x\colon -2\leq x \leq 7\}\text{.}\) Find \(\pi^{-1}(U)\text{.}\)