Definition:Composition of Mappings

Let $$f_1: S_1 \to S_2$$ and $$f_2: S_2 \to S_3$$ be mappings, and $$\mathrm {Dom} \left ( {f_2}\right) = \mathrm {Rng} \left({f_1}\right)$$.

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 \land \left({y, z}\right) \in f_2}\right\}$$

Note that:

$$f_2 \circ f_1 \subseteq S_1 \times S_3$$

If $$\mathrm {Dom} \left({f_2}\right) \ne \mathrm {Rng} \left({f_1}\right)$$, then $$f_2 \circ f_1$$ is not defined.

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

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

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

This definition is directly analogous to that of composition of relations owing to the fact that a mapping is a special kind of relation.