Mathwords logoMathwords

Bijective Function — Definition, Formula & Examples

A bijective function is a function that pairs every element in its domain with exactly one unique element in its codomain, and every element in the codomain is paired with some element in the domain. In short, it is both one-to-one (injective) and onto (surjective).

A function f:ABf: A \to B is bijective if and only if for every bBb \in B there exists exactly one aAa \in A such that f(a)=bf(a) = b. Equivalently, ff is bijective if it is both injective (f(a1)=f(a2)a1=a2f(a_1) = f(a_2) \Rightarrow a_1 = a_2) and surjective (bB,  aA\forall\, b \in B,\; \exists\, a \in A such that f(a)=bf(a) = b).

How It Works

To show a function is bijective, you verify two properties. First, prove injectivity: assume f(a1)=f(a2)f(a_1) = f(a_2) and show this forces a1=a2a_1 = a_2. Second, prove surjectivity: take an arbitrary element bb in the codomain and find an aa in the domain with f(a)=bf(a) = b. A bijection guarantees that ff has an inverse function f1:BAf^{-1}: B \to A, since the perfect pairing can be reversed.

Worked Example

Problem: Let f:{1,2,3}{4,5,6}f: \{1, 2, 3\} \to \{4, 5, 6\} be defined by f(x)=x+3f(x) = x + 3. Determine whether ff is bijective.
Check injectivity: Assume f(a1)=f(a2)f(a_1) = f(a_2), so a1+3=a2+3a_1 + 3 = a_2 + 3. Subtracting 3 from both sides gives a1=a2a_1 = a_2. Therefore ff is injective.
a1+3=a2+3    a1=a2a_1 + 3 = a_2 + 3 \;\Rightarrow\; a_1 = a_2
Check surjectivity: Every element in the codomain must be hit. We have f(1)=4f(1) = 4, f(2)=5f(2) = 5, f(3)=6f(3) = 6. Every element of {4,5,6}\{4, 5, 6\} has a preimage, so ff is surjective.
f(1)=4,f(2)=5,f(3)=6f(1)=4,\quad f(2)=5,\quad f(3)=6
Answer: Since ff is both injective and surjective, ff is bijective.

Why It Matters

Bijections are essential when you need to count elements: two finite sets have the same size if and only if a bijection exists between them. In abstract algebra and cryptography, bijective functions ensure that mappings (like encryption schemes) can be perfectly reversed.

Common Mistakes

Mistake: Checking only injectivity (one-to-one) and concluding the function is bijective.
Correction: A function must also be surjective (onto). For example, f:RRf: \mathbb{R} \to \mathbb{R} defined by f(x)=exf(x) = e^x is injective but not surjective (no input maps to a negative output), so it is not bijective.