Injective Function — How to Prove It, and Examples
Injective Function — How to Prove It, and Examples
What Is An Injective Function?
An injective function f:A→B is one where distinct inputs map to distinct outputs. Said the way it's usually proved: if f(a)=f(b), then a=b. The everyday name is a one-one function (or "one-to-one").
Two equivalent ways to say the same thing:
- Forward form: a≠b⟹f(a)≠f(b) (different inputs can't collide).
- Contrapositive form: f(a)=f(b)⟹a=b (a shared output forces the inputs to be equal).
The contrapositive form is the one you actually use in proofs, because it gives you an equation to solve.
How Do You Prove A Function Is Injective?
A frequent search is how do I prove a function is one-one? There are two standard routes — one algebraic, one graphical.
The algebraic method (works for any function with a formula):
- Assume f(a)=f(b).
- Write out the equation and simplify.
- If every legal simplification forces a=b, the function is injective.
The horizontal line test (works when you have a graph): A function is injective exactly when no horizontal line crosses its graph more than once. If any horizontal line hits the curve twice, two different inputs share that output, and one-one fails.
What Is The Difference Between Injective And Surjective?
- Injective (one-one): no output is shared. Distinct inputs give distinct outputs. Some outputs may go unused.
- Surjective (onto): every output is used. No element of the codomain is left out. Sharing is allowed.
They are independent — a function can be one without the other. For example, f(x)=e^x on R→R is injective (no two inputs share a value) but not surjective (negatives are never outputs). A function that is both is a bijective function, and only those have inverses.
What Is The Number Of Injective Functions Between Two Finite Sets?
If A has m elements and B has n elements with n≥m, the number of injective functions from A to B is the falling factorial:
n×(n−1)×(n−2)×⋯×(n−m+1)=n!(n−m)!
If m>n, the count is 0 — there aren't enough distinct outputs to go around, a direct consequence of the pigeonhole principle.
Examples Of Injective Functions
Example 1
Decide whether f: {1, 2, 3} → {p, q, r, s} given by f(1)=p, f(2)=q, f(3)=r is injective.
No two inputs share an output, so the function is injective.
Example 2
Decide whether f: R → R, f(x)=x^2, is injective.
Test the definition. Suppose f(a)=f(b), this gives a^2=b^2 which allows a=b or a=−b. Thus, the function is not injective.
Example 3
Prove that f: R → R, f(x)=5x−7, is injective.
Assume f(a)=f(b), so 5a−7=5b−7, leading to a=b. Thus, f is injective.
Example 4
Decide whether f: R → R, f(x)=x^3, is injective.
Assume f(a)=f(b), we find that a=b. Hence, f is injective.
Example 5
Decide whether f: R → R, f(x)=1/(x+1), is injective.
Assume f(a)=f(b). Cross-multiplying leads to a=b, so f is injective on its domain.
Example 6
Count the injective functions from a 2-element set to a 4-element set.
The calculation is 4! / 2! = 12. There are 12 injective functions.
Why One-One Matters: "Injectivity Is What Makes Reversal Possible"
Injectivity guarantees that a process can be undone without ambiguity. It is half of invertibility, which means a function can be reversed only if each output traces back to exactly one input.
Where Injectivity Slips Away
Common mistakes include forgetting about negative roots, confusing injectivity with surjectivity, and misinterpreting inverse notation.
Conclusion
- An injective function sends distinct inputs to distinct outputs.
- Prove it algebraically or graphically.
- Injective and surjective are independent properties.
- The number of injective functions can be calculated based on the sizes of sets.
- Injectivity is crucial for defining invertibility.