Course contentsShow
← Computer Science
Lesson 79 of 2,8722. Discrete Mathematics for CSFree lesson

Function Properties: Bijective

Examining bijective functions that are both injective and surjective, establishing one-to-one correspondence.

Function Properties: Bijective

What you'll learn: How bijective functions create perfect one-to-one matchings between sets with no leftovers.

The Core Idea

A bijective function is one that is both injective (one-to-one) and surjective (onto). This means:

  • Every element in the domain maps to a unique element in the codomain (injective)
  • Every element in the codomain is mapped to by some element in the domain (surjective)

When a function is bijective, it creates a perfect pairing between two sets — like a dance where everyone has exactly one partner and no one sits out.

Why It Matters

Bijective functions establish a one-to-one correspondence between sets. This means:

  • The domain and codomain have exactly the same size
  • The function has a perfect inverse — you can "undo" the mapping
  • You can think of it as a reversible transformation

Simple Analogy

Imagine a coat check at a restaurant:

  • Each person (domain) gets exactly one numbered ticket (codomain)
  • Each ticket belongs to exactly one person
  • No tickets are unused
  • At the end, everyone can retrieve their coat by reversing the process

This is bijection: a perfect, reversible matching.

Testing for Bijection

To prove a function is bijective, you must show:

  1. Injective test: Different inputs always produce different outputs
  2. Surjective test: Every possible output is actually produced by some input

If both tests pass, the function is bijective.

Example Sets

f: {1, 2, 3} → {a, b, c} where f(1)=a, f(2)=b, f(3)=c is bijective — each element pairs perfectly with exactly one partner.

Key Takeaway: A bijective function is both injective and surjective, creating a perfect, reversible one-to-one correspondence between domain and codomain.