In mathematics, the composition of a function is an action in which two functions, ‘a and ‘b’, are combined to produce a new function. This new function ‘c’ is formulated as c(x) = b(an (x)). This means that the ‘b’ function is being applied to the x function. In other words, when a function is applied to the output of another function it is known as a compose function.

**Back to School: **Before learning about the compose functions, let us understand what a function is. You can think of functions as machines. They take input and process it. The output is always related to the input in a function. The function is always denoted by f (any variable or constant). For example, f(x) = x^{4} + 21 or f(2) = 8y, etc. Let’s have a look at how a composite function is defined.

## Definition of Compose Function

Till now we have learned how to apply values in a function. For example, we have a function f(x) = x + 7. If we say that the value of x = 2, then f(2) = 2 + 7 = 9. Simple isn’t it! What if we raise the bar a little bit and inside of a constant value place another function inside the parameters.

Say we have the same function but instead of 2 we have another function g(x) = 2x + 3. We place f (g(x)) = x + 7. Now the value of x changes to g(x). Therefore f(g(x)) = 2x + 3 + 7 = 2x + 7.

This is a major principle behind compose functions. We can define the composition function as the application of one function into another. Let us take two functions f(y) and g(y). Suppose the result of f(y) is sent through g(y). Then it can be written as (g º f )(y) which indicates the compose function is g(f(y)).

Similarly, if you want to send the result of g(y) through f(y) the compose function will be f(g(y)). But, remember that g(f(y)) is not equal to f(g(y)). This statement tells us that order is very important while we compose functions. If you don’t follow the order, you may get different results.

### Representation of Compose Function

Let two functions K and L be related to each other with a function ‘a’. This implies that a: K → L. Now let us suppose that L is related to M using another function ‘b’. This means that b: L → M. We can see that K and M are related by L. Therefore the composition of ‘a’ and ‘b’ (a ∘ b) is b ∘ a(x) or b(a(x)). The compose function provides a direct link between K and L.

See the figure below to understand the aforementioned statements:

The composition of a function is a very important topic for classes 11, 12 and pass-out batches preparing for competitive examinations. Let us learn important terms related to the composition functions.

**Symbol: **The symbol used to define compose function is a small circle ‘∘’. Do not misunderstand this small circle with the dot used for multiplication (dot product). Always write the compose functions as (f ∘ g)(x) not (f.g)(x).

**Domain: **Domain is defined as the set of all the integer values which go inside the function. The numbers within the domain are only considered to be put in the function.

### How to Read any Compose Functions

Let a composite function is given as f(g(x)). This is read as ‘f’ of ‘g’ of x. We can also read this as (f ∘ g) (x) or ‘fog’. Here g(x) becomes the domain of function ‘f’.

**Example:** Let a function f(y) be 2x – 1 and g(y) be 4x. Find the fog and gof?

**Solution: **Given f(y) = 2x – 1

g(y) = 4x.

Therefore fog = ‘f’ of ‘g’ of y = f ( 4x) = 2 (4x) – 1 = 8x – 1.

gof = ‘g’ of ‘f’ of y = g(2x – 1) = 4 ( 2x – 1) = 8x – 4.

This example also proves that ‘fog’ is not equal to ‘gof’.

## Properties of Compose Functions

Let there be two functions ‘a’, ‘b’ and ‘c’. Their properties are mentioned below→

1. Associative Property: If there are three functions a, b, and c, they are said to be associative if and only if they satisfy the associative property of function composition.

**a ∘ (b ∘ c) = (a ∘ b) ∘ c**

2. Commutative Property: The commutative property states that two functions ‘a’ and ‘b’ commute if and only if:

**a ∘ b = b ∘ a**

3. A one-to-one function derived from a compose function is always one-to-one.

4. When two onto functions are combined, the result is always onto.

5. The inverse of the composition of two functions ‘a’ and ‘b’ is equal to the individual composition of both functions’ inverses.

**(a ∘ b) – 1 = ( a – 1 ∘ b – 1)**

### How to Compose Functions

The composition of two or more functions in Math is as simple as putting the icing on a cake. Yet many scholars confuse it. Look at the steps mentioned below to learn how to compose functions flawlessly.

**Step 1:** Write all the functions given properly.

**Step 2:** Read the question properly and write the inside and outside functions respectively.

**Step 3:** Write the inside function with its actual value and use it to replace the value of the variable.

**Step 4:** Simplify the function to get the resultant function.

### Function Composition With Itself

We can also compose a function within itself. It is possible! Let us assume a function h. The composition of h with itself will be as follows:

(h ∘ h)(x) = h(h(x)), this function is ‘h’ of ‘h’ of x.

**Example:** Find the (h ∘ h) (x) of the function h(x) = 6x

**Solution: **Given: h(x) = 6x

(h ∘ h)(x) = h (h(x))

= h(6x)

= 6 (6x)

= 36x

This covers all the topics related to how to compose a function. Let us learn about some related terms and look at examples to understand this topic well.

**Domains**

So far, it’s been simple, but now we should examine the function’s domains. The domain is the set of all possible values that exist for a function. The function must operate with any value we pass it, therefore it’s our responsibility to make sure the domain is accurate! For instance, examine the domain for √x.

Solution: Since we are aware that the square root can never be a negative value. If so, the number is imaginary. Thus we must only have the values of √x as positive and real numbers. Thus the domain of √x ranges from 0 to positive infinity.

**The Domain of Composite Function**

To find the domain of a composite function (f ∘ g) (x) we must first solve the function accurately. The domain of g(x) gives the domain of the composite function. Look at the example below:

**Example:** f(y) = √y and g(y) = y^{2}

**Solution:** We can see that f(y) has the domain containing all real and positive numbers and g(y) has all the real numbers as its domain.

Thus g ∘ f (y) = g (f (y))

g(√y) = (√y)^{2}

= y

Thus the domain of the composite function is all real and non-negative integers.

**Why Do We Need Both Domains?**

This can be understood very well with an example. Suppose you have a machine that uses fire to bake the cake and then puts the icing on it to decorate it. If we consider these as function b and function i. Then the machine will produce cake using b º i ( First bake then decorate). But if the functions are reversed ( i º f ), then the cake will be decorated first but the fire while baking will burn everything down. This will make the machine insufficient.

That is why we need both domains.

**Decomposing Function**

If a function is too complex to solve you can always use a method known as decomposing function. This means doing the steps we have studied till now, in a reverse manner. Look at the example below:

**Example:** h(y) = (y+1/y)^{2}

**Solution:** We can split the function as:

f(y) = y + 1/y

g(y) = y^{2}

This gives us that

(g º f)(y) = g(y + 1/y)

= (y + 1/y)^{2}

## Example Related to Composite Function

Look at the example below to summarize all the concepts related to compose functions we just studied in the above article.

**Example: ** a(x) = x + 5 and b(x) = x^{2}. Find (a º b). Also prove that (a º b) ≠ (b º a).

**Solution:** Understand ‘x’ as input of the function.

Functions are

a(x) = x + 5 and b(x) = x^{2}

(a º b) = a ( b(x) )

= a (x^{2})

= x^{2} + 5

Now let us check (b º a)

(b º a) = b ( a(x) )

= b (x + 5)

= ( x + 5 )^{2}

= x^{2} + 10x + 25

We have two different results hence (a º b) ≠ (b º a).w

#### Related topics

#### Composite Figures – Area and Volume

A composite figure is made up of simple geometric shapes. It is a 2-dimensional figure of basic two-dimensional shapes such as squares, triangles, rectangles, circles, etc. There are various shapes whose areas are different from one another. Everything has an area they occupy, from the laptop to your book. To understand the dynamics of composite […]

Read More >>#### Special Right Triangles: Types, Formulas, with Solved Examples.

Learn all about special right triangles- their types, formulas, and examples explained in detail for a better understanding. What are the shortcut ratios for the side lengths of special right triangles 30 60 90 and 45 45 90? How are these ratios related to the Pythagorean theorem? Right Angle Triangles A triangle with a ninety-degree […]

Read More >>#### Ways to Simplify Algebraic Expressions

Simplify algebraic expressions in Mathematics is a collection of various numeric expressions that multiple philosophers and historians have brought down. Talking of algebra, this branch of mathematics deals with the oldest concepts of mathematical sciences, geometry, and number theory. It is one of the earliest branches in the history of mathematics. The study of mathematical […]

Read More >>#### How to Solve Right Triangles?

In this article, we’ll learn about how to Solve Right Triangles. But first, learn about the Triangles. Triangles are made up of three line segments. These three segments meet to form three angles. The lengths of the sides and sizes of the angles are related to one another. If you know the size (length) of […]

Read More >>
Comments: