Injection (Injective Function) — Definition, Formula & Examples
An injection (or injective function) is a function where no two different inputs produce the same output. If , then it must be the case that .
A function is injective (one-to-one) if and only if for all , implies . Equivalently, implies .
Key Formula
Where:
- = A function from set A to set B
- = Arbitrary elements in the domain A
How It Works
To prove a function is injective, assume for arbitrary elements and in the domain, then show algebraically that . To disprove injectivity, find a single counterexample: two distinct inputs that map to the same output. Graphically, a function from to is injective if and only if it passes the horizontal line test — every horizontal line intersects the graph at most once.
Worked Example
Problem: Prove that is injective over .
Assume equal outputs: Suppose for some .
Solve for the inputs: Subtract 5 from both sides, then divide by 3.
Conclude: Since forces , the function satisfies the definition of injectivity.
Answer: is injective because equal outputs always imply equal inputs.
Why It Matters
Injectivity is essential for defining inverse functions — a function has a left inverse precisely when it is injective. In discrete math courses, counting the number of injections from one finite set to another yields the permutation formula . Cryptographic hash functions and database key constraints also rely on injectivity to guarantee that distinct inputs remain distinguishable.
Common Mistakes
Mistake: Confusing injective (one-to-one) with surjective (onto).
Correction: Injective means no two inputs share an output. Surjective means every element in the codomain is hit by at least one input. A function can be one without the other.
