<?xml version="1.0" encoding="UTF-8"?>

<record version="7" id="6768">
 <title>examples of non-commutative operations</title>
 <name>ExampleOfCommutative</name>
 <created>2005-02-17 20:56:00</created>
 <modified>2006-02-17 07:56:40</modified>
 <type>Example</type>
<parent id="2148">commutative</parent>
 <creator id="2760" name="yark"/>
 <author id="2760" name="yark"/>
 <author id="3" name="drini"/>
 <author id="6075" name="rspuzio"/>
 <classification>
	<category scheme="msc" code="20-00"/>
 </classification>
 <preamble>\usepackage{amsmath}
\usepackage{amsfonts}

\newcommand{\Z}{\mathbb{Z}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Q}{\mathbb{Q}}</preamble>
 <content>A standard example of a non-commutative operation is matrix multiplication. Consider the following two integer matrices:
\[
A=\begin{pmatrix}
1 &amp; 1\\
0&amp;1
\end{pmatrix},\qquad
B=\begin{pmatrix}
0 &amp; 1\\
0 &amp; 1
\end{pmatrix}
\]

If we compute $AB$ we get 
\[
AB=\begin{pmatrix}
0 &amp; 2 \\
0 &amp; 1
\end{pmatrix}
\]
but if we compute $BA$ we have
\[
BA=\begin{pmatrix}
0 &amp; 1 \\
0 &amp; 1
\end{pmatrix}.
\]

Since $AB\neq BA$ we conclude that matrix product is not commutative.

Operations do not necessarily have to operate on numbers. Another classic example is function composition. Let $f$ and $g$ be real functions given by
\[
f(x) = x^2,\qquad g(x) = 2x.
\]

We see that
\[
(f\circ g)(x) = f(g(x)) = (2x)^2 = 4x^2,
\]
but 
\[
(g \circ f )(x) = g(f(x)) = 2(x^2) = 2x^2.
\]
Since we got different functions, we conclude that function composition is not commutative.</content>
</record>
