Injective and Surjective Functions
Explore the concepts of injective (one-to-one) and surjective (onto) functions, their characteristics, and practical examples. Learn how to determine if a function is injective or surjective through Python code, helping you solidify your understanding of function types in set theory.
Injective functions
A function is injective if every element of the domain maps to a unique element of the codomain. This means that if a function is injective, no two elements from the domain can map to the same element in the codomain. For example, if we consider
Examples
Take the following sets:
Using these sets, we can define the following injective function:
The function