If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Algebra (all content)>Unit 20

Lesson 8: Multiplying matrices by matrices

# Intro to matrix multiplication

Sal explains what it means to multiply two matrices, and gives an example. Created by Sal Khan.

## Want to join the conversation?

• How do you multiply two matrix with different dimensions?
• At he says we might have thought that we could do it just as addition but we multiply matrices in a different way.Why?Why can't we just multiply each like addition?
• 5 years late :) But just in case someone looks at this question. What Suraj P is suggesting is called the Hadamard product (https://en.wikipedia.org/wiki/Hadamard_product_(matrices). The reason why normal matrix product is defined as it is follows by thinking about matrice as a transformation. I.e. multiplying x by matrix A transforms it to Ax.
• Where can I find a video on powers of a matrix, like how to solve [A]^8?
Is there a video on the Cayley-Hamilton method?
• What is the intuition behind defining matrix multiplication this way?
• Matrix multiplication is defined in such a way that it will be practically useful. This method is the most useful, hence it was adopted. You will see its applications in finding solutions of equations, among many others. That is the main concept for which matrix multiplication was developed.
• What is the real world meaning of multiplying matrices?
• Electronics networks, airplane and spacecraft, and in chemical engineering all require perfectly calibrated computations which are obtained from matrix transformations and multiplication
(1 vote)
• My question is quite a bit more complex than what we are discussing right here...
`How to you graph a matrix? And is it possible to find a matrix from a graph?`
• A graph represents a single function, from x onto y. A matrix holds a lot more information than that. Matrices perform transformations on the entire space they act upon, so I'm not particularly sure what you mean by graphing a matrix.
• So when multiplying matrices the product matrix size will come out as the smallest row size by the smallest column size?
• Not necessarily. To multiply matrices they need to be in a certain order. If you had matrix 1 with dimensions axb and matrix 2 with cxd then it depends on what order you multiply them. Kind of like subtraction where 2-3 = -1 but 3-2=1, it changes the answer.

So if you did matrix 1 times matrix 2 then b must equal c in dimensions.

so if one matrix had dimensions 2x3 and the second had 3x5 you could multiply matrix 1 by matrix 2, but not atri 2 by matrix 1

if matrix 1 had dmensions 1x6 and matrix 2 had 2x1 you could only multiply matrix 2 by matrix 1.

The only matrices you can swap the order of is square matrices

Then, when you multiply matrices the dimensions of the matrix product is the left over dimensions.

so if you did matrix 1 times matrix 2, and matrix 1 was an axb matrix and matrix 2 was a bxc matrix, the new matrix would have dimensions axc

Let me know if that did not help though.

a 2x3 multiplied by a 3x5 matrix would have a product with 2x5
• How would you multiply 3x3 matrices?
• Multiply the first row's entries of the first matrix by the first column's entries, add it together, and repeat for all 9 places
• Is this multiplication convention somehow connected to that matrices seem, in a way, 2 dimensional, when compared to the regular (1 dimensional, linear) equations? Is this resembling a calculation of [Length]*[Width]? Got that idea when Sal mentioned matrices are used extensively in the graphics territory.
• I'm not sure I follow the line of thought with matrices being 2 dimensional. Matrix arithmetic is actually based in vector arithmetic, though vectors are kinda matrices with just one column. I'm not sure how familiar you are with vectors, but you can think of them as a line segment in space, then multiplying by certain matrices actually transforms it just like adusting a function would. so f(x)+1 moves a function up one, there is a matrix you would multiply a vector by t do the same thing.

Now, if you did multiple transformations you would multiply each matrix together, and in the end multiply this new matrix made by multiplying all the others by the vector and it would have all the transformations happen to that vector.

Let me know if that doesn't make sense and I can try explaining another way.