UNIHIVE

Study Hub UNIPORT MTH 114

MTH 114 · Introduction to Sets, Logic and Algebra

Mappings (functions)

Domain, codomain and range, injective, surjective and bijective mappings, inverse mappings, composition, and counting mappings between finite sets.

Our notes

2 min read

Definition

A mapping (function) f : A → B assigns to each element of A exactly one element of B. A is the domain, B the codomain; the range (image) f(A) is the set of values actually taken.

Types of mapping

  • Injective (one-to-one): different inputs give different outputs: f(a₁) = f(a₂) implies a₁ = a₂.
  • Surjective (onto): every element of B is an output: range = codomain.
  • Bijective: both. Only bijections have inverses.

Worked examples.

  • f : R → R, f(x) = 2x + 3. Injective: 2a + 3 = 2b + 3 gives a = b. Surjective: for any y, x = (y − 3)/2 gives f(x) = y. Bijective, inverse f⁻¹(y) = (y − 3)/2. Check: f(f⁻¹(7)) = 2(2) + 3 = 7. ✓
  • g : R → R, g(x) = x². Not injective (g(−2) = g(2) = 4); not surjective (−1 is never an output). Restricted to g : [0, ∞) → [0, ∞) it becomes a bijection with inverse √y.
  • h : Z → Z, h(n) = 2n. Injective but not surjective (odd numbers are missed).

Composition

(g ∘ f)(x) = g(f(x)): apply f first, then g.
Example. f(x) = 2x + 3, g(x) = x². (g ∘ f)(x) = (2x + 3)²; (f ∘ g)(x) = 2x² + 3. At x = 1: g ∘ f gives 25, f ∘ g gives 5, so composition is not commutative. It is associative: h ∘ (g ∘ f) = (h ∘ g) ∘ f.
For bijections, (g ∘ f)⁻¹ = f⁻¹ ∘ g⁻¹ (undo in reverse order, like taking off socks and shoes).

Counting mappings (|A| = m, |B| = n)

  • All mappings A → B: nᵐ.
  • Injective mappings (m ≤ n): n(n − 1)...(n − m + 1).

Example. A = {1, 2, 3}, B = {x, y}. Mappings: 2³ = 8. Injective: none (3 inputs cannot all have different outputs among 2). Surjective: all except the 2 constant mappings: 8 − 2 = 6.

Exams usually ask: decide whether a given mapping is injective, surjective or bijective and prove it; find an inverse; compute g ∘ f and f ∘ g; count mappings between small sets.

Common mistake: finding a "formula" for the inverse of a mapping that is not bijective. Check bijectivity first, or restrict the domain.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All MTH 114 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.