The Co-domain is the set of all possible output values of a function. In other words, it is the set of values that the output values lie in.
For instance, consider the function f(x) = 2x with a domain and codomain of integers.
We know that the actual output values, or the range, would be even integers.
So, the co-domain is integers but the range is even integers.
The range is hence, a subset of the codomain. We use both codomain and range because sometimes we don’t know the exact range but only the set that it lies in. Now let us look at some examples and determine if they are functions based on our definition.