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.

Main content

Properties of matrix multiplication

Learn about the properties of matrix multiplication (like the distributive property) and how they relate to real number multiplication.

Properties of matrix multiplication

In this table, A, B, and C are n, times, n matrices, I is the n, times, n identity matrix, and O is the n, times, n zero matrix
PropertyExample
The commutative property of multiplication start color #df0030, start text, d, o, e, s, space, n, o, t, space, h, o, l, d, !, end text, end color #df0030A, B, does not equal, B, A
Associative property of multiplicationleft parenthesis, A, B, right parenthesis, C, equals, A, left parenthesis, B, C, right parenthesis
Distributive properties A, left parenthesis, B, plus, C, right parenthesis, equals, A, B, plus, A, C
left parenthesis, B, plus, C, right parenthesis, A, equals, B, A, plus, C, A
Multiplicative identity property I, A, equals, A and A, I, equals, A
Multiplicative property of zeroO, A, equals, O and A, O, equals, O
Dimension propertyThe product of an m, times, n matrix and an n, times, k matrix is an m, times, k matrix.
Let's take a look at matrix multiplication and explore these properties.

What you should be familiar with before taking this lesson

In matrix multiplication, each entry in the product matrix is the dot product of a row in the first matrix and a column in the second matrix.
If this is new to you, we recommend that you check out our matrix multiplication article.
Here are other relevant articles:

Matrix multiplication is not commutative

One of the biggest differences between real number multiplication and matrix multiplication is that matrix multiplication is not commutative.
In other words, in matrix multiplication, the order in which two matrices are multiplied matters!

See for yourselves!

Let's take a look at a concrete example with the following matrices.
A=[3412]A=\left[\begin{array}{rr}{3} &4 \\ 1&2 \end{array}\right] \quad B=[6232]B=\left[\begin{array}{rr}{6} &2 \\ 3& 2 \end{array}\right]
1) Find A, B and B, A.
A, B, equals
B, A, equals

Notice that the products are not the same! Since A, B, does not equal, B, A, matrix multiplication is not commutative!
Other than this major difference, however, the properties of matrix multiplication are mostly similar to the properties of real number multiplication.

Associative property of multiplication: left parenthesis, A, B, right parenthesis, C, equals, A, left parenthesis, B, C, right parenthesis

This property states that you can change the grouping surrounding matrix multiplication.
For example, you can multiply matrix A by matrix B, and then multiply the result by matrix C, or you can multiply matrix B by matrix C, and then multiply the result by matrix A.
When using this property, be sure to pay attention to the order in which the matrices are multiplied, since we know that the commutative property does not hold for matrix multiplication!

Distributive properties

We can distribute matrices in much the same way we distribute real numbers.
  • A, left parenthesis, B, plus, C, right parenthesis, equals, A, B, plus, A, C
  • left parenthesis, B, plus, C, right parenthesis, A, equals, B, A, plus, C, A
If a matrix A is distributed from the left side, be sure that each product in the resulting sum has A on the left! Similarly, if a matrix A is distributed from the right side, be sure that each product in the resulting sum has A on the right!

Multiplicative identity property

The n, times, n identity matrix, denoted I, start subscript, n, end subscript, is a matrix with n rows and n columns. The entries on the diagonal from the upper left to the bottom right are all 1's, and all other entries are 0.
For example:
I2=[1001]I3=[100010001]I4=[1000010000100001]I_2=\left[\begin{array}{rr}{1} &0 \\ 0& 1 \end{array}\right]\quad I_3=\left[\begin{array}{rr}{1} &0 &0 \\ 0& 1&0\\0&0&1 \end{array}\right]\quad I_4=\left[\begin{array}{rr}{1} &0 &0&0 \\ 0& 1&0&0\\0&0&1&0\\0&0&0&1 \end{array}\right]
The multiplicative identity property states that the product of any n, times, n matrix A and I, start subscript, n, end subscript is always A, regardless of the order in which the multiplication was performed. In other words, A, dot, I, equals, I, dot, A, equals, A.
The role that the n, times, n identity matrix plays in matrix multiplication is similar to the role that the number 1 plays in the real number system. If a is a real number, then we know that a, dot, 1, equals, a and 1, dot, a, equals, a.

Multiplicative property of zero

A zero matrix is a matrix in which all of the entries are 0. For example, the 3, times, 3 zero matrix is O3×3=[000000000] O_{3\times 3}=\left[\begin{array}{rrr}0 & 0&0 \\ 0 & 0&0 \\ 0 & 0&0 \end{array}\right].
A zero matrix is indicated by O, and a subscript can be added to indicate the dimensions of the matrix if necessary.
The multiplicative property of zero states that the product of any n, times, n matrix and the n, times, n zero matrix is the n, times, n zero matrix. In other words, A, dot, O, equals, O, dot, A, equals, O.
The role that the n, times, n zero matrix plays in matrix multiplication is similar to the role that the number 0 plays in the real number system. If a is a real number, then we know that a, dot, 0, equals, 0 and 0, dot, a, equals, 0.

The dimension property

One property that is unique to matrices is the dimension property. This property has two parts:
  1. The product of two matrices will be defined if the number of columns in the first matrix is equal to the number of rows in the second matrix.
  2. If the product is defined, the resulting matrix will have the same number of rows as the first matrix and the same number of columns as the second matrix.
For example, if A is a start color #11accd, 3, end color #11accd, times, start color #ed5fa6, 2, end color #ed5fa6 matrix and if B is a start color #ed5fa6, 2, end color #ed5fa6, times, start color #e07d10, 4, end color #e07d10 matrix, the dimension property tells us:
  • The product A, B is defined.
  • A, B will be a start color #11accd, 3, end color #11accd, times, start color #e07d10, 4, end color #e07d10 matrix.

Check your understanding

Now that you are familiar with matrix multiplication and its properties, let's see if you can use them to determine equivalent matrix expressions.
For the problems below, let A, B, and C be 2, times, 2 matrices and let O be the 2, times, 2 zero matrix.
2) Which of the following expressions are equivalent to A, left parenthesis, B, plus, C, right parenthesis?
Choose all answers that apply:
Choose all answers that apply:

3) Which of the following expressions are equivalent to I, start subscript, 2, end subscript, left parenthesis, A, B, right parenthesis?
Choose all answers that apply:
Choose all answers that apply:

4) Which of the following expressions are equivalent to O, left parenthesis, A, plus, B, right parenthesis?
Choose all answers that apply:
Choose all answers that apply:

Want to join the conversation?

  • leafers seedling style avatar for user Pedro Santos
    The last exercise (exercise 4), says that 0(A+B) and (A+B)0 give us 0.
    But, both final results (the two 0) won't have the same dimensions right?
    Because it is not commutative, so: 0(A+B) is not equal to (A+B)0

    Am I right? I hope my question was clear
    (29 votes)
    Default Khan Academy avatar avatar for user
    • female robot grace style avatar for user hellenac17
      To answer your question: O(A+B) and (A+B)O are both 2x2 zero matrices.

      According to the statement (after "Check your understanding" ), A and B are 2x2 matrices and O represents a zero matrix with dimensions 2x2 as well. Given this information, (A+B) represents also a 2x2 matrix.
      Based on the previous statements, O(A+B) and (A+B)O will both result in a zero matrix with dimensions 2x2. Since a multiplication of a 2x2 matrix by a 2x2 matrix, will as well result on a 2x2 matrix.
      (8 votes)
  • blobby green style avatar for user bluefirefighter9019
    Hi, everyone.

    In the second challenge question, which is given as follows:

    2) Which of the following expressions are equivalent to A(B+C)?
    Select all that apply.

    Selecting i): AB+AC, & ii):A(C+B) will mark the answers right, but selecting " (B+C)A " is wrong? I think it should be right as well, that is, there are overall three answers.

    My logic is this that, first we should add 'B' and 'C' and then multiply it by A. We did so in A(C+B), since addition is commutative, ( C+B=B+C ).

    So, therefore A(C+B)=(B+C)A, right? I often do this in my Maths book:

    (x+a)(x+b)
    =x(x+b)+a(x+b)
    =x^2+xb+xa+ab
    =x^2+(b+a)x+ab

    Thanks for reading and you time.
    (5 votes)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user Alex
    I still don't get the whole point in making a matrix full of zeros. Isn't it it redundant? Shouldn't the best and easiest way to multiply a matrix to get 0, be to just use the scalar quantity 0 rather than a matrix full of zeros?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Alizay Hayder
    in the following question which is
    Which of the following expressions are equivalent to I2 (AB)
    Option
    ​AB and (AB) I2 were correct i get why AB is correct, however, i m a bit doubtful about the second option for instance if I 2 is a 2 * 2 matrix and A is 2*3 while B is 3*4 well then AB would be 2*4 so I2 ( AB) would be defined but (AB) I2 wouldnt be possible. BTW i dont know what I2 really means but what i have understood after goin through the lecture is that I 2 means identity matrix with 2 rows and 2 columns
    (2 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user shagullreader
    what is the union and intersection of two matrices?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • leaf red style avatar for user Icedlatte
    in Q2 of "check your understanding it says:
    Which of the following expressions are equivalent to A(B+C)?

    Why is (B+C)A wrong?
    (0 votes)
    Default Khan Academy avatar avatar for user
    • ohnoes default style avatar for user Robert Stone
      Because it is matrix multipliation and you are multiplying rows with columns. Because of that, changing the order changes which numbers get multiplied. Try it out yourself. Take two 2x2 matrices like:
      [ 1 2 ]   [ 5 6 ]
      [ 3 4 ] [ 7 8 ]

      And do the dot product, then swap them and do the dot product.
      (4 votes)
  • blobby green style avatar for user Cameron Milinkovic
    In question 2(d), is (B + C)A wrong because it would end up being BA + CA? I'm used to being able to switch around the order of scalars. The side on which it A is matters even when the terms its multiplying into are in parentheses?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • aqualine ultimate style avatar for user John He
    I remember when a real number times its inverse,will get 1.How to find inverse of a matrix?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • leaf grey style avatar for user Max Duan
    All of the zero matrices and identity matrices I've seen here are n times n matrices. Is there any m times n zero matrix or m times n identity matrix ?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • mr pants teal style avatar for user kiwimaniac2014
      An identity matrix would seem like it would have to be square. That is the only way to always have 1's on a diagonal- which is absolutely essential. However, a zero matrix could me mxn. Say you have O which is a 3x2 matrix, and multiply it times A, a 2x3 matrix. That is defined, and would give you a 3x3 O matrix.
      (1 vote)
  • piceratops seed style avatar for user gmwhebner
    (my plus sign isn't working. sorry in advance.)

    If matrix addition is commutative does that mean that matrix addition and subtraction are two different functions? Up until now I have been taught properties of addition AND subtraction, multiplication AND division, and so on. Here is my work.

    A= [-2 3] B= [3 -7]

    A (plus) B = [1 -4]
    B (plus) A = [1 -4]

    A - B = [-5 10]
    B - A = [5 -10]

    There is clearly a relation because the answer is the inverse but they're still not the same matrices.
    (1 vote)
    Default Khan Academy avatar avatar for user