Definition:Composition of Mappings

Definition
Let $$f_1: S_1 \to S_2$$ and $$f_2: S_2 \to S_3$$ be mappings such that the domain of $$f_2$$ is the same set as the codomain of $$f_1$$.

Then the composite of $$f_1$$ and $$f_2$$ is defined and denoted as:


 * $$f_2 \circ f_1 = \left\{{\left({x, z}\right): x \in S_1, z \in S_3: \exists y \in S_2: \left({x, y}\right) \in f_1 \and \left({y, z}\right) \in f_2}\right\}$$

That is, the composite mapping $$f_2 \circ f_1$$ is defined as:


 * $$f_2 \circ f_1 \left({S_1}\right) = f_2 \left({f_1 \left({S_1}\right)}\right)$$


 * CompositeMapping.png

Domain and Codomain
From Domain of Composite Relation, the domain of $$f_2 \circ f_1$$ is the domain of $$f_1$$:
 * $$\operatorname{Dom} \left({f_2 \circ f_1}\right) = \operatorname{Dom} \left({f_1}\right)$$

From Codomain of Composite Relation, the codomain of $$f_2 \circ f_1$$ is the codomain of $$f_2$$:
 * $$\operatorname{Cdm} \left({f_2 \circ f_1}\right) = \operatorname{Cdm} \left({f_2}\right)$$

These follow because, by definition, a mapping is a special type of relation.

Commutative Diagram
The concept of composition of mappings can be illustrated by means of a commutative diagram.

This example illustrates the specific example cited here:


 * CommutativeDiagram.png

Composition as a Binary Operation
Let $$\mathbb F$$ be the set of all mappings from a set $$S$$ to itself.

Then the concept of composite mapping defines a binary operation on $$\mathbb F$$:


 * $$\forall f, g \in \mathbb F: g \circ f = \left\{{\left({s, t}\right): s \in S, \left({f \left({s}\right), t}\right) \in g}\right\} \in \mathbb F$$

Thus, for every pair $$\left({f, g}\right)$$ of mappings in $$\mathbb F$$, the composition $$g \circ f$$ is another element of $$\mathbb F$$.

Alternative Terminology
Some authors write $$f_2 \circ f_1$$ as $$f_2 f_1$$.

Some sources call $$f_2 \circ f_1$$ the resultant of $$f_1$$ and $$f_2$$ or the product of $$f_1$$ and $$f_2$$.

See, for example,.