The composition g ∘ f applies f first and then g. A function has an inverse, which sends each output back to its input, if and only if it is a bijection.
Let f be a function from X to Y, and g a function from Y to Z. Each output f(x) is an element of Y, so g can be applied to it. The result is a function from X to Z, called the composition of g and f, written g ∘ f:
(g ∘ f)(x) = g(f(x))
f is applied first, then g. In the notation g ∘ f, the function written next to x acts first. Reading g ∘ f as “g, then f” is a common mistake.
For g ∘ f to be defined, every output of f must be in the domain of g.
f first, then g. The composition g ∘ f takes x to f(x), and then f(x) to g(f(x)).
Let f(x) = x + 1 and g(x) = x², both on the real numbers. Find (g ∘ f)(3) and (f ∘ g)(3).
(g ∘ f)(3): f first. f(3) = 4. Then g(4) = 16.
(f ∘ g)(3): g first. g(3) = 9. Then f(9) = 10.
16 ≠ 10. Composition is not commutative: g ∘ f and f ∘ g are usually different functions. In general, (g ∘ f)(x) = (x + 1)² while (f ∘ g)(x) = x² + 1.
A function f from X to Y is invertible if there is a function g from Y to X such that g(f(x)) = x for every x in X, and f(g(y)) = y for every y in Y. Then g is the inverse of f, written f⁻¹.
So if f(x) = y, then f⁻¹(y) = x. Applying f and then f⁻¹ returns every input to itself.
f(x) = 2x on the real numbers has inverse f⁻¹(y) = y/2. f(x) = x + 3 has inverse f⁻¹(y) = y − 3. The notation f⁻¹ does not mean 1/f.
The main theorem: a function is invertible if and only if it is a bijection, that is, both one-one and onto.
One-one is needed. If f(x₁) = f(x₂) = y with x₁ ≠ x₂, then f⁻¹(y) would have to equal both x₁ and x₂. A function assigns exactly one output to each input, so no inverse function exists.
Onto is needed. If some y in Y is not an output of f, there is no x with f(x) = y, so f⁻¹(y) has no value. The inverse would not be defined on all of Y.
If f is a bijection, each y in Y is the output for exactly one x. Defining f⁻¹(y) as that x gives a function from Y to X that reverses f.
Why does f(x) = x² on the real numbers have no inverse?
f(2) = 4 and f(−2) = 4. An inverse would have to give f⁻¹(4) = 2 and also f⁻¹(4) = −2. A function cannot have two values at one input, so there is no inverse. This is the failure of one-one.
There is also a failure of onto: no real x gives f(x) = −4, so f⁻¹(−4) could not be defined.
If the domain and codomain are both restricted to the non-negative real numbers, f(x) = x² becomes a bijection. Its inverse is then f⁻¹(y) = √y.
A relation on a set is a set of ordered pairs. It can be reflexive, symmetric and transitive; with all three it is an equivalence relation, which partitions the set into classes. A function assigns one output to each input. It can be one-one, onto, or both; a function that is both is a bijection. Composition applies one function after another, and only bijections have inverses.
1The composition g ∘ f is defined by…
2In g ∘ f, which function is applied first?
3For f(x) = x + 1 and g(x) = x², (g ∘ f)(3) equals…
4The function that reverses an invertible function f is its ____, written f⁻¹.
5A function is invertible if and only if it is…
6Why can a function that is not one-one not have an inverse?
7Is composition of functions commutative in general?
That completes the unit on relations and functions.