topic badge

1.09 Operations and compositions of functions

Lesson

Four operations with functions

We can add, subtract, multiply, and divide functions just as we can add subtract, multiply, and divide real numbers.

Operations with functions are defined using special notation.

Operations with functions
Operation Definition
Sum $(f+g)(x)=f(x)+g(x)$(f+g)(x)=f(x)+g(x)
Difference $(f-g)(x)=f(x)-g(x)$(fg)(x)=f(x)g(x)
Product $(f\times g)(x)=f(x)\times g(x)$(f×g)(x)=f(x)×g(x)
Quotient $\left(\frac{f}{g}\right)(x)=\frac{f(x)}{g(x)}$(fg)(x)=f(x)g(x) where $g(x)\ne0$g(x)0

With each operation, the domain of the new function becomes the intersection or overlap of the domains of the original functions. The exception is that in the case of a quotient function, the new function's domain is further restricted to exclude values that make the denominator function zero. 

 

Worked examples

Question 1

Evaluate: Given $f(x)=\sqrt{x}$f(x)=x and $g(x)=x^2-9$g(x)=x29, find $(f-g)(x)$(fg)(x) and its domain.

Think: The domain of $f(x)$f(x) is $\left[0,\infty\right)$[0,) and the domain of $g(x)$g(x) is $\left(-\infty,\infty\right)$(,). Therefore, the intersection of these sets is $\left[0,\infty\right)$[0,).

Do: Substitute and simplify. Then state the domain.

$(f-g)(x)$(fg)(x) $=$= $f(x)-g(x)$f(x)g(x)

By definition

  $=$= $\sqrt{x}-(x^2-9)$x(x29)

Substitution

  $=$= $\sqrt{x}-x^2+9$xx2+9

Simplify

     

 

$D$D $:$: $\left[0,\infty\right)$[0,)

The intersection of the two domains

 

Question 2

Evaluate: Given $f(x)=x+3$f(x)=x+3 and $g(x)=x^2-9$g(x)=x29, find $\left(\frac{f}{g}\right)(x)=\frac{f(x)}{g(x)}$(fg)(x)=f(x)g(x) and its domain.

Think: The domain of $f(x)$f(x) both and $g(x)$g(x) is $\left(-\infty,\infty\right)$(,). However, since we are finding the quotient, we need to consider the case where $g(x)=0$g(x)=0 and remove it from the domain.

Do: Substitute and simplify. Then state the domain.

For the quotient we have:

$\left(\frac{f}{g}\right)(x)$(fg)(x) $=$= $\frac{f(x)}{g(x)}$f(x)g(x)

By definition

  $=$= $\frac{x+3}{x^2-9}$x+3x29

Substitution

  $=$= $\frac{x+3}{(x+3)(x-3)}$x+3(x+3)(x3)

Factor the denominator
Keep in mind: $x\ne3$x3, $-3$3

  $=$= $\frac{1}{(x-3)}$1(x3)

Cancel common factors

       
$D$D $:$: $\left(-\infty,3\right)\cup\left(-3,3\right)\cup\left(3,\infty\right)$(,3)(3,3)(3,)

The intersection of $D:f(x)$D:f(x), $D:g(x)$D:g(x), and where $g(x)\ne0$g(x)0.

 

Practice questions

Question 3

Given the following values:

$f\left(2\right)=4$f(2)=4, $f\left(7\right)=14$f(7)=14, $f\left(9\right)=18$f(9)=18, $f\left(8\right)=16$f(8)=16

$g\left(2\right)=8$g(2)=8, $g\left(7\right)=28$g(7)=28, $g\left(9\right)=36$g(9)=36, $g\left(8\right)=32$g(8)=32

  1. Find $\left(f+g\right)$(f+g)$\left(2\right)$(2)

Question 4

If $f(x)=3x-5$f(x)=3x5 and $g(x)=5x+7$g(x)=5x+7, find each of the following:

  1. $(f+g)(x)$(f+g)(x)

  2. $(f+g)$(f+g)$\left(4\right)$(4)

  3. $(f-g)(x)$(fg)(x)

  4. $(f-g)$(fg)$\left(10\right)$(10)

Question 5

Let $f\left(x\right)=\frac{9}{x-7}$f(x)=9x7 and $g\left(x\right)=\sqrt{x-2}$g(x)=x2.

  1. What is the domain of $f\left(x\right)$f(x)?

    $($($-\infty$$,$,$\infty$$)$)

    A

    $($($-\infty$$,$,$0$0$)$)$\cup$$($($0$0$,$,$\infty$$)$)

    B

    $($($-\infty$$,$,$9$9$)$)$\cup$$($($9$9$,$,$\infty$$)$)

    C

    $($($-\infty$$,$,$7$7$)$)$\cup$$($($7$7$,$,$\infty$$)$)

    D
  2. What is the domain of $g\left(x\right)$g(x)?

    $($($-\infty$$,$,$\infty$$)$)

    A

    $($($-\infty$$,$,$2$2$)$)$\cup$$($($2$2$,$,$\infty$$)$)

    B

    $[$[$2$2$,$,$\infty$$)$)

    C

    $($($2$2$,$,$\infty$$)$)

    D
  3. What is the domain of the function $(ff)(x)$(ff)(x)?

    $($($-\infty$$,$,$7$7$)$)$\cup$$($($7$7$,$,$\infty$$)$)

    A

    $[$[$2$2$,$,$\infty$$)$)

    B

    $($($-\infty$$,$,$9$9$)$)$\cup$$($($9$9$,$,$\infty$$)$)

    C

    $($($-\infty$$,$,$\infty$$)$)

    D
  4. Find the function $(ff)(x)$(ff)(x):

  5. What is the domain of the function $(f/g)(x)$(f/g)(x)?

    $($($-\infty$$,$,$7$7$)$)$\cup$$($($7$7$,$,$\infty$$)$)

    A

    $($($2$2$,$,$7$7$)$)$\cup$$($($7$7$,$,$\infty$$)$)

    B

    $($($2$2$,$,$\infty$$)$)

    C

    $[$[$2$2$,$,$7$7$)$)$\cup$$($($7$7$,$,$\infty$$)$)

    D
  6. Find the function $(f/g)(x)$(f/g)(x):

 

Composition of functions

A fifth way of combining functions exists that does not involve addition, subtraction, multiplication, or addition. Let's consider the meaning of a composition of functions through the following example.

Exploration

Consider the function given by $f\left(x\right)=2x+1$f(x)=2x+1. We understand that the function takes values of $x$x in the domain and maps them to values $y=2x+1$y=2x+1 in the range.

Let's suppose, however, that this is only the first part of a two-stage treatment of $x$x. We now take these function values and map them using another function, say $g\left(x\right)=x^2$g(x)=x2. This means that the $y$y values given by $\left(2x+1\right)$(2x+1) become the squared values $\left(2x+1\right)^2$(2x+1)2. The diagram below captures the idea.

The output, or function values $f\left(x\right)$f(x) have become the input, or $x$x values of $g\left(x\right)$g(x). We can describe the complete two-stage process by the expression $g\left(f\left(x\right)\right)$g(f(x)). This is sometimes written as $(g\circ f)(x)$(gf)(x) and is called the composition of functions.

Algebraically, we can write $g\left(f\left(x\right)\right)=g\left[2x+1\right]=\left(2x+1\right)^2$g(f(x))=g[2x+1]=(2x+1)2.

Note that if we reversed the order of the two-stage processing, we would, in this instance, develop a different composite function. Here,  $f\left(g\left(x\right)\right)=(f\circ g)(x)=f\left(x^2\right)=2\left(x^2\right)+1=2x^2+1$f(g(x))=(fg)(x)=f(x2)=2(x2)+1=2x2+1

Using our understanding of function notation and evaluation, we are able to create and simplify the equations of composite functions as well as evaluate substitutions into them.

Composition of functions

In a composition of functions, the inner function is evaluated first, followed by the outer function.

 

For example, in the composition $f(g(x))$f(g(x)) or $(f\circ g)(x)$(fg)(x), the function $g$g is applied first, followed by the function $f$f.

 

The domain of $(f\circ g)(x)$(fg)(x) is restricted to all $x$x-values in the domain of $g$g whose range values, $g(x)$g(x), are in the domain of $f$f.

 

Practice questions

Question 6

Consider the functions $f\left(x\right)=-2x-3$f(x)=2x3 and $g\left(x\right)=-2x-6$g(x)=2x6.

  1. Find $f\left(7\right)$f(7).

  2. Hence, or otherwise, evaluate $g\left(f\left(7\right)\right)$g(f(7)).

  3. Now find $g\left(7\right)$g(7).

  4. Hence, evaluate $f\left(g\left(7\right)\right)$f(g(7)).

  5. Is it true that $f\left(g\left(x\right)\right)=g\left(f\left(x\right)\right)$f(g(x))=g(f(x)) for all $x$x?

    Yes

    A

    No

    B

Question 7

Consider the functions $f\left(x\right)=4x-6$f(x)=4x6 and $g\left(x\right)=2x-1$g(x)=2x1.

  1. The function $r\left(x\right)$r(x) is defined as $r\left(x\right)=f\left(x^2\right)$r(x)=f(x2). Define $r\left(x\right)$r(x).

  2. Using the results of the previous part, define $q\left(x\right)$q(x), which is $g\left(f\left(x^2\right)\right)$g(f(x2)).

Question 8

Consider the functions $f\left(x\right)=x^2$f(x)=x2 and $g\left(x\right)=x+5$g(x)=x+5.

  1. If $y$y is defined as $y=f\left(g\left(x\right)\right)$y=f(g(x)), state the equation for $y$y.

  2. Graph the function $y$y.

    Loading Graph...

  3. What transformation of $f\left(x\right)$f(x) does $y$y correspond to?

    A vertical translation $5$5 units up.

    A

    A horizontal translation $5$5 units to the left.

    B

    A horizontal translation $5$5 units to the right.

    C

    A vertical translation $5$5 units down.

    D

Outcomes

MGSE9-12.F.BF.1

Write a function that describes a relationship between two quantities.

MGSE9-12.F.BF.1b

Combine standard function types using arithmetic operations in contextual situations (Adding, subtracting, and multiplying functions of different types).

MGSE9-12.F.BF.1c

Compose functions.

What is Mathspace

About Mathspace