Composition of Mappings is not Commutative/Examples
Jump to navigation
Jump to search
Examples of Use of Composition of Mappings is not Commutative
Arbitrary Example 1
Let $f: \R \to \R$ be the real function defined as:
- $\forall x \in \R: \map f x = x^2 + 1$
Let $g: \R \to \R$ be the real function defined as:
- $\forall x \in \R: \map g x = x + 1$
Then the compositions of $f$ with $g$ are:
\(\ds f \circ g: \R \to \R: \, \) | \(\ds \map {\paren {f \circ g} } x\) | \(=\) | \(\ds \paren {x + 1}^2 + 1\) | \(\ds = x^2 + 2 x + 2\) | ||||||||||
\(\ds g \circ f: \R \to \R: \, \) | \(\ds \map {\paren {g \circ f} } x\) | \(=\) | \(\ds \paren {x^2 + 1} + 1\) | \(\ds = x^2 + 2\) |
and it is immediately seen that:
- $g \circ f \ne f \circ g$
Sum of Squares not Square of Sum
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:
$\quad\quad \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.