Bijection

A function f:XYf : X \to Y is bijective when it pairs every element of XX with exactly one element of YY and every element of YY with exactly one element of XX — a perfect one-to-one matching. Bijection is the conjunction of two simpler properties: injective (“one-to-one”) and surjective (“onto”). It’s worth seeing each on its own first, then the combination.

Throughout, f:XYf : X \to Y denotes a function with domain XX (the set of allowed inputs) and codomain YY (the set in which outputs are declared to live). The image of ff is the subset of YY that is actually hit:

f(X)={f(x):xX}Yf(X) = \{f(x) : x \in X\} \subseteq Y

The image can be a proper subset of the codomain — declaring ff to map into YY doesn’t oblige it to cover YY.

Injective (one-to-one)

A function f:XYf : X \to Y is injective (or one-to-one) if distinct inputs always produce distinct outputs:

x1x2    f(x1)f(x2)x_1 \neq x_2 \implies f(x_1) \neq f(x_2)

equivalently, by contrapositive:

f(x1)=f(x2)    x1=x2f(x_1) = f(x_2) \implies x_1 = x_2

No two different elements of XX get collapsed to the same element of YY.

Each arrow lands on a different target. Injectivity says nothing about whether every element of YY gets hit — the unmapped element on the right is still allowed.

f(x)=2xf(x) = 2x on R\mathbb{R} is injective: if 2x1=2x22x_1 = 2x_2 then x1=x2x_1 = x_2. So is f(x)=exf(x) = e^x on R\mathbb{R}. But f(x)=x2f(x) = x^2 on R\mathbb{R} is not injective: f(1)=f(1)=1f(-1) = f(1) = 1.

Surjective (onto)

A function f:XYf : X \to Y is surjective (or onto) if every element of the codomain is hit by at least one input:

yY, xX:f(x)=y\forall y \in Y, \ \exists x \in X : f(x) = y

equivalently, f(X)=Yf(X) = Y — the image equals the entire codomain.

Every element on the right has at least one arrow pointing to it. Multiple inputs are allowed to land on the same output (the topmost target receives two arrows) — surjectivity only demands coverage, not uniqueness.

f(x)=x3f(x) = x^3 on RR\mathbb{R} \to \mathbb{R} is surjective: every real number yy has a cube root y3\sqrt[3]{y}. But f(x)=exf(x) = e^x on RR\mathbb{R} \to \mathbb{R} is not surjective: no xx produces f(x)=1f(x) = -1 or f(x)=0f(x) = 0. (It becomes surjective if we restrict the codomain to (0,)(0, \infty).)

Surjectivity depends on what we declare the codomain to be. Restricting YY to the image f(X)f(X) trivially makes any function surjective. So “is ff surjective?” is really a question about whether the declared codomain matches the image.

Bijective (both)

A function f:XYf : X \to Y is bijective if it is both injective and surjective: every element of YY is hit by exactly one element of XX.

A bijective function is also called a bijection or a one-to-one correspondence.

Each element on the left is paired with exactly one element on the right, and vice versa — no collisions, no leftovers.

The defining property of a bijection is that it admits an inverse function f1:YXf^{-1} : Y \to X: for every yYy \in Y there is a unique xXx \in X with f(x)=yf(x) = y, and the assignment yxy \mapsto x is itself a function. The two compose to the identity in both directions:

f1f=idX,ff1=idYf^{-1} \circ f = \mathrm{id}_X, \qquad f \circ f^{-1} = \mathrm{id}_Y

Conversely, a function that has a two-sided inverse is bijective. So “bijection” and “invertible function” name the same concept.

f(x)=2x+1f(x) = 2x + 1 on RR\mathbb{R} \to \mathbb{R} is bijective, with inverse f1(y)=(y1)/2f^{-1}(y) = (y - 1)/2. So is f(x)=x3f(x) = x^3 on RR\mathbb{R} \to \mathbb{R}, with inverse f1(y)=y3f^{-1}(y) = \sqrt[3]{y}.

f(x)=exf(x) = e^x as a map R(0,)\mathbb{R} \to (0, \infty) is bijective, with inverse ln:(0,)R\ln : (0, \infty) \to \mathbb{R}. As a map RR\mathbb{R} \to \mathbb{R}, it is injective but not surjective, so not bijective.