Composition of Functions: Definition & Examples

An error occurred trying to load this video.

Try refreshing the page, or contact customer support.

Coming up next: Types of Angles: Vertical, Corresponding, Alternate Interior & Others

You're on a roll. Keep up the good work!

Take Quiz Watch Next Lesson
Your next lesson will play in 10 seconds
  • 0:03 Composition of Functions
  • 0:41 Practice
  • 3:56 Lesson Summary
Save Save Save

Want to watch this again later?

Log in or sign up to add this lesson to a Custom Course.

Log in or Sign up

Speed Speed

Recommended Lessons and Courses for You

Lesson Transcript
Instructor: DaQuita Hester

DaQuita has taught high school mathematics for six years and has a master's degree in secondary mathematics education.

What is a composition of functions and exactly how do you solve them? Find out and practice solving them in this lesson, then test your skills and knowledge with a quiz.

Composition of Functions

In mathematics, a function is like a machine. It performs a set of operations on an input in order to produce an output. Therefore, a composition of functions occurs when the output, or result, of one function becomes the input of another function.

For functions represented by f(x) or g(x), the composition would be represented by f(g(x)) or g(f(x)). It's important to know that f(g(x)) does not usually have the same value as g(f(x)), so order matters when calculating their composition. A general rule to keep in mind is to work from the inside out: the innermost function is the one that you should start with.


Let's begin our practice by looking at a few basic examples:

First, let f(x) = 2x and g(x) = x + 4. We're going to calculate the composition of f(g(3)). Since g(3) is written on the inside, we'll start with that function first and substitute 3 into the equation for g(x). When we do, we see that g(3) = 3 + 4 = 7. Now, since g(3) = 7, we can see that f(g(3)) = f(7). From here, we are going to substitute 7 into the equation for f(x). We will see that f(7) = 2(7) = 14. So in conclusion, f(g(3)) = 14.

Let's try another one. For our second example, let f(x) = 2x + 1, and let g(x) = x^2. We're going to calculate g(f(-2)). Since f(-2) is written on the inside, we'll start with that function. By substituting -2 into the equation for f(x), we see that f(-2) = 2(-2) + 1 = -4 + 1 = -3. So now, g(f(-2)) becomes g(-3), and we're ready to substitute -3 into the equation for g(x). We're able to see that g(-3) = (-3)^2 = 9. Therefore, g(f(-2)) = 9.

To unlock this lesson you must be a Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use

Become a member and start learning now.
Become a Member  Back
What teachers are saying about
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account