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.

## Algebra (all content)

### Course: Algebra (all content)>Unit 7

Lesson 14: Combining functions

# 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, left parenthesis, x, right parenthesis, equals, x, plus, 1 and g, left parenthesis, x, right parenthesis, equals, 2, x together to make a new function.
\begin{aligned} {f(x)}+{g(x)} &= ({x+1})+({2x}) \\\\ &= x+1+2x \\\\\ &=3x+1 \end{aligned}
Let's call this new function h. So we have:
h, left parenthesis, x, right parenthesis, equals, f, left parenthesis, x, right parenthesis, plus, g, left parenthesis, x, right parenthesis, equals, 3, x, plus, 1

## Part 2: Evaluating a combined function

We can also evaluate combined functions for particular inputs. Let's evaluate function h above for x, equals, 2. Below are two ways of doing this.
Method 1: Substitute x, equals, 2 into the combined function h.
\begin{aligned}h(x)&=3x+1\\\\ h(2)&=3(2)+1\\\\ &=\greenD{7} \end{aligned}
Method 2: Find f, left parenthesis, 2, right parenthesis and g, left parenthesis, 2, right parenthesis and add the results.
Since h, left parenthesis, x, right parenthesis, equals, f, left parenthesis, x, right parenthesis, plus, g, left parenthesis, x, right parenthesis, we can also find h, left parenthesis, 2, right parenthesis by finding f, left parenthesis, 2, right parenthesis, plus, g, left parenthesis, 2, right parenthesis.
First, let's find f, left parenthesis, 2, right parenthesis:
\begin{aligned}f(x)&= {x + 1}\\\\ f(2)&=2+1 \\\\ &=3\end{aligned}
Now, let's find g, left parenthesis, 2, right parenthesis:
\begin{aligned}g(x)&={2x}\\\\ g(2)&=2\cdot 2 \\\\ &=4\end{aligned}
So f, left parenthesis, 2, right parenthesis, plus, g, left parenthesis, 2, right parenthesis, equals, 3, plus, 4, equals, start color #1fab54, 7, end color #1fab54.
Notice that substituting x, equals, 2 directly into function h and finding f, left parenthesis, 2, right parenthesis, plus, g, left parenthesis, 2, right parenthesis gave us the same answer!

# Now let's try some practice problems.

In problems 1 and 2, let f, left parenthesis, x, right parenthesis, equals, 3, x, plus, 2 and g, left parenthesis, x, right parenthesis, equals, x, minus, 3.

#### Problem 1

Find f, left parenthesis, x, right parenthesis, plus, g, left parenthesis, x, right parenthesis.

#### Problem 2

Evaluate f, left parenthesis, minus, 1, right parenthesis, plus, g, left parenthesis, minus, 1, right parenthesis.

# 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, equals, m, left parenthesis, x, right parenthesis and y, equals, n, left parenthesis, x, right parenthesis are shown below. In the first graph, notice that m, left parenthesis, 4, right parenthesis, equals, 2. In the second graph, notice that n, left parenthesis, 4, right parenthesis, equals, 5.
Let p, left parenthesis, x, right parenthesis, equals, m, left parenthesis, x, right parenthesis, plus, n, left parenthesis, x, right parenthesis. Now look at the graph of y, equals, p, left parenthesis, x, right parenthesis. Notice that p, left parenthesis, 4, right parenthesis, equals, start color #11accd, 2, end color #11accd, plus, start color #ca337c, 5, end color #ca337c, equals, start color #7854ab, 7, end color #7854ab.
Challenge yourself to see that p, left parenthesis, x, right parenthesis, equals, m, left parenthesis, x, right parenthesis, plus, n, left parenthesis, x, right parenthesis for every value of x by looking at the three graphs.

## Let's practice.

#### Problem 3

The graphs of y, equals, f, left parenthesis, x, right parenthesis and y, equals, g, left parenthesis, x, right parenthesis are shown below.
Which is the best approximation of f, left parenthesis, 3, right parenthesis, plus, g, left parenthesis, 3, right parenthesis?

# 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, left parenthesis, x, right parenthesis, equals, x, plus, 3 and g, left parenthesis, x, right parenthesis, equals, x, minus, 2, then we can not only find the sum, but also ...
... the difference.
\begin{aligned}f(x)-g(x)&=(x+3)-(x-2)~~~~~~~\small{\gray{\text{Substitute.}}}\\\\ &=x+3-x+2~~~~~~~~~~~~~\small{\gray{\text{Distribute negative sign.}}}\\\\ &=5~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\small{\gray{\text{Combine like terms.}}}\end{aligned}
... the product.
\begin{aligned}f(x)\cdot g(x)&=(x+3)(x-2)~~~~~~~~~~~~\small{\gray{\text{Substitute.}}}\\\\ &=x^2-2x+3x-6~~~~~~~~\small{\gray{\text{Distribute.}}}\\\\ &=x^2+x-6~~~~~~~~~~~~~~~~~~~\small{\gray{\text{Combine like terms.}}}\end{aligned}
... the quotient.
\begin{aligned}f(x)\div g(x)&=\dfrac{f(x)}{g(x)} \\\\ &=\dfrac{(x+3)}{(x-2)}~~~~~~~~~~~~~~~~~~~~~\small{\gray{\text{Substitute.}}} \end{aligned}
In doing so, we have just created three new functions!

# Challenge problem

p, left parenthesis, t, right parenthesis, equals, t, plus, 2
q, left parenthesis, t, right parenthesis, equals, t, minus, 1
r, left parenthesis, t, right parenthesis, equals, t
Evaluate p, left parenthesis, 3, right parenthesis, dot, q, left parenthesis, 3, right parenthesis, dot, r, left parenthesis, 3, right parenthesis, minus, p, left parenthesis, 3, right parenthesis.

## Want to join the conversation?

• For Part 2 evaluating a combined function, method 1 where did the 2 come from
• We are substituting x=2 into the function.
• where does (-5) come in the last practice problem?
• 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.

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.

(*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

Hopefully you and others will understand.
• Are these functions like functions in programing in which you can write the function beforehand and then call it whenever you want?
• 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.
• 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)
• In order to find [f of g](x), you need to substitute function g(x) into function f(x) (replace the x in f(x) with function g(x)).

[f of g](x) = 2(0.5x+4)-3 = x+8-3 = x+5

Therefore, [f of g](x) = x+5
• 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
• 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.
• Will this be on the SAT for March 9th, 2019?
• Function combination may be on the SAT. It depends on the specific SAT given, and we have no way of finding out if it's on the test, but you should prepare for it nonetheless.
• I dont understand how the addition of the functions in problem 3 is 9 shouldnt it be 6?
(1 vote)
• 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)
• 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.