Multiplying matrices (article) | Matrices | Khan Academy (2024)

When we multiply a matrix by a scalar (i.e., a single number) we simply multiply all the matrix's terms by that scalar. We can also multiply a matrix by another matrix, but this process is more complicated. Even so, it is very beautiful and interesting. Learn how to do it with this article.

What you should be familiar with before taking this lesson

A matrix is a rectangular arrangement of numbers into rows and columns. Each number in a matrix is referred to as a matrix element or entry.

For example, matrix A has 2 rows and 3 columns. The element a2,1 is the entry in the 2nd row and the 1st column of matrix A, or 5.

If this is new to you, we recommend that you check out our intro to matrices. You should also make sure you know how to multiply a matrix by a scalar.

What you will learn in this lesson

How to find the product of two matrices. For example, find

[1724][3352]

Scalar multiplication and matrix multiplication

When we work with matrices, we refer to real numbers as scalars.

2[5231]=[25222321]=[10462]

The term scalar multiplication refers to the product of a real number and a matrix. In scalar multiplication, each entry in the matrix is multiplied by the given scalar.

In contrast, matrix multiplication refers to the product of two matrices. This is an entirely different operation. It's more complicated, but also more interesting! Let's see how it's done.

Understanding how to find the dot product of two ordered lists of numbers can help us tremendously in this quest, so let's learn about that first!

n-tuples and the dot product

We are familiar with ordered pairs, for example (2,5), and perhaps even ordered triples, for example (3,1,8).

An n-tuple is a generalization of this. It is an ordered list of n numbers.

We can find the dot product of two n-tuples of equal length by summing the products of corresponding entries.

For example, to find the dot product of two ordered pairs, we multiply the first coordinates and the second coordinates and add the results.

(2,5)(3,1)=23+51=6+5=11

Ordered n-tuples are often indicated by a variable with an arrow on top. For example, we can let a=(3,1,8) and b=(4,2,3). The expression ab indicates the dot product of these two ordered triples and can be found as follows:

ab=(3,1,8)(4,2,3)=34+12+83=12+2+24=38

Notice that the dot product of two n-tuples of equal length is always a single real number.

Check your understanding

1) Let c=(4,3) and d=(3,5).

cd=

2) Let m=(2,5,2) and n=(1,8,3).

Matrices and n-tuples

When multiplying matrices, it's useful to think of each matrix row and column as an n-tuple.

c1c2r1r2[6423]

In this matrix, row 1 is denoted r1=(6,2) and row 2 is denoted r2=(4,3).

Similarly, column 1 is denoted c1=(6,4) and column 2 is denoted c2=(2,3).

Check your understanding

c1c2c3r1r2r3[162331574]

3) Which of the following ordered triples is c2?

Choose 1 answer:

Choose 1 answer:

  • (6,3,7)

  • (3,3,1)

Matrix multiplication

We are now ready to look at an example of matrix multiplication.

Given A=[1724] and B=[3352], let's find matrix C=AB.

To help our understanding, let's label the rows in matrix A and the columns in matrix B. We can define the product matrix, matrix C, as shown below.

b1b2a1a2[1274][3532]=[a1b1a2b1a1b2a2b2]ABC

Notice that each entry in matrix C is the dot product of a row in matrix A and a column in matrix B. Specifically, the entry ci,j is the dot product of ai and bj.

For example, c1,2 is the dot product of a1 and b2.

[1274][3532]=[a1b1a2b117a2b2]

c1,2=(1,7)(3,2)=13+72=3+14=17

We can complete the dot products to find the complete product matrix:

C=[38172614]

c1,1=a1b1=(1,7)(3,5)=13+75=3+35=38c2,1=a2b1=(2,4)(3,5)=23+45=6+20=26c2,2=a2b2=(2,4)(3,2)=23+42=6+8=14

Check your understanding

4) C=[2152] and D=[1436].

Let F=CD.

a) Which of the following is f2,1?

Choose 1 answer:

Choose 1 answer:

  • 9

  • 11

  • 15

  • 32

b) Find F.

F=

5) X=[4123] and Y=[2854].

Find Z=XY.

Z=

6) M=[283541] and N=[416324].

Let P=MN.

a) Which of the following is p1,2?

Choose 1 answer:

Choose 1 answer:

  • 12

  • 27

  • 38

  • 46

b) Find P.

P=

Why is matrix multiplication defined this way?

Up until now, you may have found operations with matrices fairly intuitive. For example when you add two matrices, you add the corresponding entries.

But things do not work as you'd expect them to work with multiplication. To multiply two matrices, we cannot simply multiply the corresponding entries.

If this troubles you, we recommend that you take a look at the following articles, where you will see matrix multiplication being put to use.

  • Matrices as transformations

  • Matrix from visual representation of transformations

Multiplying matrices (article) | Matrices | Khan Academy (2024)

References

Top Articles
Latest Posts
Article information

Author: Madonna Wisozk

Last Updated:

Views: 6296

Rating: 4.8 / 5 (68 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Madonna Wisozk

Birthday: 2001-02-23

Address: 656 Gerhold Summit, Sidneyberg, FL 78179-2512

Phone: +6742282696652

Job: Customer Banking Liaison

Hobby: Flower arranging, Yo-yoing, Tai chi, Rowing, Macrame, Urban exploration, Knife making

Introduction: My name is Madonna Wisozk, I am a attractive, healthy, thoughtful, faithful, open, vivacious, zany person who loves writing and wants to share my knowledge and understanding with you.