Multiplying Matrices

The Organic Chemistry Tutor
17 Feb 201817:40

Summary

TLDRThis video tutorial delves into the concept of matrix multiplication, emphasizing the importance of order and demonstrating how it affects the resulting matrix's dimensions. It illustrates the process using two examples, first with 1x3 and 3x1 matrices to produce a 1x1 matrix, and then with 2x3 and 3x4 matrices to yield a 2x4 matrix. The video clarifies that matrix multiplication is not commutative, meaning AB ≠ BA, and guides viewers through the step-by-step calculation, reinforcing the rules with practical examples.

Takeaways

  • 📚 Matrix multiplication is a process where you multiply the elements of rows from the first matrix by the elements of columns from the second matrix and sum the products.
  • 🔄 The order of matrix multiplication matters; AB and BA are not necessarily the same due to the requirement of matching the number of columns in the first matrix with the number of rows in the second.
  • 🔢 The order of a matrix is expressed as rows by columns, and it's essential for determining if two matrices can be multiplied and what the resulting matrix's order will be.
  • 📏 For matrix A (1x3) and matrix B (3x1), the product AB is a 1x1 matrix, while BA is not possible because the number of columns in A does not match the number of rows in B.
  • 🤔 When multiplying matrices, ensure the number of columns in the first matrix equals the number of rows in the second matrix to perform the operation.
  • 📝 The resulting matrix's order from the multiplication of two matrices is the product of the first matrix's rows and the second matrix's columns.
  • 🧩 In the example given, multiplying matrix A (1x3) by matrix B (3x1) results in a single element (-4), demonstrating a 1x1 matrix.
  • 🔍 For matrix B (3x1) and matrix A (1x3), the multiplication BA results in a 3x3 matrix, showing how each element is the sum of products of corresponding row and column elements.
  • 📉 The script provides a step-by-step guide to multiplying matrices, illustrating the process with specific numerical examples.
  • 📈 The example with matrix A (2x3) and matrix B (3x4) shows that AB is a 2x4 matrix, while BA is not possible due to the mismatch in the number of columns and rows.
  • 📝 The multiplication of matrix A (2x3) by matrix B (3x4) is detailed, emphasizing the process of calculating each entry in the resulting 2x4 matrix.

Q & A

  • What is the main focus of the video?

    -The main focus of the video is on multiplying matrices and understanding the importance of the order in which matrices are multiplied.

  • What are the elements of Matrix A and Matrix B in the first example?

    -In the first example, Matrix A has elements 2, 5, and 6, and Matrix B has elements 3, 4, and -5.

  • Why is the order of multiplication important in matrix multiplication?

    -The order of multiplication is important because it affects the resulting matrix's dimensions and values. AB and BA can yield different results and may even have different dimensions if they are not square matrices.

  • What is the order of Matrix A in the first example?

    -The order of Matrix A in the first example is 1x3, meaning it has 1 row and 3 columns.

  • What is the order of Matrix B in the first example?

    -The order of Matrix B in the first example is 3x1, meaning it has 3 rows and 1 column.

  • What is the resulting order of the product of Matrix A and Matrix B in the first example?

    -The resulting order of the product of Matrix A and Matrix B in the first example is 1x1, as the number of columns in Matrix A equals the number of rows in Matrix B.

  • What is the result of multiplying Matrix A by Matrix B in the first example?

    -The result of multiplying Matrix A by Matrix B in the first example is a 1x1 matrix with the single value of -4.

  • Why can't we multiply Matrix B by Matrix A in the first example?

    -We can't multiply Matrix B by Matrix A in the first example because the number of columns in Matrix B (1) does not equal the number of rows in Matrix A (3), which is a requirement for matrix multiplication.

  • What is the resulting order of the product of a 2x3 matrix and a 3x4 matrix?

    -The resulting order of the product of a 2x3 matrix and a 3x4 matrix is a 2x4 matrix, as the number of columns in the first matrix must match the number of rows in the second matrix for multiplication to be possible.

  • Why is it not possible to multiply a 3x4 matrix by a 2x3 matrix?

    -It is not possible to multiply a 3x4 matrix by a 2x3 matrix because the number of columns in the 3x4 matrix (4) does not match the number of rows in the 2x3 matrix (2), which violates the requirement for matrix multiplication.

  • How does the video demonstrate the process of matrix multiplication?

    -The video demonstrates the process of matrix multiplication by taking elements from the corresponding row of the first matrix and multiplying them with the elements of the corresponding column of the second matrix, then summing these products to get the entry in the resulting matrix.

Outlines

00:00

🧠 Matrix Multiplication Basics

This paragraph introduces the concept of matrix multiplication, focusing on the importance of order when multiplying matrices. It provides an example with two matrices, A and B, and demonstrates that the product AB is not the same as BA. The paragraph explains the order of matrices and how it affects the resulting product, emphasizing that the number of columns in the first matrix must match the number of rows in the second matrix for multiplication to be possible. The example concludes with the multiplication of a 1x3 matrix A by a 3x1 matrix B, resulting in a 1x1 matrix.

05:03

🔍 Exploring Matrix Order and Multiplication

The second paragraph delves deeper into matrix multiplication, illustrating the process with a 1x3 matrix A and a 3x1 matrix B to show that the resulting matrix AB is a 1x1 matrix, while BA would be a 3x3 matrix if it were possible. The paragraph explains the rules governing matrix order and multiplication, emphasizing that the number of columns in the first matrix must equal the number of rows in the second matrix. It also provides a new example with two matrices, A and B, and asks the viewer to determine the order of the products AB and BA, highlighting that BA is not possible due to the mismatch in the number of columns and rows.

10:04

📚 Step-by-Step Matrix Multiplication

This paragraph provides a detailed step-by-step guide on how to multiply two matrices, A and B. It explains that the order of the resulting matrix is determined by the number of rows in the first matrix and the number of columns in the second matrix. The example given involves a 2x3 matrix A and a 3x4 matrix B, which can be multiplied to form a 2x4 matrix. The paragraph walks through the multiplication process, showing how to calculate each entry of the resulting matrix by taking the dot product of rows from the first matrix and columns from the second.

15:08

📝 Completing Matrix Multiplication with Examples

The final paragraph continues the explanation of matrix multiplication, completing the example from the previous paragraph. It shows the calculation for each entry of the resulting 2x4 matrix by multiplying corresponding elements from the rows of matrix A and the columns of matrix B. The paragraph emphasizes the importance of following the correct order of multiplication and placing the results in the correct position in the new matrix. It concludes by summarizing the process and confirming that the resulting matrix is indeed 2x4, as predicted by the initial analysis of the matrices' orders.

Mindmap

Keywords

💡Matrix

A matrix is a rectangular array of numbers, symbols, or expressions, arranged in rows and columns. In the context of the video, matrices are the primary objects for multiplication, and understanding their structure is fundamental to grasping the video's theme of matrix multiplication.

💡Matrix Multiplication

Matrix multiplication is an operation that takes a pair of matrices and produces a new matrix by combining the values of the input matrices in a specific way. The video focuses on this process, demonstrating how to calculate the product of two matrices, A and B, and emphasizing the importance of the order of multiplication.

💡Order of Matrix

The order of a matrix refers to the number of rows and columns it contains, typically expressed as 'm x n', where 'm' is the number of rows and 'n' is the number of columns. The video script explains how the order of the resulting matrix in a multiplication operation is determined by the orders of the matrices being multiplied.

💡Element

In the context of matrices, an element is a single number or value that occupies a space within the matrix at a specific row and column intersection. The script uses elements of matrices A and B to illustrate the process of matrix multiplication.

💡Row

A row in a matrix is a horizontal sequence of elements. The video script describes how to multiply elements of a row by the corresponding elements of a column during matrix multiplication, which is essential for understanding the calculation process.

💡Column

A column in a matrix is a vertical sequence of elements. The script explains that during matrix multiplication, you multiply the elements of a row by the corresponding elements of a column, emphasizing the role of columns in determining the structure of the resulting matrix.

💡Diagonal

The diagonal of a matrix refers to the elements that run from the top left to the bottom right. In the video, the diagonal is implicitly mentioned when discussing the multiplication of corresponding row and column elements, which can result in a diagonal entry in the product matrix.

💡Scalar

A scalar is a single number that can be the result of an operation involving matrices, such as the product of a row and a column in matrix multiplication. The script mentions scalar results when calculating the entries of the resulting matrix from the product of matrices A and B.

💡Identity Matrix

An identity matrix is a special square matrix in which all the elements of the main diagonal are ones and all other elements are zeros. While not explicitly mentioned in the script, the concept is relevant as the multiplication of a matrix by the identity matrix results in the original matrix, which could be a point of comparison for understanding matrix multiplication.

💡Transpose

The transpose of a matrix is an operation that flips the matrix over its diagonal, swapping its rows and columns. Although not directly discussed in the script, the concept of transposing is relevant to understanding how matrix multiplication affects the order of elements and the resulting matrix's dimensions.

💡Determinant

The determinant is a scalar value that can be computed from a square matrix and has important properties in linear algebra. While not discussed in the script, the determinant is related to the invertibility of matrices, which is a concept that could be connected to matrix multiplication and the existence of a product.

Highlights

The video focuses on matrix multiplication and the importance of order in matrix operations.

Matrix A is defined with elements 2, 5, and 6, and Matrix B with elements 3, 4, and -5.

Multiplication of 3 by 5 and 5 by 3 is the same in arithmetic but not in matrix multiplication due to order sensitivity.

Matrix A is a 1x3 matrix, and Matrix B is a 3x1 matrix, illustrating the concept of matrix dimensions.

The product of A and B (AB) will be a 1x1 matrix, demonstrating matrix multiplication rules.

The order of AB is determined by the number of rows in A and columns in B, resulting in a 1x1 matrix.

The order of BA is 3x3, showing that matrix dimensions change based on multiplication order.

Matrix multiplication requires the number of columns in the first matrix to equal the number of rows in the second.

The process of multiplying matrix A by matrix B is demonstrated step by step.

The result of AB is a single element, -4, showing the outcome of a 1x1 matrix multiplication.

The multiplication of BA is shown to result in a 3x3 matrix, contrasting with AB.

The video provides a clear example of how matrix dimensions are calculated and the resulting matrix's order.

A second example with matrices A and B of different dimensions is introduced for further illustration.

Matrix A is a 2x3 matrix, and Matrix B is a 3x4 matrix, setting the stage for another multiplication example.

The multiplication of A by B is possible due to matching dimensions, but B by A is not, highlighting dimension requirements.

The resulting matrix AB is a 2x4 matrix, as predicted by the rules of matrix multiplication.

A detailed step-by-step multiplication of A by B is provided, including intermediate calculations.

The final result of the multiplication is a 2x4 matrix, confirming the theoretical predictions.

Transcripts

play00:01

in this video we're going to focus on

play00:03

multiplying matrices

play00:05

so let's say if we have matrix a

play00:07

and it has the elements

play00:09

2

play00:10

5 and 6

play00:12

and matrix b

play00:14

contains the elements 3 4

play00:17

and negative 5.

play00:19

so let's find the product of a b

play00:22

and b a

play00:25

now in math

play00:27

let's say if we multiply 3 times 5

play00:29

is 15

play00:31

and 5 times 3 is also 15.

play00:33

when dealing with matrices the order

play00:35

matters

play00:37

a b and b a

play00:39

they will not be the same

play00:41

so keep that in mind

play00:43

a b tells us that we need to take matrix

play00:45

a

play00:46

and then multiply by b in that order

play00:49

b a tells us that we need to start with

play00:50

matrix b and then multiply by a

play00:54

so the order matters

play00:58

before we begin multiplying let's talk

play01:00

about the order of each matrix what is

play01:03

the order of matrix a

play01:05

matrix a

play01:07

has one row

play01:08

and

play01:09

three columns

play01:12

so it's a one by three matrix

play01:15

the way you write the order is you start

play01:17

with the rows

play01:18

and then

play01:20

you multiply by the columns

play01:22

so matrix b

play01:24

has three rows

play01:27

and only one column

play01:29

so it's a three by one

play01:31

matrix

play01:33

so if we multiply

play01:34

a by b

play01:37

what do you think the order will be

play01:43

so a times b

play01:46

so a is a one by three matrix

play01:49

and b is a three by one matrix

play01:52

in order to multiply these two matrices

play01:56

the columns

play01:57

in the first matrix has to equal the

play02:00

number of rows in the second matrix

play02:03

so make sure you understand that

play02:05

and the order

play02:07

of matrix a b is going to be the product

play02:09

of these two numbers which

play02:11

do not have to be the same

play02:14

so the order of a b

play02:15

is going to be a one by one matrix

play02:18

so therefore we should have one number

play02:20

in this matrix only it could be like 7

play02:23

12 15 who knows

play02:28

but the order of the matrix

play02:30

is basically the product of those two

play02:38

now what about b times a

play02:41

what is the order of that matrix so we

play02:44

take matrix b

play02:45

and multiply by matrix a what should we

play02:47

get

play02:49

so matrix b is a three by one matrix

play02:52

and matrix a

play02:54

is

play02:56

a one by three matrix

play02:58

so we have to make sure that

play03:00

the number of columns in the first

play03:02

matrix

play03:03

is equal

play03:04

to the number of rows in the second

play03:06

matrix

play03:07

so which we do have so we can multiply

play03:09

these two matrices

play03:12

now the order of the matrix is going to

play03:14

be 3 by 3.

play03:16

so the order for matrix b a it's going

play03:18

to be a three by three matrix

play03:20

and for a b we said it's going to be a

play03:22

one by one matrix

play03:23

now let's confirm that

play03:27

so let's get rid of

play03:29

some stuff

play03:39

so let's start by multiplying

play03:42

matrix a by matrix b so the way you do

play03:46

it is you take all the elements in the

play03:48

first row and then multiply it by all

play03:51

the elements

play03:52

in the first column

play03:54

so it's always going to be row times the

play03:56

column

play03:57

and then you add the products together

play04:00

so it's always going to be r times c

play04:05

so we're going to take

play04:06

this one it's in the first row first

play04:09

column and multiply it by

play04:11

that element in the first row and the

play04:13

first column so it's going to be 2 times

play04:15

3

play04:20

and then we're going to multiply these

play04:21

two

play04:22

so it's going to be 5 times 4

play04:27

and then

play04:28

six times negative five and this will

play04:31

give us only one element

play04:36

so because we took the elements in the

play04:38

first row

play04:39

and multiplied it by the elements in the

play04:41

first column

play04:42

we're going to get a single entry

play04:44

in the first row first column

play04:46

so it's going to be a one by one matrix

play04:50

now two times three

play04:52

is six

play04:53

five times four is twenty

play04:55

six times negative five that's negative

play04:57

thirty

play04:59

and six plus twenty is twenty six

play05:03

twenty six minus thirty

play05:05

is negative four

play05:06

so we can see that

play05:08

a b is a one by one matrix it has

play05:12

one row and only one column

play05:15

and so it's equal to negative four

play05:18

now let's multiply b by a

play05:27

so let's show that it's going to be a

play05:28

three by three matrix

play05:32

so we're going to start with

play05:34

b so remember it's row by column

play05:37

so the first row

play05:39

times the first column so that's going

play05:41

to be three times two

play05:46

and that entry

play05:47

is going to go in the first row first

play05:50

column

play05:51

so three times two is six

play05:53

so now we're still on row one but now we

play05:56

have to multiply by column two

play05:58

so that's going to be three times five

play06:03

so it's going to be in the first row but

play06:04

second column so that's going to be 15.

play06:08

and then we need to multiply row one

play06:10

by column three

play06:13

so so it's going to be row by column

play06:15

so three times six is 18.

play06:20

next we're gonna move on to row two and

play06:23

then column one

play06:25

four times two is eight

play06:27

so that's going to go in the second row

play06:29

first column

play06:33

and then

play06:34

we're gonna have

play06:36

row two by column two

play06:39

so that's four times five

play06:41

and that's twenty

play06:44

and then it's going to be

play06:46

row two times column three

play06:49

and four times six

play06:52

is

play06:53

twenty-four

play06:54

so hopefully you're seeing the pattern

play06:56

of what we're doing here

play06:58

if not feel free to pause the video and

play07:00

rewind until you understand it and then

play07:02

it's going to be row 3 times column 1.

play07:06

so negative 5 times 2 is negative 10

play07:10

and then row 3 times column 2

play07:13

5 times negative 5

play07:15

is

play07:16

negative 25

play07:18

and then row 3

play07:20

times column 3.

play07:21

6 times negative 5 is

play07:24

negative 30.

play07:27

so as we could see

play07:28

a b and b a are clearly different

play07:31

and you can see that ba

play07:34

has three rows

play07:36

and

play07:37

three columns so it's a three by three

play07:39

matrix

play07:42

so hopefully this example gave you a

play07:43

good idea of how to multiply matrices

play07:47

let's work on another example

play07:49

so let's say that

play07:51

matrix a

play07:54

contains the elements 1

play07:56

4 negative 2

play07:58

3 5 and negative 6

play08:01

and matrix b

play08:03

contains the elements

play08:06

5 2

play08:08

8 negative 1

play08:10

3 6 4

play08:12

5

play08:14

negative 2

play08:15

9

play08:16

7 and negative 3.

play08:19

so go ahead

play08:21

and

play08:22

multiply

play08:24

a times b and also b times a

play08:27

and determine the order

play08:29

of

play08:31

these two products

play08:32

so what is the order of a b

play08:36

so what do you think the order is going

play08:37

to be

play08:40

so notice that a has two rows

play08:45

and it has

play08:46

three columns

play08:48

so matrix a

play08:50

is

play08:52

it's a two by three matrix it has two

play08:54

rows and three columns

play08:56

matrix b

play08:57

contains

play08:59

three rows

play09:01

and it has

play09:02

four columns

play09:06

so matrix b is a

play09:08

three by four matrix

play09:10

so notice that these numbers are the

play09:12

same

play09:13

the number of columns

play09:15

in

play09:16

matrix a is equal to the number of rows

play09:19

in matrix b

play09:20

so that means that we are allowed to

play09:23

multiply a by b

play09:26

these two numbers

play09:28

they must be the same

play09:30

in order

play09:31

for you to multiply the two matrices

play09:34

now the order of matrix a b

play09:37

is going to be 2 times 4 or 2 by 4.

play09:40

so it's going to have two rows and four

play09:42

columns

play09:45

now what about b times a

play09:48

what can we say about that

play09:53

so matrix b

play09:55

has

play09:57

three rows and four columns

play09:59

and matrix a

play10:00

has two rows and three columns so notice

play10:04

that these two numbers

play10:06

do not match

play10:07

they're different

play10:09

and in order to multiply b times a they

play10:11

must be the same so therefore

play10:13

b a does not exist

play10:16

we don't have to worry about that

play10:17

problem

play10:20

so let's focus on multiplying a by b

play10:27

so it's going to have two rows

play10:29

and four columns

play10:34

so let's start by multiplying

play10:38

row one

play10:39

by column one

play10:44

so it's going to be 1 times 5

play10:48

and then it's going to be plus

play10:50

4 times 3

play10:52

and then

play10:54

plus negative 2 times negative 2.

play10:57

so you got to multiply these two first

play11:00

and then these two together

play11:02

and then those two

play11:13

it might be wise for me to perform the

play11:14

operation somewhere else

play11:16

so let me get rid of this

play11:18

i'm going to put the answers there so

play11:19

it's going to be

play11:20

1 times 5

play11:22

plus 4 times

play11:24

3

play11:26

plus negative two times negative two

play11:29

so this is gonna be five plus twelve

play11:31

plus four

play11:33

five plus twelve is seventeen seventeen

play11:36

plus four is twenty one

play11:39

so because we multiplied row one

play11:41

by column one

play11:42

we need to put this answer

play11:45

in

play11:45

row one column one

play11:48

so this is row one row two

play11:52

and this is going to be

play11:53

row column one two three and four

play12:05

now let's multiply row one

play12:07

by column two

play12:09

and that will produce an entry in

play12:11

row one column two

play12:16

so first we need to take

play12:18

one

play12:19

and then multiply it by two

play12:24

and then it's going to be 4

play12:26

times 6

play12:31

and then negative 2

play12:33

times

play12:36

9. so 1 times 2 is 2 4 times 6 is 24

play12:41

negative 2 times 9 is negative 18.

play12:45

so 2 plus 24 is 26

play12:48

26 minus 18 is 8.

play12:51

so let's place that entry

play12:53

in that slot

play12:57

now let's move on to

play12:59

row one

play13:00

column three

play13:01

and that's going to be an entry in row

play13:03

one column three

play13:08

so we're going to multiply one

play13:10

by eight

play13:15

and then four

play13:17

by four

play13:21

and then negative two times seven

play13:28

or you can write it as

play13:31

plus

play13:33

negative two times seven

play13:36

so one times eight is eight four times

play13:38

four is sixteen

play13:40

negative two times seven

play13:42

is negative fourteen

play13:44

now sixteen minus fourteen is two

play13:47

a plus two is ten

play13:49

so we get that answer

play13:55

now let's move on to the first row

play13:58

fourth column

play13:59

which will produce an entry in row one

play14:01

column four

play14:06

so it's going to be one

play14:07

times negative one

play14:09

plus

play14:11

four times five

play14:13

plus negative two times negative three

play14:16

so this is going to be negative one four

play14:18

times five is twenty

play14:20

negative two times negative three is

play14:21

plus six

play14:23

so twenty plus six is twenty six

play14:26

and twenty six minus one is twenty

play14:29

so hopefully by now

play14:31

you get the hang of it if not feel free

play14:33

to rewind the video

play14:36

so let's move a little faster

play14:38

so row two times

play14:40

column one

play14:44

that's going to be 3

play14:45

times 5

play14:47

plus

play14:48

5 times 3

play14:50

plus negative 6 times negative 2.

play14:53

so that's 15 plus 15

play14:56

plus 12. 15 and 15 is 30

play14:59

30 plus 12 is 42

play15:02

so we need to put that there

play15:07

next we have

play15:10

row 2

play15:11

times column two

play15:15

so that's going to be three times two

play15:18

plus five times six

play15:20

plus negative six

play15:22

times nine three and two is six five

play15:24

times six is thirty

play15:26

negative six times nine is negative

play15:28

fifty four

play15:29

now thirty minus fifty four is negative

play15:31

twenty four

play15:33

and six minus twenty four

play15:35

is

play15:36

negative eighteen

play15:41

now let's move on to row two

play15:44

times column three

play15:48

so it's going to be three times eight

play15:52

plus five times four

play15:55

plus negative six times seven

play15:58

so three times eight is twenty-four five

play16:00

times four is twenty

play16:02

negative six times seven is

play16:04

negative forty-two

play16:05

twenty-four plus twenty is 44

play16:08

and 44 minus 42 is 2.

play16:12

now for the last entry

play16:16

we're going to multiply

play16:18

row 2

play16:20

by column 4.

play16:24

so that's going to be three

play16:26

times negative one

play16:28

plus five times five

play16:31

plus negative six times negative three

play16:34

so this is negative three

play16:36

five times five is 25 and negative six

play16:38

times negative three is eighteen

play16:41

now negative three plus twenty-five is

play16:43

twenty-two

play16:44

twenty-two plus eighteen is forty

play16:48

and so now you know how to multiply

play16:50

two matrices together

play16:52

and as you can see

play16:54

we did get the two by four matrix as

play16:56

predicted

play16:57

so if you multiply

play16:59

a two by three matrix

play17:01

with a three by four matrix

play17:04

first you must see that

play17:06

these two are the same

play17:08

and then the order of the new matrix is

play17:10

going to be

play17:11

the number of rows of the first matrix

play17:13

times the columns of the second which we

play17:15

have here it's two rows and four columns

play17:39

you

Rate This

5.0 / 5 (0 votes)

Etiquetas Relacionadas
Matrix MultiplicationOrder of MatricesMathematics TutorialEducational ContentLinear AlgebraCalculation MethodsMatrix OrderRow by ColumnMathematical ConceptsEducational Video
¿Necesitas un resumen en inglés?