matrix multiplication is something weāve all done at some point.
while some of yāall still do stuff that require matrix multiplication, most of yāall donāt
none the less if youāre reading this youāre curious why we do

answering that would need some digging into the concept of matrix(s)
spoiler: it's really intuitive once you remember that matrices represent something
hereās a video version of this blog post https://youtu.be/hVZD4OvlV3w
what does a matrix represent?
a matrix is a 2d tensor
a tensor is an n-dimentional array that holds different values for different parameters of the array
pretty sure that definition doesnāt help but think of a matrix to be an *excel/SQL table*
letās take an example: list of items in my bag, converting that from a table to a matrix would look like:

this is technically an array, but to make this a matrix, letās add one dimension i.e, parameter to the array

ohh this is the computer science representation of a matrix by the way
the math representation is pretty straight forward, remove the tables and draw those brackets š

what about matrix multiplication?
just remembering that the matrix represents something and performing normal multiplication keeping in mind the parameters should make you intuitively perform that pattern
donāt believe em?? letās run through an example
hereās the distances Suraj and Arjun travelled in the months of jan, feb and march and hereās the petrol prizes for the months

now calculate the total money spent on petrol by both Suraj and Arjun without thinking about matrices

now try with the matrix multiplication method

this is also why the inner dimensions have to match, i,e they have to be the same parameters to make sense in terms of what we are multiplying

@ is the symbol for matrix multiplication in python
and why the shape of the result is the outer dimension
until next time !ļø ā
or you could spot me in the wild š¤ i mean instagram, twitter, linkedin and maybe even youtube where i may make video versions of these blog posts