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:X→Y and let f⁢(X) be the range of f. Then the function g:X→f⁢(X) given by g⁢(x)=f⁢(x) for all x∈X 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)=y⇔f−1⁢(y)=x.

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

f−1⁢(f⁢(x))=x.

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

f⁢(f−1⁢(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:X→Y and g:Y→Z are functions, we define g∘f:X→Z (LaTeX \circ) via (g∘f)⁢(x)=g⁢(f⁢(x)). The function g∘f 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)=3⁢x−5; f∘g and g∘f

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

    f⁢(x)={5⁢x+7x<02⁢x+1x≥0 and g⁢(x)=7⁢x−11; g∘f 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:X→X and g:X→X 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) g∘f XXX

(b) f∘g XXX

Example 5.3.6.

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

  1. (a)

    f is surjective, but g∘f is not surjective.

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

    g is surjective, but g∘f is not surjective.

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

    f is injective, but g∘f is not injective.

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

    g is injective, but g∘f 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:X→Y and g:Y→Z are both surjective functions, then g∘f is also surjective.

Blank space for you to write your work.

Theorem 5.3.8.

If f:X→Y and g:Y→Z are both injective functions, then g∘f 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:S→S where, for x∈S, ιS⁢(x)=x. That is, this function returns the input value as the output value with no changes.

Example 5.3.9.

Let f:X→Y be a function. Prove that f∘ιX=f.

Blank space for you to write your work.

Example 5.3.10.

Prove that ιY∘f=f.

Blank space for you to write your work.