7 MAT223_Handout_Inverses Module 12
7 MAT223_Handout_Inverses Module 12
Winter 2023
It will be very useful for the discussion of inverses to break down the condition that an
assignment A → B is a function as follows. We say that an assignment f : A → B of
elements of B to elements of A is a function if
(i) To every a ∈ A, at least one b ∈ B is assigned.
(ii) To every a ∈ A, at most one b ∈ B is assigned.
1
(Winter 2023) MAT 223 Handout: Inverses
In terms of arrow diagrams, condition (i) says that every a ∈ A has at least one arrow
leaving it, and condition (ii) says that every a ∈ A has at most one arrow leaving it.
In terms of arrow diagrams, the process of inverting a function can be described as
follows. Suppose f : A → B is a function. If we reverse all of the arrows in its arrow
diagram, will the result be a function g : B → A?
In the picture below, all three diagrams represent a function A → B. However, after
reversing all the arrows only the third diagram will describe a function B → A. The
first diagram will have the top element of B with too many arrows out of it. The second
diagram will have the bottom element of B with no arrows out of it.
More formally, we know that if f : A → B is a function, then after reversing the arrows
g : B → A will be a function if and only if it satisfies conditions (i) and (ii) below. That
is,
(i) Every b ∈ B has at most one a ∈ A assigned to it.
(ii) Every b ∈ B has at least one a ∈ A assigned to it.
In terms of f (i.e., before reversing the arrows), condition (i) means that for each b ∈ B
there is at most one arrow into it. In other words, if a1 , a2 are two different elements
of A, then they connect to two different elements of B, that is, f (a1 ) 6= f (a2 ). Such a
function is called injective.
Injectivity. A function f : A → B is called injective (or one-to-one, abbreviated
1-1 ) if two distinct inputs produce two distinct outputs.
Formally, for all a1 6= a2 in A, we have f (a1 ) 6= f (a2 ). Equivalently (taking the contra-
positive), f (a1 ) = f (a2 ) =⇒ a1 = a2 .
Condition (ii) means that for each b ∈ B there is some arrow into it. In other words, for
any b ∈ B there is some a ∈ A with f (a) = b. Such a function is called surjective.
Surjectivity. A function f : A → B is called surjective (or onto) if for every b ∈ B
there is some a ∈ A with f (a) = b.
More verbosely, instead of saying that f : A → B is “onto”, one would say that it
is “onto B”. This description evokes the idea that f completely “covers” B in the
sense that every element of B has some arrow into it. The prefix “sur-” in the word
2
(Winter 2023) MAT 223 Handout: Inverses
“surjective” means “after, on, over, more, extra”, and can be found in words such as the
noun “surplus” (meaning “excess”) or the verb “survey” (literally meaning “overview”).
In contrast, the prefix “in-” in the word “injective” has the familiar meaning of “into”
and is supposed to evoke the idea of producing a “perfect copy” (i.e., with no loss of
information) of A inside of B.
Bijection. A function f : A → B is called bijective if it is both injective and surjective
(i.e., one-to-one and onto).
Through our arrow-diagram argument we have arrived to the following tentative con-
clusion.
Theorem. A function f : A → B is invertible if and only if it is bijective.
Invertibility
There is one glaring problem with our theorem from the previous section: we don’t
know what “invertible” means! More precisely, we have an informal notion of “inverting
arrows” which we would like to somehow formalize mathematically.
Suppose first that f : A → B is invertible, with inverse g : B → A. Let us follow the
arrows of f : A → B by starting with some element a ∈ A and ending up at f (a). If
we reverse the arrow and follow it back from f (a) to g(f (a)), then we end up where we
started g(f (a)) = a. To repeat, if we first follow the original arrow, and then the reverse
arrow we end up in the same place. We have seen in Module 10 that the idea of first
following one arrow and then another is formalized by the notion function composition.
In other words, we are describing the fact that g ◦ f = idA , where idA : A → A is the
identity function, sending every element to itself idA (a) = a.
Can we use what we discovered in the previous paragraph to formalize the notion of
invertibility (“reversing arrows”)? Since we are trying to define the concept of invert-
ibility, we shouldn’t assume that f is invertible with an inverse g : B → A. However,
we can try to turn the process on its head. Our first draft for defining invertibility is
therefore to ask for the existence of a function g : B → A such that g ◦ f = idA .
Did we succeed? Is the diagram of g : B → A exactly the same as the diagram of
f : A → B with all arrows reversed? Let’s examine the situation more closely. If we
have an arrow starting at a ∈ A and ending at some b ∈ B we know that f (a) = b.
Therefore
g(b) = g(f (a)) = idA (a) = a
so that we have an arrow starting at b and ending at a; which is exactly what reversing
should accomplish. Thus, we can be sure that the diagram of g : B → A at least
contains the reversed diagram f : A → B. However, it is entirely possible that the
diagram g : B → A has more arrows than necessary!
Example. Let A = {1, 2} and B = {3, 4, 5}. Let f : A → B be the function given by
f (1) = 3 and f (2) = 4. Let g : B → A be the function given by g(3) = 1, g(4) = 2, and
g(5) = 2. Then you should verify that f ◦ g = idA but the diagram for g is not the reverse
of the diagram for f .
3
(Winter 2023) MAT 223 Handout: Inverses
Exercises 1 and 2 together completely recover the theorem from the previous section.
Theorem. A function f : A → B is invertible if and only if it is bijective.
Concluding remarks. We could have just as well used bijectivity as our definition
of invertibility. Exercises 1 and 2 show that the two definitions are equivalent. The
bijectivity definition has the advantage that it is completely “internal”, it gives criteria
for invertibility that only depends on the function f in question. The two-sided inverse
description has the advantage that it is completely “relational”, it describes what invert-
ibility means fully in terms of how f relates to other functions; in fact, we don’t even need
to know what the function f does exactly. The reason that such a perspective is some-
times advantageous is that it allows us to abstract away the details of the function itself
and only look at the algebraic relations of such functions. For example, this perspective
leads one to discover that the collection of bijections {1, 2, . . . , n} → {1, 2, . . . , n} and
how they behave under compositions, forms a mathematical structure known as a group
(called the symmetric group), which leads to further analysis of the structure of these
functions. This process is similar to the process of defining a linear transformation (or
a linear subspace) abstractly, and analyzing general properties of such transformations,
without necessarily considering any particular transformation. Groups are explored in
MAT 301 and MAT 347.
4
(Winter 2023) MAT 223 Handout: Inverses
Answers to Exercises
1. In one direction, suppose f : A → B is injective. Let∗ a ∈ A be an arbitrary
element and define g : B → A as follows:
(
x if f (x) = b;
g(b) =
a if for all x ∈ A, f (x) 6= b.
∗
There is a technicality here in that we’re assuming A is not empty. If you are familiar with the formal
definition of functions you should prove to yourself that the result of the exercise also extends to the
case f : ∅ → B.
†
There is a really technical technicality here. The possibility of arbitrarily choosing is formalized in
modern mathematics as the “axiom of choice”.