Constant Mapping is Non-Commutative

From ProofWiki
Jump to navigation Jump to search


Let $S$ be a set whose cardinality is greater than one.

Let $f: S \to S$ and $g: S \to S$ be constant mappings on $S$.


$f \circ g \ne g \circ f$

where $\circ$ denotes composition of mappings.


First note that if $S$ is a singleton, then there exists only one constant mapping on $S$.

In such a circumstance, $f = g$ and so $f \circ g \ne g \circ f$.


So, let $\card S > 1$.

Then there exist at least $2$ distinct elements $a$ and $b$ of $S$.

Thus, let $f$ and $g$ be defined as:

$\forall x \in S: \map f x = a$
$\forall x \in S: \map g x = b$

for some $a, b \in S$ such that $a \ne b$.

We have that:

\(\ds \map {\paren {f \circ g} } x\) \(=\) \(\ds \map f {\map g x}\)
\(\ds \) \(=\) \(\ds \map f b\) Definition of $\map g x$
\(\ds \) \(=\) \(\ds a\) Definition of $\map f x$
\(\ds \map {\paren {g \circ f} } x\) \(=\) \(\ds \map g {\map f x}\)
\(\ds \) \(=\) \(\ds \map g a\) Definition of $\map f x$
\(\ds \) \(=\) \(\ds b\) Definition of $\map g x$

So $f \circ g \ne g \circ f$ as required.