Why matrix multiplication works




















The result is the dot product read more. In other words, we've applied the data to itself. The result is a grid where we've applied each function to each data point. Here, we've mixed the data with itself in every possible permutation. I think of xx as x x. It's the "function x" working on the "vector x". This helps compute the covariance matrix , a measure of self-similarity in the data.

How does this help us? When we see an equation like this from the Machine Learning class :. I now have an instant feel of what's happening. This should give us a single value. More complex derivations like this:. In some cases it gets tricky because we store the data as rows not columns in the matrix, but now I have much better tools to follow along.

You can start estimating when you'll get a single value, or when you'll get a "permutation grid" as a result. Geometric scaling and linear composition have their place, but here I want to think about information. Long story short, don't get locked into a single intuition.

Multiplication evolved from repeated addition, to scaling decimals , to rotations imaginary numbers , to "applying" one number to another integrals , and so on. Why not the same for matrix multiplication? You may be curious why we can't use the other combinations, like x x or x' x'. Simply put, the parameters don't line up: we'd have functions expecting 3 inputs only being passed a single parameter, or functions expecting single inputs getting passed 3.

We define an anonymous function of 3 arguments, and immediately pass it 3 parameters. Remember that [3 4 5] is the function and [3; 4; 5] or [3 4 5]' is how we'd write the data vector. I wanted to explain to myself — in plain English — why we wanted x' x and not the reverse. What is the intuitive way of thinking about multiplication of matrices?

Jeel Shah 8, 17 17 gold badges 69 69 silver badges bronze badges. Happy Mittal Happy Mittal 2, 4 4 gold badges 22 22 silver badges 30 30 bronze badges. Show 8 more comments. Active Oldest Votes. Searke Searke 1, 1 1 gold badge 10 10 silver badges 8 8 bronze badges. Textbooks which only give the definition in terms of coordinates, without at least mentioning the connection with composition of linear maps, such as my first textbook on linear algebra!

It may save you a good amount of time. If there isn't an identity, you get a representation as composition, but it might not be faithful. Add a comment. Under elementwise multiplication, we have commutativity. This operation is independent of how you define or "redefine" multiplication. The second multiplication is componentwise but the inverse and first multiplication is still the usual one. The following is covered in a text on linear algebra such as Hoffman-Kunze : This makes most sense in the context of vector spaces over a field.

Eivind Dahl Eivind Dahl 1, 9 9 silver badges 15 15 bronze badges. You could also watch the matrices work on Mona step by step too, to help your intuition. Glorfindel 3, 10 10 gold badges 22 22 silver badges 36 36 bronze badges.

Then, think on a Matrix, multiplicated by a vector. The Matrix is a "vector of vectors". Finally, Matrix X Matrix extends the former concept. Herman Junge Herman Junge 1 1 silver badge 4 4 bronze badges. Now explained enough though. It is a similar way to how Gilbert Strang 'builds' up matrix multiplication in his video lectures.

Martin Sleziak Martin Sleziak But you already said it all. Michael Hardy Michael Hardy 1. This meta question , and those cited therein, is a good discussion of the concerns. As linear algebra is really about linear systems so this answer fits in with that definition of linear algebra. If you wish to explain this I'd really appreciate. The same is true of the numbers you mention. Show 1 more comment. So that is one way of getting the 'meaning' of matrix multiplication.

Mitch Mitch 8, 2 2 gold badges 33 33 silver badges 67 67 bronze badges. John B 15k 9 9 gold badges 21 21 silver badges 49 49 bronze badges. MichaelChirico 3, 13 13 silver badges 28 28 bronze badges. That is how matrices and matrix multiplication can be discovered. Nathan Petrangelo Nathan Petrangelo 11 1 1 bronze badge.

Nikhil Chilwant Nikhil Chilwant 5 5 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Just as with adding matrices, the sizes of the matrices matter when we are multiplying.

For matrix multiplication to work, the columns of the second matrix have to have the same number of entries as do the rows of the first matrix. If, using the above matrices, B had had only two rows, its columns would have been too short to multiply against the rows of A. Then " AB " would not have existed; the product would have been "undefined". Likewise, if B had had, say, four rows, or alternatively if A had had two or four columns, then AB would not have existed, because A and B would not have been the right sizes.

In other words, for AB to exist that is, for the very process of matrix multiplication to be able to function sensibly , A must have the same number of columns as B has rows; looking at the matrices, the rows of A must be the same length as the columns of B. You can use this fact to check quickly whether a given multiplication is defined. Write the product in terms of the matrix dimensions.

The middle values match:.



0コメント

  • 1000 / 1000