Paul's Online Math Notes
     
 
Online Notes / Linear Algebra / Systems of Equations and Matrices / Matrix Operations & Operations
Linear Algebra

You can navigate through this E-Book using the menu to the left. For E-Books that have a Chapter/Section organization each option in the menu to the left indicates a chapter and will open a menu showing the sections in that chapter. Alternatively, you can navigate to the next/previous section or chapter by clicking the links in the boxes at the very top and bottom of the material.

Also, depending upon the E-Book, it will be possible to download the complete E-Book, the chapter containing the current section and/or the current section. You can do this be clicking on the E-Book, Chapter, and/or the Section link provided below.

For those pages with mathematics on them you can, in most cases, enlarge the mathematics portion by clicking on the equation. Click the enlarged version to hide it.

One of the biggest impediments that some people have in learning about matrices for the first time is trying to take everything that they know about arithmetic of real numbers and translate that over to matrices.  As you will eventually see much of what you know about arithmetic of real numbers will also be true here, but there is also a few ideas/facts that will no longer hold here.  To make matters worse there are some rules of arithmetic of real numbers that will work occasionally with matrices but won’t work in general.  So, keep this in mind as you go through the next couple of sections and don’t be too surprised when something doesn’t quite work out as you expect it to.

 

This section is devoted mostly to developing the arithmetic of matrices as well as introducing a couple of operations on matrices that don’t really have an equivalent operation in real numbers.  We will see some of the differences between arithmetic of real numbers and matrices mentioned above in this section.  We will also see more of them in the next section when we delve into the properties of matrix arithmetic in more detail.

 

Okay, let’s start off matrix arithmetic by defining just what we mean when we say that two matrices are equal.

 

Definition 1 If A and B are both  matrices then we say that A = B provided corresponding entries from each matrix are equal.  Or in other words, A = B provided  for all i and j.

 

Matrices of different sizes cannot be equal.

 

Example 1  Consider the following matrices.

                        

For these matrices we have that  and  since they are different sizes and so can’t be equal.  The fact that C is essentially the first column of both A and B is not important to determining equality in this case.  The size of the two matrices is the first thing we should look at in determining equality.

 

Next, A = B provided we have .  If  then we will have .

 

Next we need to move on to addition and subtraction of two matrices.

 

Definition 2 If A and B are both  matrices then  is a new  matrix that is found by adding/subtracting corresponding entries from each matrix.  Or in other words,

                                                           

 

Matrices of different sizes cannot be added or subtracted.

 

Example 2  For the following matrices perform the indicated operation, if possible.

          

(a)  

(b)  

(c)  

 

Solution

(a) Both A and B are the same size and so we know the addition can be done in this case. Once we know the addition can be done there really isn’t all that much to do here other than to just add the corresponding entries here to get the results.

.

                                               

(b) Again, since A and B are the same size we can do the difference and as like the previous part there really isn’t all that much to do.  All that we need to be careful with is the order.  Just like with real number arithmetic  is different from .  So, in this case we’ll subtract the entries of A from the entries of B.

                                                   

(c) In this case because A and C are different sizes the addition can’t be done.  Likewise, , , . , and  can’t be done for the same reason.

 

We now need to move into multiplication involving matrices.  However, there are actually two kinds of multiplication to look at : Scalar Multiplication and Matrix Multiplication.  Let’s start with scalar multiplication.

 

Definition 3 If A is any matrix and c is any number then the product (or scalar multiple), cA, is a new matrix of the same size as A and it’s entries are found by multiplying the original entries of A by c.  In other words  for all i and j.

 

Note that in the field of Linear Algebra a number is often called a scalar and hence the name scalar multiple since we are multiplying a matrix by a scalar (number).  From this point on we will generally call numbers scalars.

 

Before doing an example we need to get another quick definition out of the way.  If  are all matrices of the same size and  are scalars then the linear combination of  with coefficients  is,

 

 

 

This may seem like a silly thing to define but we’ll be using linear combination in quite a few places in this class and so we need to get used to seeing them.

 

Example 3  Given the matrices

                          

compute .

Solution

So, we’re really being asked to compute a linear combination here.  We’ll do that by first computing the scalar multiplies and the performing the addition and subtraction.  Note as well that in the case of the third scalar multiple we are going to consider the scalar to be a positive  and leave the minus sign out in front of the matrix.  Here is the work for this problem.

                    

 

We now need to move into matrix multiplication, however before we do the general case let’s look at a special case first since this will help with the general case.

 

Suppose that we have the following two matrices,

 

 

So, a is a row matrix and b is a column matrix and they have the same number of entries.  Then the product of a and b is defined to be,

 

 

 

It is important to note that this product can only be done if a and b have the same number of entries.  If they have a different number of entries then this product is not defined.

 

Example 4  Compute ab given that,

                                          

Solution

There is not really a whole lot to do here other than use the definition given above.

                                          

 

Now let’s move onto general matrix multiplication.

 

 

Definition 4 If A is an  matrix and B is a  matrix then the product (or matrix multiplication) is a new matrix with size  whose ijth entry is found by multiplying row i of A times column j of B

 

So, just like with addition and subtraction, we need to be careful with the sizes of the two matrices we’re dealing with.  However, with multiplication we need to be a little more careful.  This definition tells us that the product AB is only defined if A (i.e. the first matrix listed in the product) has the same number of columns as B (i.e. the second matrix listed in the product) has rows.  If the number of columns of the first matrix listed is not the same as the number of rows of the second matrix listed then the product is not defined.

 

An easy way to check that a product is defined is to write down the two matrices in the order that we want to multiply them and underneath them write down the sizes as shown below.

 

 

If the two inner numbers are equal then the product is defined and the size of the product will be given by the outside numbers.

 

Example 5  Compute  and  for the following two matrices, if possible.

                                  

Solution

Okay, let’s first do .  Here are the sizes for A and C.

                                                        

So, the two inner numbers (4 and 4) are the same and so the multiplication can be done and we can see that the new size of the matrix is .  Now, let’s actually do the multiplication.  We’ll go through the first couple of entries in the product in detail and then do the remaining entries a little quicker.

 

To get the number in the first row and first column of AC we’ll multiply the first row of A by the first column of B as follows,

                                        

 

If we next want the entry in the first row and second column of AC we’ll multiply the first row of A by the second column of B as follows,

                                       

 

Okay, at this point, let’s stop and insert these into the product so we can make sure that we’ve got our bearings.  Here’s the product so far,

                            

 

As we can see we’ve got four entries left to compute.  For these we’ll give the row and column multiplications but leave it to you to make sure we used the correct row/column and put the result in the correct place.  Here’s the remaining work.

                                      

 

Here is the completed product.