One-one, onto, and inverse functions — what each requires
Functions are the language in which all of higher mathematics is written, and three properties — one-one, onto, and invertible — are the gatekeepers that decide what a function can do and whether you can undo it. Mastering these three concepts unlocks inverse trigonometric functions, logarithms, and the entire theory of equations.
Definition: Function — a rule f: A → B that assigns each element of the domain A to exactly one element of the codomain B. The set of outputs actually produced is the range (or image), which is a subset of B (range ⊆ B).
One-one (injective) — no two inputs share an output
A function f is one-one (injective) if distinct inputs always produce distinct outputs.
Formal test: f(x₁) = f(x₂) ⟹ x₁ = x₂.
Graphical test (horizontal-line test): every horizontal line meets the graph at most once.
Example 1 — one-one:
f: ℝ → ℝ, f(x) = 2x.
Suppose f(x₁) = f(x₂) → 2x₁ = 2x₂ → x₁ = x₂. One-one confirmed.
Example 2 — not one-one:
f: ℝ → ℝ, f(x) = x².
f(2) = 4 and f(−2) = 4 — two different inputs map to the same output. Not one-one.
However, if we restrict the domain to [0, ∞), then for any x₁, x₂ ≥ 0, f(x₁) = f(x₂) → x₁² = x₂² → x₁ = x₂. On this restricted domain, x² is one-one.
Onto (surjective) — every codomain element is hit
A function f: A → B is onto (surjective) if every element of B is the image of at least one element of A — equivalently, the range equals the entire codomain.
Formal test: For every b ∈ B, there exists at least one a ∈ A such that f(a) = b.
Crucially, being onto depends on how the codomain is declared, not just the rule.
| Function | Codomain | Onto? | Reason |
|---|---|---|---|
| f(x) = x² | ℝ | No | Negative numbers never appear in output |
| f(x) = x² | [0, ∞) | Yes | Every non-negative real is a square |
| f(x) = x³ | ℝ | Yes | Every real number is a cube root of something |
| f(x) = sin x | ℝ | No | Range is [−1, 1], not all of ℝ |
| f(x) = sin x | [−1, 1] | Yes | Range exactly equals codomain |
This is why declaring the codomain carefully is mathematically important, not a technicality.
Bijection and the inverse
A function is a bijection (one-one and onto) if it is simultaneously injective and surjective. Only bijections have well-defined inverse functions.
Intuition: a bijection is a perfect pairing — every input matches one output, and every output matches one input. Like seats in an exam hall where exactly one student per seat and every seat is occupied — you can uniquely reverse the assignment.
Finding the inverse:
- Write y = f(x).
- Solve for x in terms of y.
- Replace y with x (rename variables): the result is f⁻¹(x).
- Verify: f⁻¹(f(x)) = x.
Question: Find the inverse of f(x) = 3x + 5, f: ℝ → ℝ.
Solution:
Step 1: Write y = 3x + 5.
Step 2: Solve for x: 3x = y − 5 → x = (y − 5)/3.
Step 3: Rename: f⁻¹(x) = (x − 5)/3.
Conclusion: f⁻¹(x) = (x − 5)/3. Check: f⁻¹(f(x)) = f⁻¹(3x + 5) = (3x + 5 − 5)/3 = x ✓.
Question: Is f: ℝ → ℝ, f(x) = x² invertible? If not, how to make it so?
Solution:
Step 1: f is not one-one on ℝ (f(2) = f(−2)), so it is not a bijection.
Step 2: Restrict domain to [0, ∞) — now f is one-one; also redefine codomain as [0, ∞) — now f is onto.
Step 3: On [0, ∞) → [0, ∞), f(x) = x² is a bijection; its inverse is f⁻¹(x) = √x.
Conclusion: You must restrict the domain (and match the codomain) to recover invertibility.
Composition of functions
Composition chains two functions: (g ∘ f)(x) = g(f(x)) — apply f first, then g to the result.
Composition is associative: h ∘ (g ∘ f) = (h ∘ g) ∘ f.
Composition is generally not commutative: g ∘ f ≠ f ∘ g in most cases.
Example: f(x) = x + 1, g(x) = x².
(g ∘ f)(x) = g(x + 1) = (x + 1)² = x² + 2x + 1.
(f ∘ g)(x) = f(x²) = x² + 1.
These are different, confirming non-commutativity.
Defining property of the inverse:
(f⁻¹ ∘ f)(x) = x for all x in the domain of f.
(f ∘ f⁻¹)(x) = x for all x in the domain of f⁻¹.
This means composing a bijection with its inverse always returns the input — the identity function.
Number of one-one and onto functions (finite sets)
If |A| = m and |B| = n:
- Number of one-one functions (requires m ≤ n): ⁿPₘ = n! / (n − m)!
- Number of onto functions: involves inclusion-exclusion: Σ (−1)^k × C(n,k) × (n−k)^m
- Number of bijections (requires m = n): n!
Why it matters: Invertibility is what lets us "undo" operations — solving equations, decrypting messages, reversing geometric transformations, and computing inverse trigonometric or logarithmic values all depend on finding or creating a bijection. Whenever you write y = sin⁻¹ x, you are using a deliberately restricted domain [−π/2, π/2] that turns the non-injective sine into a bijection.
Real-world example: Think of a function as the PIN-to-account mapping in a banking system. One-one means no two accounts share the same PIN (security!). Onto means every PIN in the system is assigned to some account (no wasted PINs). If both hold, the bank can uniquely reverse the query — given a PIN, find exactly one account — which is the inverse function. If two accounts share a PIN (not one-one), the reverse lookup fails.
Common misconception: "Every function has an inverse — just swap x and y." Swapping always produces a relation, but it is a function only when the original is a bijection. For f(x) = x² on ℝ, swapping gives x = y² → y = ±√x, which returns two values for x > 0 — violating the definition of a function. You must restrict the domain first.
- ✓- A function assigns exactly one output per input; range ⊆ codomain.
- ✓- One-one: f(x₁) = f(x₂) ⟹ x₁ = x₂ (horizontal-line test: at most one crossing).
- ✓- Onto: range = codomain — depends on the declared codomain, not just the formula.
- ✓- Bijection = one-one and onto; the only functions with well-defined inverses.
- ✓- To find f⁻¹: write y = f(x), solve for x, then relabel.
- ✓- Composition (g ∘ f) is associative but generally non-commutative.
- ✓- Restricting the domain (and codomain) can make a non-bijective function invertible.
"One-one = no doubling; Onto = no missing; Both = bijection = undo-able" — remember the logic chain: inject means you never double-map, surject means you never miss, and bijection means you can always reverse.
- ✓- One-one guards against repeated outputs; onto guards against missed targets in the codomain.
- ✓- Invertibility requires both properties — a bijection.
- ✓- f⁻¹ ∘ f = identity and f ∘ f⁻¹ = identity; this is the defining test of an inverse.
- ✓- When a function fails to be one-one (like x², sin x), restrict the domain to the largest interval where it is monotone, then match the codomain to the range.
Functions & Types — JEE Main Flashcards
Cover the answer, recall, then check. 12 cards on functions for JEE Main.
Q1. How many functions exist from a set of m elements to a set of n elements?
A1. nᵐ — each of the m inputs independently maps to any of the n outputs.
Q2. Define one-one (injective) and give the count of injections (m→n, n≥m).
A2. Distinct inputs give distinct outputs. Count = n!/(n−m)! = ⁿPₘ. If m>n, there are 0 injections.
Q3. Define onto (surjective). Count of surjections m→n?
A3. Every element of the codomain has a preimage. Count = Σ_{r=0}^{n} (−1)ʳ ⁿCᵣ (n−r)ᵐ.
Q4. Number of bijections from an n-element set to itself?
A4. n! (bijection ⇔ injective ⇔ surjective when domain and codomain are finite of equal size).
Q5. Even vs odd function test?
A5. Even: f(−x)=f(x) (symmetric about y-axis). Odd: f(−x)=−f(x) (symmetric about origin). f(0)=0 for a continuous odd function.
Q6. Condition for f to be invertible, and (f⁻¹)⁻¹?
A6. f is invertible iff it is a bijection. (f⁻¹)⁻¹ = f, and the graph of f⁻¹ is the reflection of f in y=x.
Q7. Composition rule and (f∘g)⁻¹?
A7. (f∘g)(x)=f(g(x)). (f∘g)⁻¹ = g⁻¹∘f⁻¹ (reverse order), when both are invertible.
Q8. Domain rules for √(g(x)) and log(g(x)).
A8. √: need g(x) ≥ 0. log: need g(x) > 0 (and base > 0, ≠ 1).
Q9. Fractional part {x} and greatest integer [x] relation?
A9. {x} = x − [x], with 0 ≤ {x} < 1. [x] is the greatest integer ≤ x. {x} has period 1.
Q10. Range of the signum function sgn(x)?
A10. {−1, 0, 1}: −1 if x<0, 0 if x=0, 1 if x>0. sgn(x) = x/|x| for x≠0.
Q11. Period of sin x, cos x, tan x, and |sin x|?
A11. sin, cos: 2π. tan: π. |sin x|: π. In general period of f(ax) is (period of f)/|a|.
Q12. Number of onto functions from a 4-element set to a 2-element set?
A12. 2⁴ − 2 = 14 (all functions minus the 2 constant ones). Matches Σ(−1)ʳ ²Cᵣ (2−r)⁴.
Functions & Types — JEE Main Summary
Functions are the backbone of calculus, and in JEE Main they yield 1–2 questions (~4–8 marks) on their own, plus they underpin every limit, derivative, and integral. High-yield sub-topics: counting injective/surjective functions, domain & range, even/odd/periodic classification, and inverses/composition.
Counting map types (m inputs → n outputs)
| Type | Count |
|---|---|
| All functions | nᵐ |
| Injective (n ≥ m) | ⁿPₘ = n!/(n−m)! |
| Surjective | Σ (−1)ʳ ⁿCᵣ (n−r)ᵐ |
| Bijective (m = n) | n! |
Key ideas
- Even / odd: f(−x)=f(x) even; f(−x)=−f(x) odd. Any function splits as f(x) = ½[f(x)+f(−x)] + ½[f(x)−f(−x)] (even + odd parts).
- Periodic: smallest T>0 with f(x+T)=f(x). Period of f(ax+b) is T/|a|.
- Invertible ⇔ bijective; (f∘g)⁻¹ = g⁻¹∘f⁻¹; graph of f⁻¹ is f reflected in y=x.
- Domain hunting: √ needs argument ≥ 0, log needs argument > 0, denominators ≠ 0.
Exam Tricks & Tips
- 🎯 For surjection counts with a 2- or 3-element codomain, use inclusion–exclusion directly: onto m→2 is 2ᵐ−2; onto m→3 is 3ᵐ − 3·2ᵐ + 3.
- 🎯 To find range, treat y=f(x), solve for x, and demand x be real/in-domain — the constraint on y gives the range.
- 🎯 Product of an even and an odd function is odd; sum of a non-zero even and non-zero odd function is neither.
- 🎯 Period of a sum is the LCM of individual periods (when it exists); |sin x| and |cos x| have period π, not 2π.
- 🎯 A function is one-one on an interval where f′(x) keeps a constant sign (strictly monotonic) — a fast injectivity test.
- ❌ Common mistake: calling a function onto without checking the CODOMAIN. Onto depends on the stated codomain, not just the image.
Expected exam pattern
Expect one counting problem (injections/surjections/bijections) and/or one domain–range or even–odd–periodic identification. Difficulty medium; the surjection formula and codomain-vs-range distinction are the usual stumbling blocks.
Quick recap
nᵐ functions, ⁿPₘ injections, n! bijections, inclusion–exclusion for surjections. Invertible ⇔ bijective; (f∘g)⁻¹=g⁻¹∘f⁻¹. Check domains for √/log/denominators, and never confuse image with codomain.
Functions and Types — Formula Sheet
Key formulas
- A function f: A→B assigns each a∈A exactly one image; domain A, codomain B, range ⊆ B.
- One-one (injective): f(x₁)=f(x₂) ⇒ x₁=x₂. Onto (surjective): range = codomain. Bijective = both.
- Number of functions A→B: |B|^|A|; injective (|A|=m ≤ |B|=n): n!/(n−m)!.
- Number of bijections from a set to itself of size n: n!.
- Number of onto functions from m-set to n-set: Σ_{r=0}^{n} (−1)^r C(n,r)(n−r)^m.
- (f∘g)(x)=f(g(x)); inverse exists iff f is bijective; (f⁻¹)⁻¹ = f.
- ✓- Functions A→B: |B|^|A|.
- ✓- Injective count: n!/(n−m)! (m ≤ n).
- ✓- Inverse exists ⇔ bijective.
- ✓- Onto count uses inclusion–exclusion Σ(−1)^r C(n,r)(n−r)^m.
Usage: to count functions choose the right formula by whether injective/onto is required.
Functions and types — Worked Example
Worked Example
Problem: Let f(x) = (x − 1)/(x + 2), defined for real x ≠ −2. (a) Show that f is one-one. (b) Find its inverse function and state the value excluded from the range.
Solution:
(a) Suppose f(a) = f(b):
(a − 1)/(a + 2) = (b − 1)/(b + 2)
Cross-multiplying: (a − 1)(b + 2) = (b − 1)(a + 2)
ab + 2a − b − 2 = ab + 2b − a − 2
2a − b = 2b − a → 3a = 3b → a = b.
Equal outputs force equal inputs, so f is one-one (injective).
(b) Let y = (x − 1)/(x + 2). Solve for x:
y(x + 2) = x − 1 → yx + 2y = x − 1
yx − x = −1 − 2y → x(y − 1) = −(1 + 2y)
x = (2y + 1)/(1 − y)
So f⁻¹(x) = (2x + 1)/(1 − x). The inverse is undefined at x = 1, so y = 1 is excluded from the range of f (f never equals 1, since (x−1)/(x+2) = 1 would need −1 = 2).
Answer: f is one-one; f⁻¹(x) = (2x + 1)/(1 − x); the value 1 is not in the range.
- ✓- Prove injectivity by showing f(a) = f(b) ⇒ a = b.
- ✓- Find the inverse by solving y = f(x) for x, then swapping variables.
- ✓- The value that makes the inverse undefined is the one missing from the original range.