# Commutative Diagram/Examples/Square Function with Square Root

## Example of Commutative Diagram

Let $g$ and $h$ be the real functions defined as:

$\forall x \in \R: \map g x = x^2$
$\forall x \in \R_{\ge 0}: \map h x = \sqrt x$

The composition $h \circ g$ can be depicted using a commutative diagram as follows:

$\begin{xy} \[email protected][email protected]+1em{ \R \ar[r]^*{g} \[email protected]{-->}[rd]_*{h \circ g} & \R_{\ge 0} \ar[d]^*{h} \\ & \R_{\ge 0} }\end{xy}$