Functions can be represented using tables of inputs and outputs, usually designated as \(x\)-values and \(y\)-values. For instance, let’s define a function \(f\) by the following table
\(x\) | \(y=f(x)\) |
\(2\) | \(50\) |
\(4\) | \(21\) |
\(3\) | \(0\) |
\(-3.154\) | \(1\) |
\(1.123\) | \(1\) |
One can use this table to determine what a function’s output is going to be based on specific given input values simply by reading across the rows. For instance, we can compute \(f(2)\), \(f(4)\), by reading across the rows, where \(x=2\) and \(x=4\). This gives the values \(f(2)=50\) and \(f(4)=21\).
Note that defining a function using a table leaves us with many numbers/values for which \(f\) produces no output. For instance, try computing \(f(10)\). There is no \(x\)-value input of \(10\) on this table, and as such, there is no output \(y\)-value corresponding to input \(x=10\). In which case, we say that \(f\) is undefined at \(x=10\).
Note that, in general, it is okay for functions to have duplicate output values, such as in the case of \(x=-3.154\) and \(x=1.123\) both giving an output of \(1\). However, functions CANNOT have two \(x\) values/inputs that map to different \(y\)-values.
Similarly, we can define a function as a set of ordered pairs, or a list of pairs of inputs along with their corresponding output. For instance, let’s define the function called \(g\) by the following list of ordered pairs:
The inputs are the first values in each parentheses. The outputs are the second values in each parentheses.
To evaluate a function’s value on a specific input, such as \(g(4)\) in the example above, find a set of parentheses where the first value is \(4\), and write the corresponding second value, which is \(g(4)=3\). The first value in each set of parentheses is often called an \(x\)-value, and the second value in the parentheses is often called a \(y\)-value. So, if the \(x\)-value \(x=-12.45\) is given as input, the corresponding output is \(g(-12.45)=24\).
Note that, just like with tables, a function defined by a list of ordered pairs might not be defined for certain \(x\)-value inputs. For instance, \(g\) is not defined on input \(x=200\); there is no ordered pair in the list that has a first entry of \(x=200\), and as such there is no \(y\)-value for that (missing) \(x\)-value!
\(x=\)inputs | \(y=f(x)\) |
1 | 5 |
2 | 3 |
3 | 6 |
4 | -1 |
5 | 0 |
\(f(1)=5\), \(f(4)=-1\), and \(f(2)=3\)
The inputs are \(1,\ 4,\) and \(2\) respectively. Find these values in the left column, then write the corresponding output from the right column in the same row as the input.
\(x\) | \(y=g(x)\) |
18 | 1 |
6 | 224 |
-15 | 53 |
0 | 61234 |
4 | 1 |
337 | 1 |
The set of all inputs that give an output of \(1\) is \(\{18, 4, 337\}\). Each element in this set, if treated as an input for the function defined by the table above, will map to \(1\). That is, \(f(18)=1\), \(f(4)=1\), and \(f(337)=1\).
Solution: \(f(2)=4\) and \(f(5)=2\).
The inputs given are \(2\) and \(5\). Find the ordered pair whose first entry is each of these and write the corresponding output, which is the second entry in the ordered pair corresponding to that input.
Solution: \(f(0)=-5\), \(f(-4)=5\), but \(f(3)\) is not defined.
The inputs given are \(0, -4\) and \(3\). Find the ordered pair whose first entry is each of these and write the corresponding output, which is the second entry in the ordered pair corresponding to that input. In the case of the input \(x=3\), there is no corresponding \(y\)-value, so in this case, the function is said to be undefined at \(3\).
Solution: \(\{1,2\}\). Note that \(f(1)=4\) and \(f(2)=4\). No other inputs have an output of \(4\).