Injective & Surjective
Composition of Functions – (GATE Detailed Notes)
Section titled “Composition of Functions – (GATE Detailed Notes)”Injective & Surjective
Section titled “Injective & Surjective”Function
A function maps each element of set A to exactly one element of set B.
A f B| a ─────────▶ b |Injective (One-to-One)
A B| || a1 ─────────▶ b1 || a2 ─────────▶ b2 || a3 ─────────▶ b3 || |A function is injective if:
-> Different inputs give different outputs.
Surjective (Onto)
A B| || a1 ─────────▶ b1 || a2 ─────┐ || └────▶ b2 |A function is surjective if:
-> Every element of the codomain is covered.
Bijective
A function that is both injective and surjective.
Cardinality Rules for Functions (Finite Sets): Injective / Surjective / Bijective (Made by me) ⭐
Section titled “Cardinality Rules for Functions (Finite Sets): Injective / Surjective / Bijective (Made by me) ⭐”A f B (finite sets)| a ─────────▶ b |Let
Necessary Conditions for Injective & Surjective Functions (Size Constraints)
1. if f is Surjective (Onto)
- (
m >= n) Reason: Surjective means So number of distinct outputs =n
But distinct outputs ≤ number of inputs = m
=>n ≤ m
2. if f is Injective (One-One)
- (
m <= n) Reason: Injective means all inputs give distinct outputs
So number of distinct outputs =m
But outputs are inside B which has size n
=> m ≤ n
3. if f is both Injective and Surjective (Bijective)
- (
m = n) Reason: From surjective =>m >= n
and from injective =>m <= n
Som = n
Possibility Table using Sizes of Sets (m<n, m>n, m=n) + Pigeonhole Principle
1. if (m < n)
- Can not be Surjective.
Reason: Surjective means every element of B must be hit. But A has only m elements, so f(A) has at most m images. Ifm < n, cannot cover all n elements of B. - Can or cannot be Injective.
Reason: Injective only needs different A elements go to different B elements. Since B is larger, it is possible. (Example:A={1,2},B={a,b,c},f(1)=a,f(2)=bis injective)
2. if (m > n)
- Can ==not be Injective.
Reason: By pigeonhole principle==: more elements in A than B, so at least two elements of A must map to same element of B. - Can or cannot be Surjective.
Reason: Surjective is possible if all elements of B are covered. (Example:A={1,2,3},B={a,b},f(1)=a,f(2)=b,f(3)=ais surjective)
3. if (m = n)
- Can be Surjective. also, If surjective then injective otherwise not injective.
Reason: For finite sets with same size, surjective ⇒ injective. If it was not injective, two A map to same B, then some B would be missed, so not surjective. - Can be Injective. also, If injective then surjective otherwise not surjective.
Reason: For finite sets with same size, injective ⇒ surjective. If some b in B is not hit, then only n-1 elements are hit, impossible with injective mapping of n elements. - Key fact (only for finite sets):
|A|=|B|⇒ Injective ⇔ Surjective (and both mean Bijective).
Note:
Pigeonhole Principle
- If you put more objects than boxes, then at least one box will contain 2 or more objects.
- Mathematically: If
m > nandmitems are distributed intonboxes, then some box has ≥ 2 items. - In functions: If
|A| > |B|then f cannot be injective (two elements of A must map to same element of B).
Composition of Functions
Section titled “Composition of Functions”A g B f C| a ─────────▶ b ─────────▶ c |If:
Then the composition:
is a function from A to C.
Properties of Composition ⭐
Injectivity
- If both ( f ) and ( g ) are injective → ( ) is injective
- If ( ) is injective → ( g ) must be injective
- Injectivity of ( ) gives no guarantee about injectivity of ( f ) ⭐
Surjectivity
- If both ( f ) and ( g ) are surjective → ( ) is surjective
- If ( ) is surjective → ( f ) must be surjective
- Surjectivity of ( ) gives no guarantee about surjectivity of ( g ) ⭐
Option Analysis Pattern
When given properties of , , and :
| Given | Result | |
|---|---|---|
| 1 | is injective | ✅ is injective |
| 2 | is surjective | ✅ is surjective |
| 3 | and are injective | ✅ is injective |
| 4 | and are surjective | ✅ is surjective |
| 5 | and are injective | ❌ is not necessarily Injective |
| 6 | and are surjective | ❌ is not necessarily Surjective |
is injective
- is injective ------> is injective
- is injective <------ and are injective
is surjective
- is surjective -----> is surjective
- is surjective <----- and are surjective
Not Guaranteed
- and are surjective —X—> No guarantee about
- and are injective —X—> No guarantee about
Proofs: Composition Properties
- Let and .
1. injective injective
- Proof:
- Suppose for .
- Apply to both sides:
- Since is injective, we must have .
2. surjective surjective
- Proof:
- Let be arbitrary.
- Since is surjective, there exists such that
- Let . Then .
- Since this holds for all ,
3. and injective injective
- Proof:
- Suppose .
- Then
- Since (f) is injective,
- Since (g) is injective, .
4. and surjective surjective
- Proof:
- Let be arbitrary.
- Since is surjective, there exists such that .
- Since is surjective, there exists such that .
- Substituting:
Counterexample: Clarifying “No Guarantee” Cases
1. and injective ❌ No guarantee about
- Counterexample:
- ,
- )
- Here, is not injective, but is injective.
Note: only needs to be injective on the range of , not on all of .
2. and surjective ❌ No guarantee about
- Counterexample:
- ,
- ,
- Here, is not surjective, but is surjective.
Note: can map multiple elements of to the same element in as long as the image of covers .
Composition of Functions (f ∘ g) : Injective / Surjective Implications (Made by me ⭐)
g fA ───▶ B ───▶ C1. f ∘ g -> injective
- if
f ∘ gis injective thengmust be injective.
Reason: Ifg:A->Bis not injective, then multiple elements of A can point to the same element of B.
Then applyingfon that same B gives same output in C.
So two different elements of A will map to same element in C, henceA->Cwill not be injective.
Sogmust be injective. - Injective ⇒ blame earlier function (g)
2. f ∘ g -> surjective
- if
f ∘ gis surjective thenfmust be surjective.
Reason: Iff:B->Cis not surjective, then some elements of C are not covered by f.
Then no matter what g does (A->B), those missing elements of C can never be reached.
SoA->Calso cannot be surjective.
Hencefmust be surjective. - Surjective ⇒ blame later function (f)
Note: ⭐
Injectivity flows backward
Surjectivity flows forward
Common GATE Traps ⚠️
- Confusing injective and surjective implications
- Assuming bijection without proof
- Ignoring codomain vs image