Bifalgorithm post · Brisk · Chapter 1
What is an injective function?
What is an injective function? (Brisk · Chapter 1) — "An injective function is not only a function, but also kind of a “function in reverse”: not only does no…
Ideas in this flowchart
- An injective function is a function in which distinct inputs have distinct outputs.
- It satisfies the ordinary definition of a function.
- No single x maps to two different y-values.
- No two different x-values map to the same y-value.
- Graphically, it passes both the vertical line test and the horizontal line test.
- An injective function cannot exist when the domain is larger than the codomain.
- Therefore, no injective function exists from wizards to soft drinks.
- The phoneExtension function is an example of an injective function.
- Its domain is the employees, and its codomain is the four-digit phone extensions.
- One value is phoneExtension(Sally) = 1317.
- Every employee has exactly one extension, although some extensions may be unused.
- Because no two employees share an extension, phoneExtension is injective.
- “Injective function” and “one-to-one function” are exact synonyms.
