Composition of Mappings is not Commutative/Examples/Sum of Squares not Square of Sum

Examples of Use of Composition of Mappings is not Commutative
Let $f: \R \times \R \to \R$ be the real-valued function defined as:
 * $\forall \tuple {x, y} \in \R \times \R: \map f {x, y} = x^2 + y^2$

Let $g: \R \times \R \to \R$ be the real-valued function defined as:
 * $\forall \tuple {x, y} \in \R \times \R: \map g {x, y} = x + y$

Let $h: \R \to \R$ be the real function defined as:
 * $\forall x \in \R: \map g x = x^2$

Then we have that:
 * $\map h {\map g {x, y} } = \paren {x + y}^2$

while:
 * $\map g {\map h x, \map h y} = x^2 + y^2 = \map f {x, y}$

Hence the diagram:


 * $\begin{xy} \xymatrix@L+2mu@+1em{

\R \times \R \ar[r]^*{g} \ar@{-->}[rd]_*{f} & \R \ar[d]^*{h} \\ & \R }\end{xy}$

is not a commutative diagram.