A word of warning: Matlab easily computes matrix products for you, but it does not do the thinking for you that you must do to understand the meaning of matrix multiplication. There may be some danger in being able to do matrix products without thinking. If, when you were first taught how to multiply numbers, you had immediately begun to do all multiplications using a calculator, you might understand the operation of multiplication less well than you do. For example, you might need to use a calculator to find the product of 70 and 30. In this first chapter, you should take the time to do the calculations by hand as well as by Matlab. You should, by all means make use of Matlab, if it is available to you, to do your matrix multiplications, but you should control the computer and not let the computer control you.
The matrix multiplications called for in the first three exercises involve only two matrices. If A and B, in that order, are the matrices in Exercise 1, then the matrix needed in Exercise 1 is A*B, in Exercise 2 is B*A, and in Exercise 3 is B*A*B.
Exercises 5-9 are examples of the kind that it is silly to use a computer for. You should do the calculations yourself to see how these matrix products work out. In Exercise 6, Matlab will tell you how to invert A if you enter A and then enter inv(A), but you will learn more if, instead, you follow the procedure suggested in (b). You may want to use inv(A) to check your answer to Exercise 9, but you should first do it without Matlab.
Exercise 10 is easier to do without Matlab and Matlab gives some wrong answers. Enter the five given matrices A, B, C, D, E and ask Matlab for each of the 25 possible products. In several cases, it will return an error message indicating that the matrix product that was requested is not meaningful. However, it is quicker (as well as more in keeping with the notion of not abandoning control to the computer) to look at each product and check whether the number of columns of the left factor is the same as the number of rows of the right one. Moreover, for very good reasons (see the footnote on page 60) Matlab obeys the convention that if B is a 1x1 matrix then AB and BA are defined for all matrices A to be the matrix obtained by multiplying all entries of A by the single entry of B. Thus, Matlab will give an answer for BA in the present case, even though, as a matrix product, BA is undefined. The only matrices that can be multiplied on the left by B are those with one row, that is, B and C, and the only ones that can be multiplied on the right by B are those with one column, that is, A, B, and E.
Exercises 11 and 12 are trivial to do when you use Matlab. Do them with pencil and paper.
If you try some explorations following up Exercise 8, you will have a head start on Chapter 2. Find a 5x5 matrix T with the property that TA, which is defined whenever A has 5 rows, is the matrix obtained by adding row 3 to row 4 of A while leaving rows 1, 2, 3, and 5 of A unchanged. Find a 6x6 matrix that adds row 3 to row 4 of a matrix A with 6 rows while leaving the other rows unchanged. Find a 4x4 matrix T such that TA, for any matrix A with 4 rows, is A with row 4 added to row 2 and all other rows unchanged. Formulate general rules.
The inverse of the operation of adding a row to another is subtraction of that row from the other. Relate this to finding the inverses of the matrices T you just found.
What are the powers of T? Relate the answer to the idea of composing T several times with itself.
If TA is, for all A with five rows, A with row 3 added to row 4, what is BT, where B is a matrix with 5 columns? Compute explicit examples. (Note that it is easiest to take B to have just one row.) Generalize the rules you have found for row additions to column additions (or subtractions).
Return to Chapter 1.