Exercise 1.4.2. Multiply the matrices below:

Work by columns instead of by rows.

Answer: The first example multiplies a 3×2 matrix by a 2×1 matrix (column vector), producing a 3×1 matrix (column vector). Working by rows gives us the following:

Working by columns is done as follows:

For the second example we’re multiplying a 3×3 matrix times a 3×1 matrix to produce a 3×1 matrix (column vector). Working by rows gives us the following:

Working by columns is done as follows:

Note that this is a special case of the general case that multiplying an nxn matrix by a column vector of the form (0, …, 0, 1, 0, …, 0) (where the jth entry is 1 and the others zero) produces a column vector corresponding to the jth column of the matrix.

The third example multiplies a 3×2 matrix by a 2×1 matrix to form a 3×1 matrix. Working by rows gives us the following:

Working by columns is done as follows:

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition, Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books.