Topics

One of the basic operations in linear algebra is matrix multiplication

There are multiple ways to interpret mat-mul apart from the rather conventional dot product of rows of with columns of .

Rows x Columns

The familiar perspective of taking dot products of rows of with columns of to obtain the product . Mathematically,

Matrix x Columns

The interpretation here is that, each column of specifies a linear combination of columns of , to produce the columns of . So, if we want to rearrange the columns of a matrix, multiply it by another matrix on the right.

Example

Find the transformation matrix that changes the sign of column of and swaps the and columns. (Note is a matrix, say)
Answer:

Rows x Matrix

can also be viewed as multiplying each row of by the matrix on the right. Multiplying a row vector by a matrix on the right produces another row vector. Each row of specifies a linear combination of rows of to produce rows of . So, if we want to rearrange the rows of a matrix, multiply it by another matrix on the left.

Example

Find the transformation matrix that adds the third row of to two times the first row and leaves other rows untouched (P.S: similar to steps done during Gaussian Elimination).
Answer:

Columns x Rows

The key to this perspective is to observe:

  • Elements in column of only multiply elements in row of .
  • A column times a row vector, sometimes denoted , is an outer product and produces a rank- matrix (as the matrix has one independent vector and others are multiples of it).
    So, from this perspective, we could write:

Example

If

and

We then have:

Thus, can be written as the sum of the corresponding column-row outer products.