Writing Projects
2.3 Functions
2.3.3 Inverse Functions and Compositions of Functions
a b c
1 2 3 4
a b c d
1 2 3
a b c d
1 2 3 4
a b c d
1 2 3 4
a b c
1 2 3 4 One-to-one,
not onto
Onto, not one-to-one
One-to-one and onto
Neither one-to-one nor onto
Not a function
(a) (b) (c) (d) (e)
FIGURE 5 Examples of different types of correspondences.
Suppose thatf is a function from a setAto itself. IfAis finite, thenf is one-to-one if and only if it is onto. (This follows from the result in Exercise 74.) This is not necessarily the case ifAis infinite (as will be shown in Section 2.5).
EXAMPLE 18 LetAbe a set. Theidentity functiononAis the function𝜄A:A→A, where 𝜄A(x)=x
for allx∈A. In other words, the identity function𝜄Ais the function that assigns each element to itself. The function𝜄Ais one-to-one and onto, so it is a bijection. (Note that𝜄 is the Greek
letter iota.)
◂
For future reference, we summarize what needs be to shown to establish whether a function is one-to-one and whether it is onto. It is instructive to review Examples 8–17 in light of this summary.
Suppose thatf :A→B.
To show that f is injective Show that iff(x)=f(y) for arbitraryx, y∈A, thenx=y.
To show that f is not injective Find particular elementsx, y∈Asuch thatx≠yandf(x)= f(y).
To show that f is surjective Consider an arbitrary elementy∈Band find an elementx∈A such thatf(x)=y.
To show that f is not surjective Find a particulary∈Bsuch thatf(x)≠yfor allx∈A.
f
A B
a=f–1(b) f(a) b=f(a) f–1(b)
f–1
FIGURE 6 The functionf−1is the inverse of functionf.
Remark:Be sure not to confuse the functionf−1 with the function 1∕f, which is the function that assigns to eachxin the domain the value 1∕f(x). Notice that the latter makes sense only whenf(x) is a nonzero real number.
Figure 6 illustrates the concept of an inverse function.
If a functionf is not a one-to-one correspondence, we cannot define an inverse function of f. Whenf is not a one-to-one correspondence, either it is not one-to-one or it is not onto. Iff is not one-to-one, some elementbin the codomain is the image of more than one element in the domain. Iff is not onto, for some elementbin the codomain, no elementain the domain exists for whichf(a)=b. Consequently, iff is not a one-to-one correspondence, we cannot assign to each elementbin the codomain a unique elementain the domain such thatf(a)=b(because for somebthere is either more than one suchaor no sucha).
A one-to-one correspondence is calledinvertiblebecause we can define an inverse of this function. A function is not invertible if it is not a one-to-one correspondence, because the inverse of such a function does not exist.
EXAMPLE 19 Letf be the function from{a, b, c}to{1,2,3}such thatf(a)=2,f(b)=3, andf(c)=1. Isf invertible, and if it is, what is its inverse?
Solution: The function f is invertible because it is a one-to-one correspondence. The in- verse functionf−1 reverses the correspondence given byf, sof−1(1)=c,f−1(2)=a, andf−1
(3)=b.
◂
EXAMPLE 20 Letf :Z→Zbe such thatf(x)=x+1. Isf invertible, and if it is, what is its inverse?
Solution:The functionf has an inverse because it is a one-to-one correspondence, as follows from Examples 10 and 15. To reverse the correspondence, suppose thatyis the image ofx, so thaty=x+1. Thenx=y−1. This means thaty−1 is the unique element ofZthat is sent to
ybyf. Consequently,f−1(y)=y−1.
◂
EXAMPLE 21 Letf be the function fromRtoRwithf(x)=x2. Isf invertible?
Solution:Becausef(−2)=f(2)=4,f is not one-to-one. If an inverse function were defined, it would have to assign two elements to 4. Hence,f is not invertible. (Note we can also show that
f is not invertible because it is not onto.)
◂
Sometimes we can restrict the domain or the codomain of a function, or both, to obtain an invertible function, as Example 22 illustrates.
EXAMPLE 22 Show that if we restrict the functionf(x)=x2 in Example 21 to a function from the set of all nonnegative real numbers to the set of all nonnegative real numbers, thenf is invertible.
Solution:The functionf(x)=x2 from the set of nonnegative real numbers to the set of non- negative real numbers is one-to-one. To see this, note that if f(x)=f(y), then x2 =y2, so x2−y2=(x+y)(x−y)=0. This means thatx+y=0 orx−y=0, sox= −yorx=y. Be- cause both x and y are nonnegative, we must have x=y. So, this function is one-to-one.
Furthermore,f(x)=x2is onto when the codomain is the set of all nonnegative real numbers, be- cause each nonnegative real number has a square root. That is, ifyis a nonnegative real number, there exists a nonnegative real numberxsuch thatx=√
y, which means thatx2 =y. Because the functionf(x)=x2 from the set of nonnegative real numbers to the set of nonnegative real numbers is one-to-one and onto, it is invertible. Its inverse is given by the rulef−1(y)=√
y.
◂
Definition 10
Letgbe a function from the setAto the setBand letf be a function from the setBto the setC. Thecompositionof the functionsf andg, denoted for alla∈Abyf◦g, is the function fromAtoCdefined by(f◦g)(a)=f(g(a)).
In other words,f◦gis the function that assigns to the elementaofAthe element assigned by f tog(a). The domain off◦gis the domain ofg. The range off◦gis the image of the range ofgwith respect to the functionf. That is, to find (f◦g)(a) we first apply the functiongtoa to obtaing(a) and then we apply the functionf to the resultg(a) to obtain (f◦g)(a)=f(g(a)).
Note that the compositionf◦gcannot be defined unless the range ofgis a subset of the domain off. In Figure 7 the composition of functions is shown.
EXAMPLE 23 Letgbe the function from the set{a, b, c}to itself such thatg(a)=b,g(b)=c, andg(c)=a.
Letfbe the function from the set{a, b, c}to the set{1,2,3}such thatf(a)=3,f(b)=2, and f(c)=1. What is the composition off andg, and what is the composition ofgandf?
Solution: The composition f◦g is defined by (f◦g)(a)=f(g(a))=f(b)=2, (f◦g) (b)= f(g(b))=f(c)=1, and (f◦g)(c)=f(g(c))=f(a)=3.
Note that g◦f is not defined, because the range of f is not a subset of the domain
ofg.
◂
A B
a g(a)
g(a)
C f(g(a)) f(g(a))
g f
(f g)(a)
f g
FIGURE 7 The composition of the functionsf andg.
EXAMPLE 24 Let f and g be the functions from the set of integers to the set of integers defined by f(x)=2x+3 andg(x)=3x+2. What is the composition off andg? What is the composition ofgandf?
Solution:Both the compositionsf◦gandg◦f are defined. Moreover, (f◦g)(x)=f(g(x))=f(3x+2)=2(3x+2)+3=6x+7 and
(g◦f)(x)=g(f(x))=g(2x+3)=3(2x+3)+2=6x+11.
◂
Remark:Note that even thoughf◦gandg◦f are defined for the functionsfandgin Example 24, f◦gandg◦fare not equal. In other words, the commutative law does not hold for the composition of functions.
EXAMPLE 25 Letf andgbe the functions defined byf :R→R+∪ {0}withf(x)=x2andg:R+∪ {0}→R withg(x)=√
x(where√
xis the nonnegative square root ofx). What is the function (f◦g)(x)?
Solution:The domain of (f◦g)(x)=f(g(x)) is the domain ofg, which isR+∪ {0}, the set of non- negative real numbers. Ifxis a nonnegative real number, we have (f◦g)(x)=f(g(x))=f(√
x)= (√x
)2
=x. The range off◦gis the image of the range ofgwith respect to the functionf. This is the setR+∪ {0}, the set of nonnegative real numbers. Summarizing,f :R+∪ {0}→R+∪ {0}
andf(g(x))=xfor allx.
◂
When the composition of a function and its inverse is formed, in either order, an identity function is obtained. To see this, suppose thatf is a one-to-one correspondence from the setA to the setB. Then the inverse functionf−1 exists and is a one-to-one correspondence fromB toA. The inverse function reverses the correspondence of the original function, sof−1(b)=a whenf(a)=b, andf(a)=bwhenf−1(b)=a. Hence,
(f−1◦f)(a)=f−1(f(a))=f−1(b)=a, and
(f◦f−1)(b)=f(f−1(b))=f(a)=b.
Consequentlyf−1◦f =𝜄Aandf◦f−1 =𝜄B, where𝜄Aand𝜄Bare the identity functions on the sets AandB, respectively. That is, (f−1)−1=f.