# An Operation on Matrices

We were able to find in Bijective mappings a mapping which was a bijection. As we continue to work with mappings, we will now try to determine if a given mapping is an operation on a given set. In this case, we will show that the normal matrix multiplication is a noncommutative operation on the set of all $$2 \times 2$$ matrices with real entries.

## Matrix Multiplication is an Operation

We begin by recalling the what an operation is. Here, since multiplication will have two inputs and one output, we want to show that it is a binary operation. In general, if $$\cdot$$ is a mapping from $$A^{2} \to A$$, then $$\cdot$$ is an operation on $$A$$. Therefore, we will need to show that $$\cdot$$ is such a mapping for $$M(2,\mathbb{R})$$, the set of all $$2 \times 2$$ matrices with real entries.

The next thing we need to show is that the matrix multiplication is noncommutative. Recall that an operation is commutative on $$A$$ if $$a\cdot b=b\cdot a$$ for all $$a,b \in A$$. Hence, we will need to find an $$a,b \in M(2,\mathbb{R})$$ such that $$a\cdot b \neq b \cdot a$$.

### Mapping

In order to show that the multiplication is a mapping from $$M(2,\mathbb{R})^{2} \to M(2,\mathbb{R})$$, we need to ensure that it is well-defined for all elements in $$M(2,\mathbb{R})^{2}$$. In order to do this, we must show that for any two such matrices, the product will again be in the set of matrices.

To do this, we let $$a,b \in M(2,\mathbb{R})$$. Then, we can say that
\begin{align*}
a&=\begin{bmatrix}
a_{11} & a_{12} \\
a_{21} & a_{22}
\end{bmatrix} \\
b&=\begin{bmatrix}
b_{11} & b_{12} \\
b_{21} & b_{22}
\end{bmatrix}
\end{align*}
for some $$a_{11},a_{12},a_{21},a_{22},b_{11},b_{12},b_{21},b_{22} \in \mathbb{R}$$.

We now find
\begin{align*}
a \cdot b&=\begin{bmatrix}
a_{11} & a_{12} \\
a_{21} & a_{22}
\end{bmatrix}
\cdot \begin{bmatrix}
b_{11} & b_{12} \\
b_{21} & b_{22}
\end{bmatrix} \\
&=\begin{bmatrix}
a_{11}b_{11}+a_{12}b_{21} & a_{11}b_{12}+a_{12}b_{22} \\
a_{21}b_{11}+a_{22}b_{21} & a_{21}b_{12}+a_{22}b_{22}
\end{bmatrix}.
\end{align*}

We first note that the resulting matrix is again a $$2 \times 2$$ matrix. Furthermore, each of the entries are the sum of products of real numbers. Since the real numbers are closed under addition and multiplication, this means that each of the entries of the resulting matrix are indeed real numbers. Hence, we have that $$a \cdot b \in M(2,\mathbb{R})$$. This then gives us that $$\cdot:M(2,\mathbb{R})^{2} \to M(2,\mathbb{R})$$ is a well-defined mapping.

### Noncommutative

We now know that $$\cdot$$ is an operation, so the last thing to show is that it is noncommutative. If we wanted to show that it was commutative, we would need to show that the the commutative property held for all pairs of matrices in $$M(2,\mathbb{R})$$. However, since we are showing that it is noncummutative, we just need one example of matrices where the product is not commutative.

That means that we need to come up with an example. Often, the best way to do this is just to guess and see what happens. If you happen to choose two matrices with a commutative product, then you could change your guess and try again. Here, we should make this as easy as possible on ourselves, so I will choose the matrices
\begin{align*}
a&=\begin{bmatrix}
1 & 0 \\
0 & 0
\end{bmatrix} \\
b&=\begin{bmatrix}
0 & 1 \\
0 & 0
\end{bmatrix}
\end{align*}

With these two matrices, we see that
\begin{align*}
ab&=\begin{bmatrix}
0 & 1 \\
0 & 0
\end{bmatrix} \\
ba&= \begin{bmatrix}
0 & 0 \\
0 & 0
\end{bmatrix}.
\end{align*}

Therefore, we have found an example of matrices which do not commute under multiplication. We are now ready for a formal proof.

## Proof

Let $$a, b \in M(2,\mathbb{R})$$. We know that
\begin{align*}
a&=\begin{bmatrix}
a_{11} & a_{12} \\
a_{21} & a_{22}
\end{bmatrix} \text{ and }\\
b&=\begin{bmatrix}
b_{11} & b_{12} \\
b_{21} & b_{22}
\end{bmatrix}
\end{align*}
for some $$a_{11},a_{12},a_{21},a_{22},b_{11},b_{12},b_{21},b_{22} \in \mathbb{R}$$.

We now see that

\begin{align*}
a \cdot b&=\begin{bmatrix}
a_{11} & a_{12} \\
a_{21} & a_{22}
\end{bmatrix}
\cdot \begin{bmatrix}
b_{11} & b_{12} \\
b_{21} & b_{22}
\end{bmatrix} \\
&=\begin{bmatrix}
a_{11}b_{11}+a_{12}b_{21} & a_{11}b_{12}+a_{12}b_{22} \\
a_{21}b_{11}+a_{22}b_{21} & a_{21}b_{12}+a_{22}b_{22}
\end{bmatrix}.
\end{align*}

Which is again a $$2 \times 2$$ matrix. Furthermore, since the real numbers are closed under addition and multiplication, each entry of this matrix is a real number. Hence $$\cdot: M(2,\mathbb{R})^{2} \to M(2,\mathbb{R})$$ is a well-defined mapping.

We now note that if
\begin{align*}
a&=\begin{bmatrix}
1 & 0 \\
0 & 0
\end{bmatrix} \text{ and }
b&=\begin{bmatrix}
0 & 1 \\
0 & 0
\end{bmatrix},
\end{align*}

then $$a,b \in M(2,\mathbb{R})$$. Also
\begin{align*}
ab&=\begin{bmatrix}
0 & 1 \\
0 & 0
\end{bmatrix} \text{ but }
ba &=\begin{bmatrix}
0 & 0 \\
0 & 0
\end{bmatrix}.
\end{align*}

Therefore, $$ab \neq ba$$, so $$\cdot$$ is a noncommutative operation on $$M(2,\mathbb{R})$$.

## Conclusion

Thank you for reading as we worked through how to show that matrix multiplication is a noncommutative operation. I hope this helped you as you study your algebra, be sure to visit Algebraic Structures for more helpful algebra posts. Also be sure to share this with anyone else that needs some help with algebra.

## 1 thought on “An Operation on Matrices”

This site uses Akismet to reduce spam. Learn how your comment data is processed.