Example 2
Determine the domain and range of \(y=f(x)\).

Solution
The domain of a function is the set of all valid inputs.
- In other words, the domain is the set of all \(x\)-values of the function.
- This graph exists at these \(x\)-values: \(-4\), \(-2\), \(-1\), \(2\), and \(3\).
Therefore, the domain is \(D=\{-4,~{-2},~{-1},~2,~3\}\).
The range of a function is the set of all possible output values.
- In other words, the range is the set of all \(y\)-values of the function.
- This graph has points with \(y\)-values \(-3\), \(0\), \(1\), and \(3\).
Therefore, the range is \(R=\{-3,~0,~1,~3\}\).
Note that, while the \(y\)-value of \(-3\) appears twice on the graph, we list it only once when writing the range.
Further, we normally list the elements in increasing order, though that is not a requirement when listing the elements of a set.