Math2110-Bijective Basics
Math2110-Bijective Basics
of Proof
Let A and B be sets and f : A → B be some function. Note: If A = ∅, then f : ∅ → B must send nothing
nowhere. This is the only function with domain ∅ and codomain B. It is called the empty function. If B = ∅ and
A 6= ∅, then there is no function f : A → B (since the elements of A have nowhere to go). Thus a function whose
codomain is empty must also have an empty domain. Confusing but true. For what follows we will assume that A
and B are non-empty.
Recall that idA : A → A is the identity function where idA (x) = x for all x ∈ A. We say that f has a left
inverse g : B → A if g ◦ f = idA and f has a right inverse h : B → A if f ◦ h = idB . Since function composition is
associative, if f has a left inverse g and right inverse h, then g = g ◦ idB = g ◦ (f ◦ h) = (g ◦ f ) ◦ h = idA ◦ h = h.
Thus if f has both a left and right inverse, they must match. We call such a two-sided inverse (which we just proved
is unique) the inverse of f and denote it by f −1 .
ii) The function f has a right inverse if and only if it is surjective (i.e., onto).
iii) The function f has an inverse if and only if it is bijective (i.e., one-to-one and onto).
Proof:
i) Suppose f has a left inverse g : B → A and suppose that f (a) = f (b) for some a, b ∈ A. Then a = idA (a) =
(g ◦ f )(a) = g(f (a)) = g(f (b)) = (g ◦ f )(b) = idB (b) = b. Thus f is injective.
Now suppose f is injective. Pick some a0 ∈ A (A is non-empty so this is possible). Next, consider any element y
in the range of f . Then there is some x ∈ A such that f (x) = y (this is what it means to belong to the range of
f ). Notice that if f (x) = y = f (x0 ) then x = x0 since f is one-to-one. Therefore, for any element y in the range
of f , there is a unique element x ∈ A such that f (x) = y. Call this element x = f −1 (y). Now define g : B → A
as follows: −1
f (y) y is in the range of f
g(y) =
a0 y is not in the range of f
Finally, notice that g(f (x)) = f −1 (f (x)) = x where we use the first formula in g since f (x) belongs to the range
of f and f −1 (f (x)) = x by the way we defined what “f −1 (y)” means (it is the element that maps to y by f –
certainly x is the element that maps to f (x) by f ). Therefore, g ◦ f = idA so that g is a left inverse for f .
ii) Suppose that f has a right inverse h : B → A and suppose y ∈ B. Then h(y) ∈ A and f (h(y)) = idB (y) = y.
Therefore, y is in the range of f and thus f is surjective (i.e., onto).
Now suppose f is surjective. For each b ∈ B, we know that b is in the range of f (because it’s onto). Thus we
can choose some a ∈ A such that f (a) = b. We (arbitrarily) choose such an input for each b. Let’s name our
choice ab (so ab ∈ A and f (ab ) = b). Now define h : B → A as follows: h(b) = ab . Since we chose exactly one
ab for each b ∈ B, we have a well defined function h. Then (f ◦ h)(y) = f (h(y)) = f (ay ) = y = idB (y) for all
y ∈ B. Therefore, f ◦ h = idB and thus h is a right inverse of f .
iii) We now know that f has an inverse if and only if it has a left and right inverse if and only if it is both injective
and surjective if and only if it is bijective.
Without proof I will state the following (easy to prove) proposition:
Example: Consider the function f : {a, b, c} → {1, 2, 3, 4} where f (a) = 1, f (b) = 2, and f (c) = 2. Then
f ({a, c}) = {f (a), f (c)} = {1, 2}. Also, f ({a, b, c}) = {f (a), f (b), f (c)} = {1, 2}. This means that the range of
f is {1, 2}. We could also consider the other extreme case, f (∅) = ∅ (nothing maps to nothing). On the other
hand, f −1 (∅) = {x ∈ {a, b, c} | f (x) ∈ ∅} = ∅ (only nothing maps to nothing). Consider f −1 ({2, 3, 4}) = {x ∈
{a, b, c} | f (x) ∈ {2, 3, 4}} = {b, c} since f (b) = f (c) = 2 but a doesn’t map to 2, 3, or 4. Again notice that
f −1 ({2}) = {b, c} and that f −1 ({3, 4}) = ∅ (nothing maps to 3 or 4).
Staring at the above example, one might make the following observations:
Proposition: Let f : A → B.
i) The function f is injective (i.e., one-to-one) if and only if for every x ∈ B, f −1 ({x}) has at most one element.
ii) The function f is surjective (i.e., onto) if and only if for every x ∈ B, f −1 ({x}) is not empty.
In fact, there is a special name for the inverse image of a singleton set such as f −1 ({x}). We call this the fiber
over x. Thus onto functions are exactly those with non-empty fibers and one-to-one functions are exactly those
whose non-empty fibers have exactly one element. Having a non-empty fiber over x means that x is in the range of
our function.
One could ask if f : P(A) → P(B) and f −1 : P(B) → P(A) are inverses – the notation would seem to indicate that
they are. But, alas, in this case we are victims of bad notation. I will state without proof (although the proofs are
not difficult) the following result:
Proposition: Let f : A → B.
i) For any C ⊆ A, it is always the case that C ⊆ f −1 (f (C)).
ii) On the other hand, f −1 (f (C)) = C for all C ⊆ A if and only if f is injective (i.e., one-to-one).
Thus f −1 : P(B) → P(A) is a left inverse of f : P(A) → P(B) if and only if f : A → B has a left inverse (i.e.,
it is injective = one-to-one).
iii) For any D ⊆ B, it is always the case that f (f −1 (D)) ⊆ D.
iv) On the other hand, f (f −1 (D)) = D for all D ⊆ B if and only if f is surjective (i.e., onto).
Thus f −1 : P(B) → P(A) is a right inverse of f : P(A) → P(B) if and only if f : A → B has a right inverse
(i.e., it is surjective = onto).
v) f −1 : P(B) → P(A) is the inverse of f : P(A) → P(B) if and only if f has an inverse (i.e., it is bijective =
one-to-one and onto).