Composition of Mappings/Examples/Compositions of x^2 with 2x+1

Example of Compositions of Mappings
Let $f: \R \to \R$ be the real function defined as:
 * $\forall x \in \R: f \paren x = x^2$

Let $g: \R \to \R$ be the real function defined as:
 * $\forall x \in \R: g \paren x = 2 x + 1$

Then the compositions of $f$ with $g$ are:

$f \circ g: \R \to \R$:
 * $\forall x \in \R: \paren {f \circ g} \paren x = \paren {2 x + 1}^2$

$g \circ f: \R \to \R$:
 * $\forall x \in \R: \paren {g \circ f} \paren x = 2 x^2 + 1$

Note that:
 * $\paren {f \circ g} \paren 1 = \paren {2 \times 1 + 1}^2 = 9$


 * $\paren {g \circ f} \paren 1 = 2 \times 1^2 + 1 = 3$

demonstrating that composition of mappings is in general not commutative.