# Definition:Composition of Mappings/Definition 2

## Definition

Let $S_1$, $S_2$ and $S_3$ be sets.

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$.

The **composite of $f_1$ and $f_2$** is defined and denoted as:

- $f_2 \circ f_1 := \set {\tuple {x, z} \in S_1 \times S_3: \tuple {\map {f_1} x, z} \in f_2}$

### Commutative Diagram

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

This diagram illustrates the specific example of $f_2 \circ f_1$:

- $\begin{xy}\[email protected]+1em{ S_1 \ar[r]^*+{f_1} \[email protected]{-->}[rd]_*[l]+{f_2 \mathop \circ f_1} & S_2 \ar[d]^*+{f_2} \\ & S_3 }\end{xy}$

## Warning

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$.

If $\Dom {f_2} \ne \Cdm {f_1}$, then the **composite mapping** $f_2 \circ f_1$ is **not defined**.

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

## Also known as

In the context of analysis, this is often found referred to as a **function of a function**, which (according to some sources) makes set theorists wince, as it is technically defined as a **function on the codomain of a function**.

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$**.

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

Some use the notation $f_2 \cdot f_1$ or $f_2 . f_1$.

Some use the notation $f_2 \bigcirc f_1$.

Others, particularly in books having ties with computer science, write $f_1; f_2$ or $f_1 f_2$ (note the reversal of order), which is read as **(apply) $f_1$, then $f_2$**.

## Also see

- Results about
**composite mappings**can be found here.

## Sources

- 1971: Allan Clark:
*Elements of Abstract Algebra*... (previous) ... (next): Chapter $1$: Mappings: $\S 16$

- 2011: Robert G. Bartle and Donald R. Sherbert:
*Introduction to Real Analysis*(4th ed.) ... (previous) ... (next): $\S 1.1$: Sets and Functions