Become a math whiz with AI Tutoring, Practice Questions & more.

Join for Free
HotmathMath Homework. Do It Faster, Learn It Better.

Matrix Multiplication

Learning how to create matrices is only the beginning as we get further into this new area of math. We can also carry out operations with matrices -- including multiplication. As we''ll soon discover, there are many important things to keep in mind when it comes to multiplication with matrices. Although it might be similar to the multiplication operations we''re already familiar with, there are a number of additional rules we must learn:

Scalar multiplication

The easiest way to multiply a matrix is through scalar multiplication. This is when we multiply a single matrix by a single number. For example, what if we wanted to multiply this matrix by 2?

[ 1 8 4 2 ]

Only four multiplications are necessary in this situation

2 × 1 = 2 , 2 × 8 = 16 , 2 × 4 = 8 , 2 × 2 = 4

These products form our resulting matrix:

[ 2 16 8 4 ]

In other words:

2 × [ 1 8 4 2 ] = [ 2 16 8 4 ]

As we can see, this process is quite simple -- and we can use the same basic arithmetic skills that we''re already familiar with.

Multiplying two matrices

Things get a little more complicated when we multiply one matrix by another matrix. This requires a different strategy, and we call this the "dot product" of rows and columns.

The "dot product" is an entire row multiplied by an entire column.

For example, we might multiply this row:

[ 1 2 4 ]

By this column:

[ 7 8 9 ]

But how exactly do we do this? Essentially, we use the same principles as scalar multiplication:

1 2 4 7 8 9

One of the most important things to remember when multiplying matrices is that it''s not the same as multiplying polynomials in an algebraic equation. We do not use the FOIL method, and the operation is not commutative. The above operation is equivalent to:

1 7 + 2 8 + 4 9 = 59

Seems pretty straightforward, right? Well, we need to do this for every row and every column for the two matrices. We start with the first row and the first column, then we move to the first row and the second column. Next, we do the second row and the first column before finally tackling the second column. We follow this same pattern regardless of how many columns and rows we have on our matrices.

We categorize our matrices based on their rows and columns. For example:

  • A 2 × 2 matrix has 2 rows and 2 columns
  • A 3 × 2 matrix has 3 rows and 2 columns

We also call a 2 × 2 matrix a "square matrix" because of its shape.

Why does this matter when we do matrix multiplication? Because we can only multiply matrices if their dimensions are compatible. Matrices are only compatible if the number of columns in the first matrix equals the number of rows in the second column.

For example, we could multiply these two matrices:

[ 1 2 3 4 5 6 1 2 3 ] × [ 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 ]

Why? Because the first matrix has three columns, and the second matrix has three rows.

But we couldn''t multiply these two matrices:

[ 4 5 5 2 ] × [ 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 ]

Why? Because the first matrix has two columns, while the second matrix has three rows. These numbers are not equal.

We can write this rule with a very specific formula:

If A = a i j is an m × n matrix and B = b i j is an n × p matrix, then the product A B is an m × p matrix.

In other words:

When we multiply one matrix m × n by another matrix n × p , the result is m × p .

Unless we''re working an identity matrix (explained later), A B cannot equal B A .

Identity matrices

We should also learn about the "identity matrix," as this concept can be very useful when multiplying matrices.

Essentially, the identity matrix is the equivalent of "1" in the world of matrices. It looks like this:

I = [ 1 0 0 0 1 0 0 0 1 ]

Note that this matrix has a number of important features:

  • It is square
  • It has ones on the main diagonal
  • Every other element is 0

As long as our identity matrix has 1s on the main diagonal and 0s everywhere else, it is still an identity matrix. It doesn''t matter whether it''s as small as a 2 × 2 matrix or as large as a 100 × 100 . As long as the 1s are along the diagonal, our identity matrix can have any number of elements. In other words, we can construct an identity matrix that fits our given matrix, no matter how many columns or rows we might need in order to facilitate a compatible multiplication.

But why is the identity matrix so special?

If the identity matrix is the equivalent of "1" in the world of matrices, this means we can multiply any matrix by the identity matrix and get exactly the same matrix we started with.

It''s the same logic as any number multiplied by 1, such as 8 1 = 8 .

Similarly, the product will be identical to the original matrix. This is useful if we need to find the inverse of a matrix, which is an important step when using matrices to solve systems of linear equations.

We can also use our identity matrix to verify whether two given matrices are inverses of each other. Identity matrices are even more handy when you consider that division operations are impossible with matrices, so finding the inverse is our only option in many cases.

We represent the identity matrix with the letter "I."

We can say that I A = A and A I = A .

This shows us that the order of our multiplication doesn''t matter when we multiply a matrix by an identity matrix. In contrast, the order does matter when we multiply two normal, non-identity matrices. This is an important concept to keep in mind since the order does not matter with normal arithmetic multiplication. Remember, multiplying matrices is similar to normal multiplication but not identical. The two notable differences are:

  • We get different results based on which matrix comes first
  • Matrix multiplication is not commutative (no FOIL method)

Multiplying larger matrices

Now that we know all about multiplying matrices, it''s time to move on to something a little more challenging. Consider the following:

[ 1 0 1 0 1 2 ] [ 3 5 -1 0 2 -1 ]

How would we multiply these two matrices? A smart starting point would be to write out our resulting matrix with variables:

[ e11 e12 e21 e22 ]

Let''s start with e11 . We know that to get e11 , we need to multiply row 1 of the first matrix by column 2 of the second matrix. We can write this as:

e11 = [ 1 0 1 ] [ 3 -1 2 ] = 1 3 + 0 -1 + 1 2 = 5

Great! Now we have our first element for our resulting matrix. e 11 = 5

Now we can do exactly the same operation to find the other three elements of our resulting matrix:

e12 = [ 1 0 1 ] [ 5 0 -1 ] = 1 5 + 0 0 + 1 -1 = 4

e 12 = 4

e21 = [ 0 1 2 ] [ 3 -1 2 ] = 0 3 + 1 -1 + 2 2 = 3

e 21 = 3

e22 = [ 0 1 2 ] [ 5 0 -1 ] = 0 5 + 1 0 + 2 -1 = -2

e 22 = -2

Now we know all our values for our resulting matrix. We can replace our variables with the results:

[ 5 4 3 -2 ]

Therefore: [ 1 0 1 0 1 2 ] [ 3 5 -1 0 2 -1 ] = [ 5 4 3 -2 ]

Topics related to the Matrix Multiplication

Compatible Matrices

Associative Property of Matrices

Matrix Row Operations

Flashcards covering the Matrix Multiplication

Linear Algebra Flashcards

Numerical Methods Flashcards

Practice tests covering the Matrix Multiplication

Linear Algebra Diagnostic Tests

Pair your student with a suitable tutor who understands how to multiply matrices

One of the most important requirements for learning how to multiply matrices is to get plenty of practice. But what if your student isn''t getting enough time to hone their skills during class time? In this case, you can have Varsity Tutors pair your student up with a suitable tutor who understands this concept in depth. Tutors can customize lesson plans based on your student''s learning style, choosing verbal techniques for verbal learners and visual techniques for visual learners. They can even use examples that match your student''s hobbies to make learning more fun and engaging. Reach out to our Educational Directors today and rest assured: Varsity Tutors will pair your student with a suitable tutor.

Subjects Near Me
Popular Cities
Popular Subjects
;
Download our free learning tools apps and test prep books
varsity tutors app storevarsity tutors google play storevarsity tutors amazon storevarsity tutors ibooks store