PAIBOTLearn
Sign inSign up

Injective and surjective maps

Functions & relations

Japanese school year: University year 1

What you learn

You will learn the formal definitions of injective, surjective, and bijective mappings, as well as the conditions required for inverse mappings to exist. These concepts are fundamental in modern algebra and invertible data transformations in computer science. Prior familiarity with functions and basic set operations will support your progress.

Go to practice

Key points

This defines an injective (one-to-one) function ff. It states that if two outputs are equal (f(x1)=f(x2)f(x_1) = f(x_2)), their inputs x1x_1 and x2x_2 must be identical, meaning distinct inputs never share an output.

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

This defines a surjective (onto) function ff. It means every element yy in the target set YY has at least one source element xx in set XX satisfying f(x)=yf(x) = y, leaving no target element uncovered.

∀y∈Y,  ∃x∈X  (f(x)=y)\forall y \in Y, \; \exists x \in X \; (f(x) = y)

When a function ff is bijective (both injective and surjective), it has an inverse function f−1f^{-1} that reverses it. Applying one after the other returns the input unchanged via the identity map id\mathrm{id}.

f−1∘f=idX,f∘f−1=idYf^{-1} \circ f = \mathrm{id}_X, \quad f \circ f^{-1} = \mathrm{id}_Y

Choose a set to practice.