Composition of Functions
Definition 1. Let $f : X \longrightarrow Y$ and $g : Y \longrightarrow Z$ be functions. The composition of $f$ and $g$ is the function $g \circ f : X \longrightarrow Z$ where $(g \circ f)(x) = f(g(x)), \forall x \in X$. In other words, $$g \circ f = \{(x, z) \in X \times Z \, | \, \exists y \in Y \text{ such that } (x, y) \in f \wedge (y, z) \in g\}. $$