Functions, Domain, and Range
Explore the concept of functions as special types of relations linking elements from one set to another. Understand key terms such as domain, codomain, and range, and see practical examples illustrating when relations qualify as functions. Learn to count the number of possible functions between sets and apply this knowledge using Python code to verify functions.
Relations as functions
We can view functions as a special kind of relations because every function from
Note: Remember that every function is also a relation, but a relation may or may not be a function.
Terminology
A function from
If a function
Examples
Let’s take the following two sets:
Let’s look at
The mapping