5.3 Composition of Functions

Objectives:

  • Define the composition of two functions

  • Connect our understanding of inverse functions with composition of functions

5.3.1 Connection with Inverse Functions

Example 5.3.1.

The function f : defined by f(x)=ex seems like it is an invertible function. Is the function injective? Is it surjective? Explain why.

Blank space for you to write your work.

Given our discoveries from the previous sections, it seems like we need functions to be injective and surjective in order for them to be invertible. Are we missing something? How should we reconcile this with the fact that the inverse of ex is widely considered to be ln(x)?

Blank space for you to write your work.

What we are describing here can be summarized by the following theorem:

Theorem 5.3.2.

Let f:XY and let f(X) be the range of f. Then the function g:Xf(X) given by g(x)=f(x) for all xX is a surjective function.

Blank space for you to write your work.

(Theorem 5.3.2, part 2) If f is also an injective function, then g is a bijective function.

Blank space for you to write your work.

We are now ready to begin proving that every bijective function has an inverse. However, we cannot go too quickly - while we have given some good descriptions of inverse functions, we have not defined an inverse function. We need a solid definition of an inverse function in order to ensure we have made a rigorous connection between bijective and inverse functions.

To do this, we formalize the notion we made in the previous section:

f(x)=yf1(y)=x.

If we know that f(x)=y, then we should be able to plug in f(x) for y in the equation f1(y)=x. This would yield that

f1(f(x))=x.

Similarly, if we know that f1(y)=x, then we should be able to plug in f1(y) for x in the equation f ( x ) = y and get that

f(f1(y))=y.

5.3.2 Defining Function Composition

What does it mean to take a function of a function? We have heard of this before: it is called the composition of functions.

Definition 5.3.3.

If f:XY and g:YZ are functions, we define gf:XZ (LaTeX \circ) via (gf)(x)=g(f(x)). The function gf is called the composition of f and g.

Example 5.3.4.

For the functions f: and g: defined below, determine formulas for the requested compositions of functions.

  1. (a)

    f(x)=x2 and g(x)=3x5; fg and gf

    Blank space for you to write your work.
  2. (b)

    f(x)={5x+7x<02x+1x0 and g(x)=7x11; gf and f g

    Blank space for you to write your work.

Note that the sets for domains and codomains of these functions are not all assumed to be the same. This is crucial, as we saw in the ex example: a function may not be bijective if we are not careful about our domains and codomains.

However, the codomain of the inside function f must line up with the domain of the outside function g. We can see why: the outputs of f becomes the inputs of g when composing g with f.

Example 5.3.5.

Let X={1,2,3,4} and define f:XX and g:XX via

f={(1,1),(2,3),(3,3),(4,4)}andg={(1,1),(2,2),(3,1),(4,1)}.

Draw a function diagram for each of the functions below and identify the range.

(a) gf XXX

(b) fg XXX

Example 5.3.6.

Give examples of functions f: and g: that satisfy the given conditions.

  1. (a)

    f is surjective, but gf is not surjective.

    Blank space for you to write your work.
  2. (b)

    g is surjective, but gf is not surjective.

    Blank space for you to write your work.
  3. (c)

    f is injective, but gf is not injective.

    Blank space for you to write your work.
  4. (d)

    g is injective, but gf is not injective.

    Blank space for you to write your work.

5.3.3 Proving with Compositions

Now that we have explored compositions with injective and surjective functions, we are ready to prove statements involving these two concepts.

Theorem 5.3.7.

If f:XY and g:YZ are both surjective functions, then gf is also surjective.

Blank space for you to write your work.

Theorem 5.3.8.

If f:XY and g:YZ are both injective functions, then gf is also injective.

Blank space for you to write your work.

For a set S, the identity function IS is defined as the function ιS:SS where, for xS, ιS(x)=x. That is, this function returns the input value as the output value with no changes.

Example 5.3.9.

Let f:XY be a function. Prove that fιX=f.

Blank space for you to write your work.

Example 5.3.10.

Prove that ιYf=f.

Blank space for you to write your work.