[go: up one dir, main page]

0% found this document useful (0 votes)
19 views6 pages

Composition of Functions

Function composition involves applying one function to the results of another, denoted as (g º f)(x) = g(f(x)). It is crucial to consider the domains of the functions involved to ensure valid results, as reversing the order of functions typically yields different outcomes. Additionally, functions can be de-composed into simpler functions for easier manipulation.

Uploaded by

Samuel Katongole
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views6 pages

Composition of Functions

Function composition involves applying one function to the results of another, denoted as (g º f)(x) = g(f(x)). It is crucial to consider the domains of the functions involved to ensure valid results, as reversing the order of functions typically yields different outcomes. Additionally, functions can be de-composed into simpler functions for easier manipulation.

Uploaded by

Samuel Katongole
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

22/04/2025, 15:45 Composition of Functions

Composition of Functions
Advanced We may use Cookies OK
"Function Composition" is applying one function to the results of another:

f( ) g( )

The result of f() is sent through g()

It is written: (g º f)(x)

Which means: g(f(x))

Example: f(x) = 2x+3 and g(x) = x2

"x" is just a placeholder. To avoid confusion let's just call it "input":

f(input) = 2(input)+3

g(input) = (input)2

Let's start:

(g º f)(x) = g(f(x))

First we apply f, then apply g to that result:

2
x 2x+3 (2x+3)
2
2(input)+3 (input)

(g º f)(x) = (2x+3)2

What if we reverse the order of f and g?

https://www.mathsisfun.com/sets/functions-composition.html 1/6
22/04/2025, 15:45 Composition of Functions

(f º g)(x) = f(g(x))

First we apply g, then apply f to that result:

x x2 2x 2 +3
2
(input) 2(input)+3

(f º g)(x) = 2x2+3

We get a different result!

When we reverse the order the result is rarely the same.

So be careful which function comes first.

Symbol

The symbol for composition is a small circle:

(g º f)(x)

It is not a filled in dot: (g · f)(x), as that means multiply.

Composed With Itself


We can even compose a function with itself!

Example: f(x) = 2x+3

(f º f)(x) = f(f(x))
https://www.mathsisfun.com/sets/functions-composition.html 2/6
22/04/2025, 15:45 Composition of Functions

First we apply f, then apply f to that result:

x 2x+3 2(2x+3)+3
2(input)+3 2(input)+3

(f º f)(x) = 2(2x+3)+3 = 4x + 9

We should be able to do it without the pretty diagram:

(f º f)(x) = f(f(x))

= f(2x+3)

= 2(2x+3)+3

= 4x + 9

Domains
It has been easy so far, but now we must consider the Domains of the functions.

f(x) The domain is the set of all the values that go


into a function.

Range
The function must work for all values we give it,
so it is up to us to make sure we get the domain
correct!
Domain x

Example: the domain for √x (the square root of x)

We can't have the square root of a negative number (unless we use imaginary
numbers, but we aren't), so we must exclude negative numbers:

The Domain of √x is all non-negative Real Numbers

On the Number Line it looks like:

https://www.mathsisfun.com/sets/functions-composition.html 3/6
22/04/2025, 15:45 Composition of Functions

Using set-builder notation it is written:

{x∈ | x ≥ 0}

Or using interval notation it is:

[0,+∞)

It is important to get the Domain right, or we will get bad results!

Domain of Composite Function


We must get both Domains right (the composed function and the first function
used).

When doing, for example, (g º f)(x) = g(f(x)):

Make sure we get the Domain for f(x) right,

Then also make sure that g(x) gets the correct Domain

Example: f(x) = √x and g(x) = x2

The Domain of f(x) = √x is all non-negative Real Numbers

The Domain of g(x) = x2 is all the Real Numbers

The composed function is:

(g º f)(x) = g(f(x))

= (√x)2
=x

https://www.mathsisfun.com/sets/functions-composition.html 4/6
22/04/2025, 15:45 Composition of Functions

Now, "x" normally has the Domain of all Real Numbers ...

... but because it is a composed function we must also consider f(x),

So the Domain is all non-negative Real Numbers

Why Both Domains?


Well, imagine the functions are machines ... the first one melts a hole with a flame
(only for metal), the second one drills the hole a little bigger (works on wood or
metal):

g f
f( ) g( )

Metal Only Wood or Metal

What we see at the end is a drilled hole, and we may think "that
should work for wood or metal".

But if we put wood into g º f then the first function f will make a
fire and burn everything down!

So what happens "inside the machine" is important.

De-Composing Function
We can go the other way and break up a function into a composition of other
functions.

https://www.mathsisfun.com/sets/functions-composition.html 5/6
22/04/2025, 15:45 Composition of Functions

Example: (x+1/x)2

That function can be made from these two functions:

f(x) = x + 1/x

g(x) = x2

And we get:

(g º f)(x) = g(f(x))

= g(x + 1/x)

= (x + 1/x)2

This can be useful if the original function is too complicated to work on.

Summary
"Function Composition" is applying one function to the results of another.

(g º f)(x) = g(f(x)), first apply f(), then apply g()


We must also respect the domain of the first function
Some functions can be de-composed into two (or more) simpler functions.

Mathopolis: Q1 Q2 Q3 Q4 Q5 Q6 Q7 Q8 Q9 Q10

Copyright © 2023 Rod Pierce

https://www.mathsisfun.com/sets/functions-composition.html 6/6

You might also like