Types of functions
One-one and onto functions; composition and inverse of a function.
The essentials
A function f : A → B assigns to each element of A exactly one element of B. A is the domain, B the codomain, and the set of values actually taken is the range.
A function is one-one (injective) if different inputs always give different outputs: f(x₁) = f(x₂) forces x₁ = x₂. It is onto (surjective) if its range equals the whole codomain, so every element of B is the image of at least one element of A. A function that is both one-one and onto is a bijection.
The composition of f : A → B and g : B → C is gof : A → C with (gof)(x) = g(f(x)). In general gof and fog are different. A function f is invertible if there is g with gof = identity on A and fog = identity on B; this happens exactly when f is a bijection, and then we write g = f⁻¹.
Key points
- f(x) = 2x + 3 from R to R is a bijection, with inverse f⁻¹(x) = (x − 3)/2.
- f(x) = x² from R to R is neither one-one (f(−1) = f(1)) nor onto (negative numbers are not images).
- Restricting the domain or codomain can change the type: x² from [0, ∞) to [0, ∞) is a bijection.
- Number of functions from a set of m elements to a set of n elements: n^m.
- Number of one-one functions from m elements to n elements (m ≤ n): n(n − 1)…(n − m + 1).
- Number of onto functions from a 3-element set to a 2-element set: 2³ − 2 = 6.
Exam tips
- To find an inverse, write y = f(x), solve for x in terms of y, then rename.
- Always state the domain and codomain before deciding one-one or onto.
Common mistakes
- Reading gof as "apply g first". The function written nearest to x acts first.
- Writing (gof)⁻¹ = g⁻¹of⁻¹; the correct rule is (gof)⁻¹ = f⁻¹og⁻¹.