Exercise 2.5

In general, let us denote the identity function for a set C by iC. That is, define iC : C C to be the function given by the rule iC(x) = x for all x C. Given f : A B, we say that g : B A is a left inverse for f if g f = iA; and we say that h : B A is a right inverse for f if f h = iB.

(a)
Show that if f has a left inverse, f is injective; and if f has a right inverse, f is surjective.
(b)
Give an example of a function that has a left inverse but no right inverse.
(c)
Give an example of a function that has a right inverse but no left inverse.
(d)
Can a function have more than one left inverse? More than one right inverse?
(e)
Show that if f has both a left inverse g and a right inverse h, then f is bijective and g = h = f1.

Answers

In what follows we suppose that f : A B.

(a)

Proof. First, suppose that f has a left inverse g : B A so that g f = iA. Consider any x,y A where f(x) = f(y). Then we have

x = iA(x) = (g f)(x) = g(f(x)) = g(f(y)) = (g f)(y) = iA(y) = y,

which shows that f is injective by definition.

Now suppose that f has a right inverse h : B A so that f h = iB. Consider any y B so that

y = iB(y) = (f h)(y) = f(h(y)).

Then x = h(y) is an element of A such that f(x) = y, which shows that f must be surjective since y was arbitrary. □

(b)
Consider the sets A = {1,2} B = {a,b,c}

and the function f = {(1,a),(2,b)}. Define the function g : B A by g = {(a,1),(b,2),(c,2)}. It is easy to see that this is a left inverse of f since we have

(g f)(1) = g(f(1)) = g(a) = 1 (g f)(2) = g(f(2)) = g(b) = 2

so that g f = iA.

Also, note that clearly, f is not surjective since there is no element of A that maps to c B. This suffices to show that f cannot have a right inverse since, if it did, then it would have to be surjective by part (a).

(c)
Now define the sets A = {1,2,3} B = {a,b}

and the function f = {(1,a),(2,b),(3,a)}. Define the function h : B A by h = {(a,1),(b,2)}. Then we have

(f h)(a) = f(h(a)) = f(1) = a (f h)(b) = f(h(b)) = f(2) = b

so that clearly f h = iB, and hence h is a right inverse of f.

Note, however, that f is not injective since f(1) = a = f(3). This suffices to show that f cannot have a left inverse since, if it did, it would be injective by part (a).

(d)
We claim that a function can have more than one right or left inverse.

Proof. To show that a function can have more than one left inverse consider the example constructed in part (b). Recall that this consists of the sets

A = {1,2} B = {a,b,c}

and the function f = {(1,a),(2,b)}. It was shown there that the function g1 = {(a,1),(b,2),(c,2)} is a left inverse. Let g2 = {(a,1),(b,2),(c,1)} so that clearly g1g2 since g1(c) = 21 = g2(c). It is trivial to show that g2 is also a left inverse of f, which shows that more than one left inverse exists for this f.

To show that a function can have more than one right inverse, consider the example in part (c), which is the sets

A = {1,2,3} B = {a,b}

and the function f = {(1,a),(2,b),(3,a)}. It was shown there that the function h1 = {(a,1),(b,2)} is a right inverse. Let h2 = {(a,3),(b,2)} so that clearly h1h2 since h1(a) = 13 = h2(a). However, it is trivial to show that h2 is also a right inverse of f, from which the desired result follows. □

(e)
Note that what follows proves Lemma 2.1 in the text, which is not proven there.

Proof. Suppose that f has left inverse g and right inverse h. Then f must be both injective (since it has a left inverse) and surjective (since it has a right inverse) so that it is bijective by definition. Then of course the function f1 : B A exists. Consider any y B and set x = f1(y) so that y = f(x). Then we have that

g(y) = g(f(x)) = (g f)(x) = iA(x) = x

since g is a left inverse of f. We also have

f(h(y)) = (f h)(y) = iB(y) = y

so that

h(y) = f1(f(h(y)) = f1(y) = x.

This shows that x = f1(y) = g(y) = h(y), which in turn shows that f1 = g = h as desired since y was arbitrary. □

User profile picture
2019-12-01 00:00
Comments