In this section we introduce Reeb graphs.
Definition (Reeb Graph). Given a continuous function \(f \colon X \rightarrow \overline{{\mathbb{R}}}\) and \(x \in X\), let \(\pi_f (x)\) be the connected component of \(x\) in \(f^{-1}(f(x))\). In this way we obtain a function \(\pi_f \colon X \rightarrow \pi_f (X) \subset 2^X\) and we endow \(\pi_f (X)\) with the quotient topology[2]. By the universal property of the quotient space there is a unique continuous function \(\mathcal{R} f \colon \pi_f (X) \rightarrow \overline{{\mathbb{R}}}\) such that \[ \xymatrix{ X \ar[r]^{\pi_f} \ar[dr]_f & \pi_f (X) \ar[d]^{\mathcal{R} f} \\ & \overline{{\mathbb{R}}} } \] commutes, i.e. \(\mathcal{R} f \circ \pi_f = f\).
For another continuous function \(g \colon Y \rightarrow \overline{{\mathbb{R}}}\) and a homomorphism \(\varphi \colon f \rightarrow g\) we may use the universal property of \(\pi_f\) again, to obtain a unique continuous map \(\mathcal{R} \varphi \colon \pi_f (X) \rightarrow \pi_g (Y)\) such that \[ \xymatrix{ X \ar[d]_{\pi_f} \ar[r]^{\varphi} & Y \ar[d]^{\pi_g} \\ \pi_f (X) \ar[r]_{\mathcal{R} \varphi} & \pi_g (Y) } \] commutes, i.e. \(\mathcal{R} \varphi \circ \pi_f = \pi_g \circ \varphi\).
Lemma. Let \(f \colon X \rightarrow \overline{{\mathbb{R}}}\) and \(g \colon Y \rightarrow \overline{{\mathbb{R}}}\) be continuous functions and let \(\varphi \colon f \rightarrow g\) be a homomorphism, then the diagram \[ \xymatrix{ \pi_f (X) \ar@/^/[rr]^{\mathcal{R} \varphi} \ar[dr]_{\mathcal{R} f} & & \pi_g (Y) \ar[dl]^{\mathcal{R} g} \\ & \overline{{\mathbb{R}}} } \] commutes. Or in other words \(\mathcal{R} \varphi\) is a homomorphism from \(\mathcal{R} f\) to \(\mathcal{R} g\) in the category of \(\overline{{\mathbb{R}}}\)-spaces.
Proof. We consider the diagram \[ \xymatrix@C=5pt{ \pi_f (X) \ar[rr]^{\mathcal{R} \varphi} \ar@/_3pc/[ddr]_{\mathcal{R} f} & & \pi_g (Y) \ar@/^3pc/[ddl]^{\mathcal{R} g} \\ X \ar[u]_{\pi_f} \ar[rr]^{\varphi} \ar[dr]^f & & Y \ar[u]^{\pi_g} \ar[dl]_g \\ & \overline{{\mathbb{R}}} . } \] In this diagram the three inner triangles and the square commute. Further \(\pi_f\) and \(\pi_g\) are surjective and thus the outer triangle commutes as well.
Lemma. Let \(f \colon X \rightarrow \overline{{\mathbb{R}}}\), \(g \colon Y \rightarrow \overline{{\mathbb{R}}}\), and \(h \colon Z \rightarrow \overline{{\mathbb{R}}}\) be continuous functions and let \(\varphi \colon f \rightarrow g\) and \(\psi \colon g \rightarrow h\) be two homomorphisms, then \(\mathcal{R} (\psi \circ \varphi) = \mathcal{R} \psi \circ \mathcal{R} \varphi\).
Proof. We consider the diagram \[ \xymatrix{ X \ar[r]^{\varphi} \ar[d]_{\pi_f} & Y \ar[r]^{\psi} \ar[d]_{\pi_g} & Z \ar[d]_{\pi_h} \\ \pi_f (X) \ar[r]_{\mathcal{R} \varphi} & \pi_g (Y) \ar[r]_{\mathcal{R} \psi} & \pi_h (Z) . } \] By definition both inner squares commute, hence the outer square commutes as well. Now it follows from the uniqueness part of the universal property of \(\pi_f\) that \(\mathcal{R} (\psi \circ \varphi) = \mathcal{R} \psi \circ \mathcal{R} \varphi\).
The previous two lemmata imply that \(\mathcal{R}\) is an endofunctor on the category of \(\overline{{\mathbb{R}}}\)-spaces. Later we will define an interleaving distance on Reeb graphs, but first we will introduce join trees and their interleavings. Join trees are easier to understand and may provide us with some intuition for understanding the more sophisticated interleavings of Reeb graphs.