# Multiplication With Matrices

Matrix multiplication is a bit more difficult, but not much.
Instead of multiplying number by number as in addition of subtraction you multiply the rows of the matrix on the left side of the equation by the columns in the matrix on the right side of the equation.

If we have the two matrices:

```æA Bö and æC Dö
èa bø     èc dø```

Then we start of by taking the first row in the first matrix:

```æA Bö * æC Dö
èa bø   èc dø
```

And multiply it to the second matrix first column

```æA Bö * æC Dö
èa bø   èc dø
```

To make the multiplication easier you take the columns of the second matrix and turn them so that the highest number becomes the number on the left side. And the lowest number becomes the number on the right side:

```æCö -> (C c)
ècø
```

Now you can just multiply them usually number by number:
(A B) * (C c) = (AC Bc)

And in matrix multiplication, when you take these rows times the columns you add the factors together:
(A B) * (C c) = (AC+Bc)

Then you still have the second row in the first matrix and the second column in the second matrice left. But don’t touch the first matrix second row just yet!. Each row in the first matrix has to get multiplied, in the same fashion as above, by each column in the second matrix(it might sound confusing). So first we take the same row as before in the first matrix:

```æA Bö * æC Dö
èa bø   èc dø
```

And multiply it to the second matrix second column:

```æA Bö * æC Dö
èa bø   èc dø  Which if we use the same method as above becomes:
(a b) * (D d) = (aD+bd)

Now we no longer have any columns left in the second matrix. So
therefore we should start over with the first matrix second row.
But first, since the multiplications we preformed above,
was to the same row in the first matrix, we have to combine them
into the same row in the final matrix that we get after multiplication:

And then we can start over with the second row in the first matrix. And multiply it first to the first column in the second matrix and then moving on the second column:

```æA Bö * æC Dö
èa bø   èc dø
```

(a b) * (C c) = (aC+bc)

```æA Bö * æC Dö
èa bø   èc dø
```

(a b) * (D d) = (aD+bd)

And then combine the two results:

`(AC+Bc aD+bd) = æAC+aB aD+bdö(aC+bc aD+bd)   èaC+bc aD+bdø`