21
Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Embed Size (px)

Citation preview

Page 1: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Page 2: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

OBJECTIVES

Matrix Algebra

Learn the definition of equality of matrices.Learn the definition of matrix addition and scalar multiplication.Learn the definition of matrix multiplication.Learn an application of matrix multiplication to computer graphics.

SECTION 9.2

1

2

3

4

Page 3: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 3 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

EQUALITY OF MATRICES

Two matrices A = [aij] and B = [bij] are said to be equal, written A = B, if

1. A and B have the same order m n (that is, A and B have the same number m of rows and the same number n of columns.)

2. aij = bij for all i and j. (The (i, j)th entry of A is equal to the corresponding (i, j)th entry of B.)

Page 4: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 4 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

MATRIX ADDITION

A B aij bij ,

If A =[aij] and B = [bij] are two m n matrices, their sum A + B is the matrix defined by the m n matrix defined by

for all i and j.

Page 5: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 5 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

SCALAR MULTIPLICATION

cA caij .

If A = [aij] be an m n matrices, and let c be a real number. Then the scalar product of A and c is denoted by cA and is defined by

Page 6: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 6 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

MATRIX SUBTRACTION

A B A 1 B.

If A and B are two m n matrices, their difference is defined by

Subtraction A – B is performed by subtracting the corresponding entries of B from A.

Page 7: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 7 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

MATRIX ADDITION AND SCALAR MULTIPLICATION PROPERTIES

Let A, B, and C be m n matrices and c and d be scalars.

1. A + B = B + A2. A + (B + C) = (A + B) + C3. A + 0 = 0 + A = A4. A + (–A) = (–A) + A = 05. (cd)A = c(dA)6. 1A = A7. c(A + B) = cA + cB8. (c + d)A = cA + dA

Page 8: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 8 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

EXAMPLE 4 Solving a Matrix Equation

Solve the matrix equation 3A + 2X = 4B for X,

A 2 0

4 6

and B

1 3

5 2

.

Solution

3A 2X 4B

2X 4B 3A

X 1

24B 3A

where

Substitute for A and B.

Page 9: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 9 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

EXAMPLE 4 Solving a Matrix Equation

Solution continued

1

24

1 3

5 2

3

2 0

4 6

1

2

4 12

20 8

6 0

12 18

1

2

2 12

8 10

1 6

4 5

You should check that the matrix X satisfies the given matrix equation.

Page 10: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 10 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

RULE FOR DEFINING THE PRODUCT ABIn order to define the product AB of two matrices A and B, the number of columns of A must be equal to the number of rows of B. If A is an m p matrix and B is a p n matrix, then the product AB is an m n matrix.

Page 11: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 11 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

PRODUCT OF 1 x n AND n x 1 MATRICES

Suppose

is a 1 n row matrix and

is a n 1 column matrix. We define the product

A a1 a2 a3 L an

B

b1

b2

M

bn

AB a1b1 a2b2 ... anbn .

Page 12: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 12 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

MATRIX MULTIPLICATION

Let A = [aij] be an m p matrix and B = [bij] be a p n matrix. Then the product AB is the m n matrix C = [cij], where the entry cij of C is obtained by multiplying the ith row (matrix) of A by the jth column (matrix) of B. The definition of the product AB says that

cij ai1b1 j ai2b2 j ... aipbpj .

Page 13: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 13 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

EXAMPLE 8 Finding the Product of Two Matrices

Find the products AB and BA, where

A 1 2

1 3

and B

3 2 1

1 2 3

.

Solution

Since A is of order 2 2 and the order of B is 2 3, the product AB is defined and has order 2 3.If AB = C = [cij], each entry cij of C is obtained by multiplying the ith row of A by the jth column of B.

Page 14: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 14 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

EXAMPLE 8 Finding the Product of Two Matrices

1 2

* *

3 * *

1 * *

1 3 2 1 * *

* * *

Solution continued

C11 is obtained by multiplying the first row of A by the first column of B.

Thus AB 1 2

1 3

3 2 1

1 2 3

AB 1 3 2 1 1 2 2 2 1 1 2 3 1 3 3 1 1 2 3 2 1 1 3 3

Page 15: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 15 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

EXAMPLE 8 Finding the Product of Two Matrices

Solution continued

The product BA is not defined, because B is of order 2 3 and A is of order 2 2; that is, the number of columns of B is not the same as the number of rows of A.

AB 5 2 7

0 8 8

Page 16: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 16 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

PROPERTIES OF MATRIX MULTIPLICATION

Let A, B, and C be matrices and let c be a scalar. Assume that each product and sum is defined. Then

1. (AB)C = A(BC)

2. (i) A(B + C) = AB + AC

(ii) (A + B)C = AC + BC

3. c(AB) = (cA)B = A(cB)

Page 17: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 17 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

EXAMPLE 10 Transforming a Letter

The capital letter L in the figure is determined by six points (or vertices) P1 – P6 . The coordinates of the six points can be stored in a data matrix D, together with instructions stating that these vertices are connected by lines.

Page 18: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 18 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

EXAMPLE 10 Transforming a Letter

P1 P2 P3 P4 P5 P6

0 4 4 1 1 0

0 0 1 1 6 6

D

Given

x-coordinatey-coordinate

Vertex

compute AD. Graph theA 1 0.25

0 1

,

figure corresponding to the matrix AD by connecting the images of the vertices with the

Page 19: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 19 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

EXAMPLE 10 Transforming a Letter

Solution

The columns of the product matrix AD represent the images of the vertices of the letter L.

appropriate lines. This produces the complete transformed image of the original figure.

AD 1 0.25

0 1

0 4 4 1 1 0

0 0 1 1 6 6

10 0.250 14 0.250 14 0.25100 10 04 10 04 11

Page 20: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 20 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

EXAMPLE 10 Transforming a Letter

Solution continued

The transformed vertices are plotted on the next slide, along with connecting line segments that correspond to those in the original figure.

11 0.251 11 0.256 10 0.2560111 0116 00 16

P1 P2 P3 P4 P5 P6

AD 0 4 4.25 1.25 2.5 1.5

0 0 1 1 6 6

Page 21: Slide 9.2- 1 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Slide 9.2- 21 Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

EXAMPLE 10 Transforming a Letter

Solution continued

The figure is a result of the transformation represented by the product matrix AD.