Injective, Surjective, Bijective

Three Types of Functions

Functions can be classified by how inputs and outputs relate.

  • Injective — no output is hit more than once
  • Surjective — every output is hit at least once
  • Bijective — both injective and surjective

Injective (One-to-One)

A function is injective if different inputs always give different outputs.

f(a)=f(b)    a=bf(a) = f(b) \implies a = b

No two inputs share the same output.


Surjective (Onto)

A function is surjective if every element in the codomain is hit by some input.

Range=Codomain\text{Range} = \text{Codomain}

Nothing in the codomain is left unused.


Bijective (One-to-One and Onto)

A function is bijective if it is both injective and surjective.

  • Each output is hit exactly once
  • Every output is hit

Perfect pairing — each input matches exactly one output, and vice versa.


Summary

TypeCondition
InjectiveNo output hit more than once
SurjectiveEvery output hit at least once
BijectiveEvery output hit exactly once

Why It Matters

Bijective functions have inverses.

If f:ABf: A \to B is bijective, you can reverse it: f1:BAf^{-1}: B \to A

This works because:

  • Injective means no ambiguity going backwards
  • Surjective means every element in B came from somewhere