It looks like you're using Internet Explorer 11 or older. This website works best with modern browsers such as the latest versions of Chrome, Firefox, Safari, and Edge. If you continue with this browser, you may see unexpected results.

# Linear Algebra

## Commutative Law

Similar to the addition of algebraic expressions or vectors, commutative law allows the addition of matrices without dependence on order. If $$A, B \in M_{m \times n} ( \mathbb{R})$$, we have that:

$$A + B = B + A$$

Consider $$A = \begin{bmatrix} 2 & -5 \\ -1 & 3 \end{bmatrix}$$ and $$B = \begin{bmatrix} 3 & 5 \\ 1 & 2 \end{bmatrix}$$ (Recall addition of matrices from Operations on Matrices.)

 $$A + B$$ = $$\begin{bmatrix} 2 & -5 \\ -1 & 3 \end{bmatrix} + \begin{bmatrix} 3 & 5 \\ 1 & 2 \end{bmatrix}$$             = $$\begin{bmatrix} 2+3 & -5+5 \\ -1+1 & 3+2 \end{bmatrix}$$             = $$\begin{bmatrix} 5 & 0 \\ 0 & 5 \end{bmatrix}$$ $$B + A$$ = $$\begin{bmatrix} 3 & 5 \\ 1 & 2 \end{bmatrix} + \begin{bmatrix} 2 & -5 \\ -1 & 3 \end{bmatrix}$$                  $$\begin{bmatrix} 3+2 & 5+(-5) \\ 1+(-1) & 2+3 \end{bmatrix}$$                  $$\begin{bmatrix} 5 & 0 \\ 0 & 5 \end{bmatrix}$$

We see that $$A + B = B + A$$

## Associative Laws

When dealing with matrices, we can apply the associative laws of addition and multiplication. This means that if we have $$A, B, C \in M_{m \times n} (\mathbb{R})$$ then:

$$1)$$ $$A + (B + C) = (A + B) + C$$

$$2)$$ $$A(BC) = (AB)C$$

 Note: $$AB \neq BA$$ and $$A(BC) \neq (BC)A$$. Matrix multiplication is not commutative!

## Distributive Law

If we are dealing with matrix multiplication combined with matrix addition, we can apply the distributive law. If $$A, B, C \in M_{m \times n} ( \mathbb{R})$$ then:

$$A(B + C) = AB + AC$$