Understanding math will make you a better engineer.
So, I am writing the best and most comprehensive book about it.
There is more than one way to think about matrix multiplication. Just by looking at the definition
⎣⎡a11⋮an1…⋱…a1n⋮ann⎦⎤⎣⎡b11⋮bn1…⋱…b1n⋮bnn⎦⎤=⎣⎡∑i=1na1ibi1⋮∑i=1nanibi1…⋱…∑i=1na1ibin⋮∑i=1nanibin⎦⎤,
matrix multiplication is not easy to understand. However, there are multiple ways of looking at it, each one revealing invaluable insights.
Let's take a look at them! First, let's unravel the definition and visualize what happens.
For instance, the element in the 2nd row and 1st column of the product matrix is created from the 2nd row of the left and 1st column of the right matrices by summing their elementwise product.
To move beyond the definition, first, we introduce some notations. A matrix is built from rows and vectors, each of which can be viewed as individual vectors. You can think of them as a horizontal stack of column vectors or a vertical stack of row vectors:
where ai represents the rows and ai represent the columns.
Matrix multiplication as the mixture of column vectors
Now, let's start by multiplying a matrix and a row vector.
By writing out the definition, it turns out that the product is just a linear combination of the columns, where the coefficients are determined by the vector we are multiplying with!
Taking this one step further, we can stack another vector.
This way, we can see that the product of an n×n and an n×2 matrix equals the product of the left matrix and the columns of the right matrix, horizontally stacked:
Applying the same logic, we can finally see that the product matrix is nothing else than the left matrix times the columns of the right matrix, horizontally stacked. This is an extremely powerful way of thinking about matrix multiplication:
When studying matrices, each of them is immensely useful.
Having a deep understanding of math will make you a better engineer.
I want to help you with this, so I am writing a comprehensive book that takes you from high school math to the advanced stuff. Join me on this journey and let's do this together!