The Three Parts of a Function
Every function has three important sets:
- Domain — the set of inputs
- Codomain — the set of possible outputs
- Range — the set of outputs that actually get used
Definitions
Domain = = all inputs
Everything that goes into the function.
Codomain = = all possible outputs
Everything that could come out.
Range = outputs that actually occur
Everything that does come out.
Example
| Part | Value | Why? |
|---|---|---|
| Domain | All the inputs | |
| Codomain | All possible outputs | |
| Range | Only a and b get hit |
Notice: and are in the codomain but nothing maps to them.
Range vs Codomain
The range is always a subset of the codomain:
Sometimes they’re equal — every possible output gets used.
Sometimes the range is smaller — some outputs go unused.
Another Example
- Domain = (all real numbers can be squared)
- Codomain = (we declared outputs are real numbers)
- Range = (only non-negative numbers come out)
Why? Squaring never gives a negative result. So is in the codomain, but no input maps to it.