If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Intro to combining functions

Become familiar with the idea that we can add, subtract, multiply, or divide two functions together to make a new function.
Just like we can add, subtract, multiply, and divide numbers, we can also add, subtract, multiply, and divide functions.

The sum of two functions

Part 1: Creating a new function by adding two functions

Let's add f(x)=x+1 and g(x)=2x together to make a new function.
f(x)+g(x)=(x+1)+(2x)=x+1+2x =3x+1
Let's call this new function h. So we have:
h(x)=f(x)+g(x)=3x+1

Part 2: Evaluating a combined function

We can also evaluate combined functions for particular inputs. Let's evaluate function h above for x=2. Below are two ways of doing this.
Method 1: Substitute x=2 into the combined function h.
h(x)=3x+1h(2)=3(2)+1=7
Method 2: Find f(2) and g(2) and add the results.
Since h(x)=f(x)+g(x), we can also find h(2) by finding f(2)+g(2).
First, let's find f(2):
f(x)=x+1f(2)=2+1=3
Now, let's find g(2):
g(x)=2xg(2)=22=4
So f(2)+g(2)=3+4=7.
Notice that substituting x=2 directly into function h and finding f(2)+g(2) gave us the same answer!

Now let's try some practice problems.

In problems 1 and 2, let f(x)=3x+2 and g(x)=x3.

Problem 1

Find f(x)+g(x).

Problem 2

Evaluate f(1)+g(1).
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3/5
  • a simplified improper fraction, like 7/4
  • a mixed number, like 1 3/4
  • an exact decimal, like 0.75
  • a multiple of pi, like 12 pi or 2/3 pi

A graphical connection

We can also understand what it means to add two functions by looking at graphs of the functions.
The graphs of y=m(x) and y=n(x) are shown below. In the first graph, notice that m(4)=2. In the second graph, notice that n(4)=5.
Let p(x)=m(x)+n(x). Now look at the graph of y=p(x). Notice that p(4)=2+5=7.
Challenge yourself to see that p(x)=m(x)+n(x) for every value of x by looking at the three graphs.

Let's practice.

Problem 3

The graphs of y=f(x) and y=g(x) are shown below.
Which is the best approximation of f(3)+g(3)?
Choose 1 answer:

Other ways to combine functions

All of the examples we've looked at so far create a new function by adding two functions, but you can also subtract, multiply, and divide two functions to make new functions!
For example, if f(x)=x+3 and g(x)=x2, then we can not only find the sum, but also ...
... the difference.
f(x)g(x)=(x+3)(x2)       Substitute.=x+3x+2             Distribute negative sign.=5                                  Combine like terms.
... the product.
f(x)g(x)=(x+3)(x2)            Substitute.=x22x+3x6        Distribute.=x2+x6                   Combine like terms.
... the quotient.
f(x)÷g(x)=f(x)g(x)=(x+3)(x2)                     Substitute.
In doing so, we have just created three new functions!

Challenge problem

p(t)=t+2
q(t)=t1
r(t)=t
Evaluate p(3)q(3)r(3)p(3).
  • Your answer should be
  • an integer, like 6
  • a simplified proper fraction, like 3/5
  • a simplified improper fraction, like 7/4
  • a mixed number, like 1 3/4
  • an exact decimal, like 0.75
  • a multiple of pi, like 12 pi or 2/3 pi

Want to join the conversation?

  • piceratops seed style avatar for user Junior Murray
    For Part 2 evaluating a combined function, method 1 where did the 2 come from
    (12 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user gabrielalopes2001.GL
    where does (-5) come in the last practice problem?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • starky seed style avatar for user Bailey Mitchell
      Hello Gabriela. Sorry for a late response. You probably understand the question by now, but I'm going to answer for you anyways.

      Basically, the (t) is like an x-value. If a number replaces the (t) then that is your x-value or your input. The letter on the left of the r(t) is your y-value.
      The 'r' in r(t) =..... is your y-value/output. Your 't' is your input/x-value.
      The 'p' in p(t) =..... is your y-value/output. Your 't' is your input/x-value.
      The 'q' in q(t) =..... is your y-value/output. Your 't' is your input/x-value.

      Of course just remember the positions and all because the letters and values changes. Lol.

      In this case p(3) = t + 2 is synonymous for p = 3 + 2. Remember p is synonymous for y. So in this equation it is p = 5.

      In q(3) = t - 1 Remember q is synonymous for y. It is same thing for THIS scenario. Plug in 3 into your x-value or 't'. They are the same thing. So it is q = 3 - 1. q =2

      In r(3) = t. Essentially whatever is r(t) = t. So whatever is t on the left is t on the right. Think of it like (t) =t = r . (x) = x = y. So all the values are 3.

      Now you just plug your answers in the coordinating spots.
      (*Note the last 5 in the equation below is POSITIVE. So is the 3 before. You are just subtracting the two values.)
      5 * 2 * 3 - 5
      10*3 -5......Multiply first 5*2
      30 - 5 ......Again, multiply 10*3
      25.....Then subtract 30 -5
      Your answer is 25.

      Hopefully you and others will understand.
      (15 votes)
  • leafers ultimate style avatar for user Christopher M
    Are these functions like functions in programing in which you can write the function beforehand and then call it whenever you want?
    (6 votes)
    Default Khan Academy avatar avatar for user
    • primosaur ultimate style avatar for user Sujal J.👍
      Basically yes ,they are. You can create them based on the information given to you and then you can add, subtract, multiply, and divide it. But you don't neccesarily "call" the function rather you input a given value into the function. So they are similar to each other, but not the exact same.
      (5 votes)
  • blobby green style avatar for user Amira
    How would I solve the equations
    Given f(x)=2x-3 and g(x)=0.5x+4 find f of g of x? [f of g](x)
    (3 votes)
    Default Khan Academy avatar avatar for user
  • mr pants pink style avatar for user dhebel612
    on part 2 evaluating a combined function do you always replace x wit 2 or not becuse i am confused on how they got 2
    (4 votes)
    Default Khan Academy avatar avatar for user
    • stelly blue style avatar for user Kim Seidel
      Unless the function has a restricted domain, you can evaluate the function (including the combined function) for any value of "x". So, you will not always replace x with 2. You can evaluate the new combined function h(x) for any value of x. Sal just happened to use x=2 to demonstrate the process.
      (5 votes)
  • blobby green style avatar for user desit241814
    Will this be on the SAT for March 9th, 2019?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • piceratops ultimate style avatar for user sf49
    I dont understand how the addition of the functions in problem 3 is 9 shouldnt it be 6?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user KevinHJoe
    for graphing f(3) + g(3)
    Why does f(3)=6 and g(3)=3?

    I see no indicator as to why f(3) should = 6
    (1 vote)
    Default Khan Academy avatar avatar for user
    • primosaur seed style avatar for user Ian Pulizzotto
      Graphically, for any function f(x), the statement that f(a)=b means that the graph of f(x) passes through the point (a,b).

      If you look at the graphs of f(x) and g(x), you will see that the graph of f(x) passes through the point (3,6) and the graph of g(x) passes though the point (3,3). This is why f(3)=6 and g(3)=3.
      (3 votes)
  • starky ultimate style avatar for user cpsnarayan
    I am a doing Advanced Algebra 1 in sixth grade. Does that mean i do algebra 2 in eighth grade?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • mr pants teal style avatar for user Lancelot.Quitian
    Im in Pre Cal right now...just looking back on Algebra II for the SAT...I got how the first 2 graphs worked...but to then add a parabola in the third question...just confuses me
    (1 vote)
    Default Khan Academy avatar avatar for user
    • piceratops ultimate style avatar for user V
      Same here, I'm looking back just to refresh my memory.
      It's simple, just find the x-coordinate that it asks you to, in this case a 3
      Then find where the line intercepts to find the y value, which is for the parabola part, a 6, use the y-coordinates and, in this case, add them together, poof, tell me what you get
      (2 votes)