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.

# Evaluating composite functions

Sal evaluates (h⚬g)(-6) for g(x)=x²+5x-3 and h(y)=3(y-1)²-5.

## Want to join the conversation?

• I'm confused when it comes to how to solve questions involving functions that look something like: "If f(x) = -2x + 5, what is f(-3x) equal to?". For reference this is a problem on the 4th SAT practice test here on Khan Academy that I got right, only I don't understand the real logic behind it. If anyone could give me some intuition I would be thankful manyfold :)
• Hallo
Well first of all we can look at this problem and say, well what do we see in common with f(x) and f(-3x)? All you are doing is substituting the x and the -3x. You have to do the same thing to both sides of the equation so just put a -3x for every x in -2x + 5. Once you do this you will get: -2x(-3x)+5. Then it's just simple multiplication to get 6x^2 + 5. So, f(-3x) = 6x^2 + 5
Hope that helped,
Silas
• why/when would you use this
• Computer programming breaks algorithms down into reusable functions / modules.
They would use this concept of composite functions where the output of one function becomes the input to another function.

A real life example would be in calculating what you pay at a store.
Let's say you buy a sweater and it is on sale for 25% off. And, you live in a state where they apply income tax to your purchase. You could have 2 functions:
1) Calculate the discounted price: Input = original price; output = discounted price
2) Apply tax: Input = discounted price; output = price with tax
• At what does it mean if h is "of" g? I have never heard the "of" term used before.
• Ethan,
h "of" g simply means the same as it would when you said h "of" x or h "of" 2.
~Naomi
• What would be the next step for g(f(0.25)?
• You haven't given the definition of the functions, so there is no way to give you specifics.
Your basic approach would be to :
1) Find f(0.25)
2) Then use the result as your input to g(x)
• can someone help me? I just watched this video and when i went to the activity i lost all thought. Anyone have tips on how to stop that?
• Just calm down and rethink that is what I did at first but the more you see and practice the more better you will be
• Quick and slightly unrelated question: What program does Sal use for these types of videos? As in, the one he uses to draw for us to see what he means.
• Sal Khan, the founder of Khan Academy, uses a digital tablet and stylus to create the videos in which he writes and draws. He uses a software called SmoothDraw to write and draw on the digital tablet.

SmoothDraw is a freehand drawing and painting software that is specifically designed for use with digital tablets. It provides a variety of drawing tools and options, including pens, brushes, shapes, and text. It also includes features such as layer support, image resizing, and color management.

Using SmoothDraw, Sal Khan is able to write and draw on his digital tablet in real-time, which allows him to explain concepts and work through problems visually in his videos. This has been a key factor in the success of Khan Academy, as it allows students to see and understand concepts in a visual and interactive way.
• Why did he continue to solve the problem after he got the answer of 3?
(1 vote)
• He continued to solve the problem after he got the answer of 3 because in a composite function problem, there are two steps. The first step is to find the answer of the function within the function. The second step is to input the answer of the function of the function in to the function on the outside. This is the best I can explain it, and I hope it helped!