1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4....

66
1.4. Matrix Operations

Transcript of 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4....

Page 1: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

1.4. Matrix Operations

Page 2: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

1.4. Matrix Operations1.4. Matrix Arithmetic

Matrices also exist as objects in and of themselves,and it turns out we can “do things” to them, whichhave algebraic properties. This will enable us(eventually) to find another way to solve a systemof linear equations.

But first, we give some definitions, so we knowexactly what we’re talking about . . .

Page 3: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

A =

1 2 34 5 67 8 9

10 11 12

A matrix is a rectangular arrangment of numbers.(Parentheses ( ) can be used instead of brackets [ ] togroup the entries of a matrix; however, vertical lines| | have a different meaning.)

Page 4: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

A =

1 2 34 5 6

7 8 910 11 12

A row consists of the entries in a horizontal “slice”.(The second row of A is shown above in bold.)

Page 5: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

A =

1 2 3

4 5 6

7 8 9

10 11 12

A column consists of the entries in a vertical “slice”.The third column of A is shown above in bold.

Page 6: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

A row vector is a matrix with only one row, such as

[ 1 2 3 4 ]

A column vector (or just a vector) is a matrix withonly one column, such as

1234

Page 7: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

A =

1 2 34 5 67 8 9

10 11 12

The entry in the ith row and the j column of thematrix A is denoted Ai,j (my notation) or ai,j (thebook’s notation). Thus A3,1 =?.

Page 8: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

A =

1 2 34 5 67 8 9

10 11 12

The entry in the ith row and the j column of thematrix A is denoted Ai,j (my notation) or ai,j (thebook’s notation). Thus A3,1 = 7. “7” is sometimescalled the (3, 1)th entry of A.

Page 9: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

A =

1 2 34 5 67 8 9

10 11 12

If the matrix A has m rows and n columns, it is saidto be “an m × n matrix”. These numbers (m × n) arealso the dimensions (or “size”) of the matrix.

The dimensions of A (above) are ???

Page 10: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

A =

1 2 34 5 67 8 9

10 11 12

If the matrix A has m rows and n columns, it is saidto be “an m × n matrix”. These numbers (m × n) arealso the dimensions of the matrix.

The dimensions of A (above) are 4× 3.

Page 11: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

When are two matrices equal? (When can we writeA = B?)

Page 12: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

When are two matrices equal? (When can we writeA = B?)

When they have the same dimensions, andcorresponding entries are the same. That is, when

Ai,j = Bi,j

for “reasonable” i and j.

Page 13: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Now, we move on to arithmetic of matrices. Whatdo you think 1 2

3 45 6

+

0 10 10 1

is?

Page 14: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Now, we move on to arithmetic of matrices. Whatdo you think 1 2

3 45 6

+

0 10 10 1

is?

1 + 0 2 + 13 + 0 4 + 15 + 0 6 + 1

or

1 33 55 7

.

To be more precise, if A and B have the samedimensions, then the (i, j)th entry of A+B is Ai,j+Bi,j.(If A and B have different dimensions, we don’tbother defining A + B, and say that this expressionis unde�ned.)

Page 15: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

We can also multiply a matrix by a real number; thisis called scalar multiplication.

−2[

1 2 00 1 2

]=

Page 16: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

We can also multiply a matrix by a real number; thisis called scalar multiplication.

−2[

1 2 00 1 2

]=

[−2 −4 0

0 −2 −4

].

To be more precise, if r is a real number, and A isan m × n matrix, then rA is the m × n matrix whose(i, j)th entry is rAi,j.

Page 17: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

These arithemtic operations have a lot of theexpected properties.

B + A =A + (B + C) =

r(A + B) =(r + s)A =

r(sA) =1A =

Page 18: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

These arithemtic operations have a lot of theexpected properties.

B + A = A + B

A + (B + C) = (A + B) + C

r(A + B) = (rA) + (rB)(r + s)A = (rA) + (sA)

r(sA) = (rs)A1A = A

Page 19: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

In normal addition, we have a special number “0”with the property that x + 0 = x for any x. Is there asimilar object for matrix addition? 1 2

−1 −13 5

+ M =

1 2−1 −1

3 5

Page 20: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

In normal addition, we have a special number “0”with the property that x + 0 = x for any x. Is there asimilar object for matrix addition? 1 2

−1 −13 5

+

0 00 00 0

=

1 2−1 −1

3 5

This matrix is called the zero matrix, and I willdenote it by 0. (A bold zero; a normally typsetzero will be the number zero.) Note that there areactually infinitely many zero matrices, one of eachdimension.

Note that 0A = 0 for any matrix A.

Page 21: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Exercise: Find all ordered triples (x, y, z) of realnumbers such that[

0 x y3 2 x + y

]+ z ·

[1 0 00 1 0

]=

[1 2 03 3 2

].

Page 22: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Exercise: Find all ordered triples (x, y, z) of realnumbers such that[

0 x y3 2 x + y

]+ z ·

[1 0 00 1 0

]=

[1 2 03 3 2

].

Our strategy is to get an equation which looks likeA = B; then we can compare entries of the matricesto find x, y, and z. We need to use matrix arithmeticto simplify the expression on the left-hand side.

Page 23: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

[0 x y3 2 x + y

]+ z ·

[1 0 00 1 0

]=

[1 2 03 3 2

]

Page 24: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

[0 x y3 2 x + y

]+ z ·

[1 0 00 1 0

]=

[1 2 03 3 2

][

0 x y3 2 x + y

]+

[z 0 00 z 0

]=

[1 2 03 3 2

]

Page 25: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

[0 x y3 2 x + y

]+ z ·

[1 0 00 1 0

]=

[1 2 03 3 2

][

0 x y3 2 x + y

]+

[z 0 00 z 0

]=

[1 2 03 3 2

][

z x y3 2 + z x + y

]=

[1 2 03 3 2

]

Page 26: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

[0 x y3 2 x + y

]+ z ·

[1 0 00 1 0

]=

[1 2 03 3 2

][

0 x y3 2 x + y

]+

[z 0 00 z 0

]=

[1 2 03 3 2

][

z x y3 2 + z x + y

]=

[1 2 03 3 2

]Comparing entries, we get the equations z = 1, x = 2,y = 0, 3 = 3, 2 + z = 3, and x + y = 2. There isonly one solution to this system of equations, namely(x, y, z) = (2, 0, 1) .

Page 27: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Another example. This one is related to the system

x1 x2 x3 x4 x51000

0100

−1−2

00

0010

34

−10

∣∣∣∣∣∣∣23

−20

Page 28: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

We described the solutions of

x1 x2 x3 x4 x51000

0100

−1−2

00

0010

34

−10

∣∣∣∣∣∣∣23

−20

using these equations:

x1 = 2 + α− 3β

x2 = 3 + 2α− 4β

x3 = α

x4 = −2 + β

x5 = β

Page 29: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

WeBWorK will not accept the solution in this form;we need to convert them into another form.

x1 = 2 + α− 3β

x2 = 3 + 2α− 4β

x3 = α

x4 = −2 + β

x5 = β

by writing the vector

x1

x2

x3

x4

x5

in “expanded” form.

Page 30: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

x1

x2

x3

x4

x5

=

2 + α− 3β

3 + 2α− 4βα

−2 + ββ

Page 31: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

x1

x2

x3

x4

x5

=

2 + α− 3β

3 + 2α− 4βα

−2 + ββ

=

230

−20

+

α

2αα00

+

−3β−4β

0ββ

This “decomposition” was done by writing the vectoras the sum of three column vectors:

Page 32: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

x1

x2

x3

x4

x5

=

2 + α− 3β3 + 2α− 4β

α�2 + β

β

=

2

3

0

�2

0

+

α

2αα00

+

−3β−4β

0ββ

This “decomposition” was done by writing the vectoras the sum of three column vectors: (1) the constantterms (using a 0 if there is no constant term),

Page 33: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

x1

x2

x3

x4

x5

=

2 + �− 3β

3 + 2�− 4β�

−2 + ββ

=

230

−20

+

2�

0

0

+

−3β−4β

0ββ

This “decomposition” was done by writing the vectoras the sum of three column vectors: (1) the constantterms, (2) the terms involving α,

Page 34: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

x1

x2

x3

x4

x5

=

2 + α�3�

3 + 2α�4�α

−2 + �

=

230

−20

+

α

2αα00

+

�3�

�4�

0

This “decomposition” was done by writing thevector as the sum of three column vectors. This“decomposition” was done by writing the vector asthe sum of three column vectors: (1) the constantterms, (2) the terms involving α, and (3) the termsinvolving β.

Page 35: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

x1

x2

x3

x4

x5

=

2 + α−3β

3 + 2α−4βα

−2 + ββ

=

230

−20

+

α

2αα00

+

−3β−4β

0ββ

Notice that: (1) These are the only terms whichappear in the equations for the xi’s,

Page 36: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

x1

x2

x3

x4

x5

=

2 + α−3β

3 + 2α−4βα

−2 + ββ

=

230

−20

+

α

2αα00

+

−3β−4β

0ββ

Notice that: (1) These are the only terms whichappear in the equations for the xi’s, and (2) everyterm in the last two vectors is a multiple of α or amultiple of β (so we can factor it out).

Page 37: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

x1

x2

x3

x4

x5

=

230

−20

+ α ·

12100

+ β ·

−3−4

011

This is the form of the solution that WeBWorKaccepts.

Page 38: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Exercise: Find all solutions to the equation

2x− 3y + 4z = 6

and write the answer in expanded form.

Page 39: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Exercise: Find all solutions to the equation

2x− 3y + 4z = 6

and write the answer in expanded form.

[ 2 −3 4 | 6 ]

Page 40: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Exercise: Find all solutions to the equation

2x− 3y + 4z = 6

and write the answer in expanded form.

[ 2 −3 4 | 6 ] −→[

1 −32

2∣∣∣ 3

]The augmented matrix is now in reduced rowechelon form!

Page 41: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

[1 −3

22

∣∣∣ 3]

• The free variables are y and z.

• Let y = s and z = t.

• x = 3 +32

y − 2z = 3 +32

s− 2t.

Page 42: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Thenxyz

=

3 +32

s− 2tst

=

300

+ s ·

3/210

+ t ·

−201

Page 43: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Now we move on to matrix multiplication. This is the“weird” arithmetic operation, and the question thatusually comes up in students’ minds is “Why wouldyou bother defining matrix multiplication in thiscomplicated way?” There are two good reasons; first,we haven’t really used the “shape” of the matrixyet. Second, well, this is going to take us back tosystems of linear equations. (So, until I get past theexamples, please don’t ask, “Why are we defining ABthis way?” You’ll learn everything you need to know,when you need to know it . . . )

Page 44: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

First of all, when is the matrix product AB defined?Suppose that A is an m × n matrix and B is a p × qmatrix.

Then AB is only defined if n = p (when the numberof columns of A equals the number of rows of B), andAB is then a m× q matrix.

Page 45: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Quick quiz: Which of the following matrix productsdefined, and what are the dimensions of the product,where A is 2× 3, B is 3× 2, C is 2× 3, and D is 2× 4?

• AB• BA• AC• BD• DB

Page 46: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Quick quiz: Which of the following matrix productsdefined, and what are the dimensions of the product,where A is 2× 3, B is 3× 2, C is 2× 3, and D is 2× 4?

• AB Defined. 2× (3 = 3)× 2. Dimensions: 2× 2• BA• AC• BD• DB

Page 47: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Quick quiz: Which of the following matrix productsdefined, and what are the dimensions of the product,where A is 2× 3, B is 3× 2, C is 2× 3, and D is 2× 4?

• AB Defined. 2× (3 = 3)× 2. Dimensions: 2× 2• BA Defined. 3× (2 = 2)× 3. Dimensions: 3× 3• AC• BD• DB

Page 48: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Quick quiz: Which of the following matrix productsdefined, and what are the dimensions of the product,where A is 2× 3, B is 3× 2, C is 2× 3, and D is 2× 4?

• AB Defined. 2× (3 = 3)× 2. Dimensions: 2× 2• BA Defined. 3× (2 = 2)× 3. Dimensions: 3× 3• AC Undefined. 2× (3 6= 2)× 3.• BD• DB

Page 49: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Quick quiz: Which of the following matrix productsdefined, and what are the dimensions of the product,where A is 2× 3, B is 3× 2, C is 2× 3, and D is 2× 4?

• AB Defined. 2× (3 = 3)× 2. Dimensions: 2× 2• BA Defined. 3× (2 = 2)× 3. Dimensions: 3× 3• AC Undefined. 2× (3 6= 2)× 3.• BD Defined. 3× (2 = 2)× 4. Dimensions: 3× 4• DB

Page 50: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Quick quiz: Which of the following matrix productsdefined, and what are the dimensions of the product,where A is 2× 3, B is 3× 2, C is 2× 3, and D is 2× 4?

• AB Defined. 2× (3 = 3)× 2. Dimensions: 2× 2• BA Defined. 3× (2 = 2)× 3. Dimensions: 3× 3• AC Undefined. 2× (3 6= 2)× 3.• BD Defined. 3× (2 = 2)× 4. Dimensions: 3× 4• DB Undefined. 2× (4 6= 3)× 2.

Page 51: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Next, we need to determine what the entries of ABare. To do this, we use a generalized version of thedot product, which tells us how to multiply a rowvector by a column vector:

[x1 x2 · · · xk ] ·

y1

y2

...yk

= x1y1 + x2y2 + · · ·+ xkyk.

Page 52: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Now, I can give you the rule for finding oneparticular entry of AB: The (i, j)th entry (the one inthe ith row and jth column of AB is the dot productof the ith row of A and the jth column of B.

(Fortunately, it’s not backwards!)

Now it’s time to throw in some numbers . . .

Page 53: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

[1 2 02 0 1

1 −12 2

−1 1

=

What are the dimensions of the final answer?

Page 54: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

[1 2 02 0 1

1 −12 2

−1 1

=[ut utut ut

]

What are the dimensions of the final answer? 2� 2

Now we find the entries of the matrix . . .

Page 55: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

[1 2 02 0 1

1 −12 2

−1 1

=[ut utut ut

]

[ 1 2 0 ] ·

12

−1

= 1 · 1 + 2 · 2 + 0 · (−1) = 5

Page 56: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

[1 2 02 0 1

1 −12 2

−1 1

=[

5 utut ut

]

[ 1 2 0 ] ·

−121

= 1 · (−1) + 2 · 2 + 0 · 1 = 3

Page 57: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

[1 2 02 0 1

1 −12 2

−1 1

=[

5 3ut ut

]

[ 2 0 1 ] ·

12

−1

= 2 · 1 + 0 · 2 + 1 · (−1) = 1

Page 58: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

[1 2 02 0 1

1 −12 2

−1 1

=[

5 31 ut

]

[ 2 0 1 ] ·

−121

= 2 · (−1) + 0 · 2 + 1 · 1 = �1

Page 59: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

[1 2 02 0 1

1 −12 2

−1 1

=[

5 31 −1

]

(Note that

1 −12 2

−1 1

·[

1 2 02 0 1

]is the 3 × 3 matrix−1 1 −1

6 4 21 −2 1

.)

Page 60: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Matrix multiplication has the following “features”:

• AB is generally different from BA. In fact, any ofthe following can happen:

• AB is defined and BA is undefined;• AB and BA are both defined but have

different dimensions;• AB and BA are both defined, have the same

dimensions, but the entries don’t agree.

Page 61: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

More features of matrix multiplication:

• If A =[

1 23 4

]and B =

[1 11 1

], then AB and BA

have the same dimensions, but the entries aredifferent.

• Generally, if AC = BC, then you cannot concludethat A = B. In fact, you can even have A2 = 0

with A 6= 0; for instance A =[

0 10 0

]. (A2 = AA.)

Page 62: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Matrix multiplication does have the followingproperties:

• A(BC) = (AB)C (provided that all multiplicationsare defined; and if one side is defined, the otheris also defined)

• A(B + C) = (AB) + (AC) (ditto)• (A + B)C = (AC) + (BC) (ditto)• r(AB) = (rA)B = A(rB) (ditto)• A0 = 0 and 0A = 0 (ditto)

Page 63: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

Now . . . Why do we define matrix multiplication inthis bizarre way?

Let’s look at the matrix equation 1 −1 22 −2 81 −2 0

·x

yz

=

3222

Let’s multiply the left-hand side out.

Page 64: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

x− y + 2z2x− 2y + 8zx− 2y

=

3222

This is another way of writing

x − y + 2z = 32x − 2y + 8z = 22x − 2y = 2

which is just a system of linear equations!

Page 65: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

We can reverse the process as well; any system of lin-

ear equations can be written as a matrix equation

AX = B.

The matrix A has the coefficients of the variables, Xis the matrix of the variables, and B consists of thenumbers on the right-hand side.

Now, how do you solve the equation AX = B for X?

Page 66: 1.4. Matrix Operations - math.la.asu.educheckman/S2010/242/242LN1.4.pdf1.4. Matrix Operations. 1.4. Matrix Operations 1.4. Matrix Arithmetic Matrices also exist as objects in and of

AX = B =⇒ X = “B

A”

(Not exactly; there are a few things we need toclarify, before we get a working formula.)

ut