Consider a matrix and a vector .
where, are columns of matrix .
There are several ways we can interpret the Matrix vector multiplication.
Linear Combination of Columns of Matrix
A way to express it is scaling the columns of with the elements of vector .
This can be written in a much more compact form as follows:
This is nothing but a linear combination of the columns of matrix .
Functional Transformation Perspective
We can interpret the matrix-vector multiplication through the lens of functions.
Consider a function and the matrix-vector multiplication can be thought of as the following transformation:
To put it into words, we are plugging in a vector which results in applying a transformation defined by a matrix . The result of the transformation is another vector in . This can be further interpreted as a mapping between two vector spaces; from to .
Note that this holds true for also.
Most of the time we do not separate out the input space and the output space of the function but superimpose them in a single plot. This allows us to visualize the transformation in a single plot.
Now what kind of transformation would it be depends on the nature of the matrix. Visualization and intuition behind these transformations are explained in detail in Matrix Multiplication as Transformation.
Another important thing to mention here, these transformations require one specific property which is the function needs to be linear. In other words, these transformations need to hold the Linearity property.
Establishing the relation with elementary basis vectors
Rather than thinking about the matrix transforming the vector , we can think about it from another perspective. To do this we need to decompose the vector into elementary basis vectors.
where, are the elementary basis vectors.
For better understanding let’s write out the expression more explicitly,
Visualize this as decomposing the vector into it’s elementary basis vectors. Each elementary basis vector is getting scaled by , and summed up to form the vector .
Now, when we multiply the matrix with the vector , what actually gets transformed is the “elementary basis vectors”. Let’s see it mathematically
Note from going to the first line to the second line requires a strong assumption which is Linearity.
Think of as just applying the transformation defined by matrix to the elementary basis vector . But notice what happens when we actually go through the computation:
We are just pulling out the corresponding column (index of ) of the matrix . And, we get back the first perspective of the matrix-vector multiplication i.e. linear combination of columns of a matrix.
How to Interpret a Matrix
The columns of matrix specify where elementary basis vectors will end up after transformation.
Here, we specifying will be transformed to
Inner Product Perspective
For this perspective we need to express the matrix as follows:
Considering this, the matrix-vector multiplication can be expressed as the following:
Side Note:
In the following discussion, I violated the rule of always considering vectors as column vectors.
Just as a caution, you have to be careful how you write out the matrix . If it is written in the following form,
Here, , are written in row vector format. In this case, for matrix vector multiplication we need to write the inner product explicitly as follows:
References
- Gundersen, Gregory. Matrices as Functions, Matrices as Data. 28 Aug. 2022, gregorygundersen.com/blog/2022/08/28/matrices-as-functions-and-data/.
- Bernstein, Matthew. Matrix-vector multiplication. 19 Dec. 2020, mbernste.github.io/posts/matrix_vector_mult.