# XXVII.  Matrix Mathematics

There are entire courses taught on Matrix Mathematics.  Not because it is that difficult, but because there is so much these things can do to solve problems.  They are used for computer graphics, science, optics, electrical properties, probability, calculus, and engineering - to name a few.

These are going to be fairly simple problems.  So, at times, you may think this is a pretty long way of doing things.  We pretty much have to start simple, and work our way up.  Believe me, as we move forward it will make more sense.

I'm going to attempt to scratch the surface with my explanation of how to use matrices.  Until I get a chance to expand this information - it has been scaled to an Algebra 1 level. ## What exactly is a Matrix Mathematics?

According to Dictionary.com  matrix mathematics is a rectangular array of numeric or algebraic quantities subject to mathematical operations.

They are described by the number of columns and rows they contain.  Just to make things difficult, a 3 x 2 has 3 rows and 2 columns.  Yes, we always say columns and rows - but we name it with rows x columns.  I'm against it - but like with so many things, nobody asked me.

ROWS X COLUMNS

I'm going on and on about it, because a lot of my students had trouble remembering.

Let's say an ice cream shop in Bobtown sold the following percentages of ice cream to men and women.

### ICE CREAM

CHOCOLATE VANILLA STRAWBERRY
Men 40 50 10
Women 30 40 30

If we wanted to convert the above data we could do it, as follows:

C    V     S

Men        40   50   10

Women   30  40   30

This is a 2  x 3.  We could also make it a 3 x 2 if we wanted the flavors as the Row headings and the gender as the column heading.

## Adding

During the same period of time, the people in Bobville sold ice cream in these percentages.

### ICE CREAM

CHOCOLATE VANILLA STRAWBERRY
Men 20 10 70
Women 15 0 85

If we wanted to add the two shops together and get the combined totals of ice cream flavor demand according to gender, we would use the following formula.

\begin{equation*} \begin{bmatrix} 40 & 50 & 10\\ 30 & 40 & 30 \end{bmatrix} + \begin{bmatrix} 20 & 10 & 70\\ 15 & 0 & 85 \end{bmatrix} = \begin{bmatrix} 40+20 & 50+10 & 10+70\\ 30+15 & 40+0 & 30+85 \end{bmatrix} = \begin{bmatrix} 60 & 60 & 80\\ 45 & 40 & 115 \end{bmatrix} \end{equation*}

Note that I added the first element in the first row of the first one to the first element in the first row of the second.  Hopefully, you see the pattern.

## Subtracting

Nothing surprising here, we'll use the same numbers only this time, we'll subtract.

\begin{equation*} \begin{bmatrix} 40 & 50 & 10\\ 30 & 40 & 30 \end{bmatrix} - \begin{bmatrix} 20 & 10 & 70\\ 15 & 0 & 85 \end{bmatrix} = \begin{bmatrix} 40-20 & 50-10 & 10-70\\ 30-15 & 40-0 & 30-85 \end{bmatrix} = \begin{bmatrix} 20 & 40 & -60\\ 15 & 40 & -55 \end{bmatrix} \end{equation*}

Why?  Why would I subtract?  Well, it may not fit the ice cream shop scenario as well as it would others.  But, you might just want to know how much the shops differ.  Obviously Bobtown and Bobville have very different opinions concerning Strawberry ice cream.

## Scalar Multiplication

Scalar is another of those math terms that sound a lot more impressive than they are.  It basically means that we are building proportionately along a line in one direction or another.

Let's take our earlier example and multiply it by 4.

\begin{equation*} 4* \begin{bmatrix} 40 & 50 & 10\\ 30 & 40 & 30 \end{bmatrix} = \begin{bmatrix} 4*40 & 4*50 & 4*10\\ 4*30 & 4*40 & 4*30 \end{bmatrix} = \begin{bmatrix} 160 & 200 & 40\\ 120 & 160 & 120 \end{bmatrix} \end{equation*}

Hopefully, that makes sense.  Remember, I'm using the * symbol for multiplication.

## Multiplying one matrix times another

In matrix mathematics, multiplying one matrix times another is a bit complicated and we will cover it in more detail in Algebra 2.  This area is primarily for Algebra 1.  But - what the heck, let's talk a bit about Multiplying 3x3 matrices, as it's actually a fairly straight forward part of matrix mathematics..

\begin{equation*} \begin{bmatrix} 1 & 2 & 3\\ 4 & 5 & 6\\ 7 & 8 & 9 \end{bmatrix} * \begin{bmatrix} 10 & 20 & 30\\ 40 & 50 & 60\\ 70 & 80 & 90 \end{bmatrix} = \begin{bmatrix} 1*10+2*40+3*70&1*20+2*50+3*80&1*30+2*60+3*90\\ 4*10+5*40+6*70&4*20+5*50+6*80&4*30+5*60+6*90\\ 7*10+8*40+9*70&7*20+8*50+9*80&7*30+8*60+9*90 \end{bmatrix} \end{equation*}

Pretty isn't it?  No really, considering what little I know about html - being able to draw a matrix is a major accomplishment for me.

It is important to note that matrix multiplication is not commutative.  So, multiplying the first matrix times the second is not the same as multiplying the second matrix times the first.

At the risk of pointing out the obvious.  Notice that the first matrix is the numbers from 1 to 9 and the second 10 through 90.  The pattern is then each element in the first row times each element in the first column.  Each element in the second row times each element in the second column...

## Dividing two matrices

Well, now we're getting into some kind of difficult matrix mathematics territory.  To divide two matrices we need to find the inverse of the first matrices and multiply it times the second.  There are a couple of ways to figure the inverse, one of my favorites is using determinants - which is no giant deal, but I prefer to wait until Algebra II to go into it in detail.

III. Algebra

VI  Equations

VII. Exponents

IX Fractions

XIII.  Linear Equations

XVII.  Real Numbers

XIV.  Math Terms

XVIII.  Percentages

XV.  Matrices

XIX.  PEMDAS Order of Operations

XXII. Slope

XXIII,  Quadratics

, Matrix