Skip to content

Mathematics · Ch 1 — Relations and Functions

Composition of Functions and Invertible Function

1.4

Composition of Functions and Invertible Function

1.4 Composition of Functions and Invertible Function

The Idea of Composition

Two functions that can be applied one after the other can be combined into a single function — their composition. If f:A→Bf : A \to B and g:B→Cg : B \to C, the composition g∘fg \circ f (read "g of f") is a new function from AA to CC: apply ff to an element of AA to get an element of BB, then apply gg to that result to get an element of CC.

(g∘f)(x)=g(f(x)),∀x∈A(g \circ f)(x) = g(f(x)), \quad \forall x \in A

The domain of g∘fg \circ f is AA and its codomain is CC; its range is a subset of CC.

Note

g∘fg \circ f means "apply ff first, then gg". The order matters — f∘gf \circ g applies gg first, and the two are generally not the same.


Composition is Not Commutative

Watch out

Composition of functions is not commutative: in general g∘f≠f∘gg \circ f \neq f \circ g.


Invertible Functions

A function f:X→Yf : X \to Y is called invertible if there exists a function g:Y→Xg : Y \to X such that

g∘f=IXandf∘g=IY,g \circ f = I_X \quad \text{and} \quad f \circ g = I_Y,

where IXI_X is the identity function on XX (defined by IX(x)=xI_X(x) = x for all x∈Xx \in X) and IYI_Y is the identity function on YY. The function gg is called the inverse of ff, denoted f−1f^{-1}.

Important

A function is invertible if and only if it is one-one and onto (bijective). So to prove a function is invertible without finding its inverse, you can simply show it is one-one and onto.


Key Results on Composition and Invertibility

  1. Uniqueness of inverse: If ff is invertible, its inverse f−1f^{-1} is unique.

  2. Composition with identity: For any function f:X→Yf : X \to Y,

f∘IX=fandIY∘f=f.f \circ I_X = f \quad \text{and} \quad I_Y \circ f = f.

  1. Inverse of composition: If f:X→Yf : X \to Y and g:Y→Zg : Y \to Z are both invertible, then g∘fg \circ f is invertible and …
Definition 8Composition of functions (gof)

Composition of functions (gof)

Let f:A→Bf : A \to B and g:B→Cg : B \to C be two functions. Their composition g∘fg \circ f (read "gg of ff") is the function g∘f:A→Cg \circ f : A \to C defined by

(g∘f)(x)=g(f(x)),∀ x∈A.(g \circ f)(x) = g\big(f(x)\big), \quad \forall\, x \in A.

You apply ff first and feed its output into gg; this requires the codomain of ff to be the domain of gg. …

Definition 9Invertible function (inverse f^-1)

Invertible function (inverse f⁻¹)

A function f:X→Yf : X \to Y is invertible if there is a function g:Y→Xg : Y \to X that reverses it:

g∘f=IXandf∘g=IY,g \circ f = I_X \quad \text{and} \quad f \circ g = I_Y,

where IXI_X and IYI_Y are the identity functions on XX and YY. Such a gg is unique; it is called the inverse of ff and denoted f−1f^{-1}.

The two conditions say g(f(x))=xg(f(x)) = x for all x∈Xx \in X and f(g(y))=yf(g(y)) = y for all y∈Yy \in Y — each function undoes the other. A key fact: ff is invertible if and only if it is both one-one and onto. …

Figure 1.5Composition of functions gof
Fig. 1.5 — Composition of functions gof

Drawn by us to help you understand the concept clearly, and verified to make sure it's accurate. For exams, practice from your textbook's own diagram.

Fig 1.5 is a visual definition of function composition. It shows three sets, drawn as circles labelled A, B, and C, arranged left to right. Inside each circle sits one representative element: xx in A, f(x)f(x) in B, and g(f(x))g(f(x)) in C. An arrow labelled ff arcs over the top from xx to f(x)f(x). A second arrow labelled gg arcs from f(x)f(x) to g(f(x))g(f(x)). A third, longer arrow labelled g∘fg \circ f sweeps along the bottom directly from xx to g(f(x))g(f(x)), skipping the intermediate stop. The diagram makes the chain explicit: you first apply ff, then gg, and the composite arrow g∘fg \circ f captures the entire journey in one step.

The physical idea is that composition is a two-stage process that you can treat as a single function. Given f:A→Bf: A \to B and g:B→Cg: B \to C, the composite g∘fg \circ f sends each xx in A directly to g(f(x))g(f(x)) in C. The figure emphasises that the output of ff becomes the input of gg — the middle set B is the bridge. Without the diagram, students often confuse the order: g∘fg \circ f means "first ff, then gg", and the arrow from xx to g(f(x))g(f(x)) along the bottom makes that sequence visually unambiguous.

(g∘f)(x)=g(f(x)),∀x∈A(g \circ f)(x) = g(f(x)), \quad \forall x \in A

Here f:A→Bf: A \to B and g:B→Cg: B \to C. The symbol ∘\circ is read as "composed with". The domain of g∘fg \circ f is A, and its codomain is C. The formula works only when the range of ff lies inside the domain of gg — that is, every f(x)f(x) must be a valid input for gg. In the figure, that condition is satisfied because f(x)f(x) sits inside B, which is exactly the domain of gg.

Watch out

A common mistake is to write f∘gf \circ g when you mean g∘fg \circ f. The order matters: g∘fg \circ f applies ff first, then gg. The diagram's bottom arrow runs from A to C, not from B to C, so it always starts with the function whose domain is A. …