2.1 matrix operations - washington state university · 2.1 matrix operations ... matrix addition...

4
2.1 MATRIX OPERATIONS Column j Row i a 11 a 1 j a 1 n » » » a i 1 a ij a in » » » a m 1 a mj a mn = A a 1 a j a n FIGURE 1 Matrix notation The diagonal entries in an m n matrix A = Aa ij E are a 11 , a 22, a 33, … and they form the main diagonal of A. A diagonal matrix is a square matrix whose nondiagonal entries are zero. An m n matrix of zeros is a zero matrix and is written as 0. Sums and Scalar Multiples Matrix addition and scalar multiplication works like you would expect it to. Add terms in the same position. Multiply the scalar by all terms in the matrix. K 3 0 5 -1 3 4 O + K 1 1 2 6 5 7 O = K 4 1 7 5 8 11 O K 4 0 5 -1 3 2 O + K 2 -3 0 1 O = DOES NOT EXIST 3 K 1 1 2 6 5 7 O = K 3 3 6 18 15 21 O THEOREM 1 Let A, B, and C be matrices of the same size, and let r and s be scalars. a. A + B = B + A b. H A + BL + C = A + HB + CL c. A + 0 = A d. rH A + BL = rA + rB e. Hr + sL A = rA + sA f. rHsAL = HrsL A Matrix Multiplication does not work quite how you might expect it to! GOAL: x Bx A HBxL Multiplication Multiplication by B by A FIGURE 2: Multiplication by B and then A

Upload: hakhanh

Post on 09-Sep-2018

234 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2.1 MATRIX OPERATIONS - Washington State University · 2.1 MATRIX OPERATIONS ... Matrix addition and scalar multiplication works like you would expect it to. ... 4 1 7 5 8 11 O K

2.1 MATRIX OPERATIONS

Column

j

Row i

a11 º a1 j º a1 n

» » »

ai 1 º ai j º ai n

» » »

am 1 º am j º am n

= A

­

a1 a j an

FIGURE 1 Matrix notation

The diagonal entries in an m � n matrix A = Aa i jE are a11, a22, a33, …and they form the main diagonal of A.

A diagonal matrix is a square matrix whose nondiagonal entries are zero.

An m � n matrix of zeros is a zero matrix and is written as 0.

Sums and Scalar Multiples

Matrix addition and scalar multiplication works like you would expect it to. Add terms in the same position. Multiply the scalar by all terms in

the matrix.

K 3 0 5

-1 3 4O + K 1 1 2

6 5 7O = K 4 1 7

5 8 11O

K 4 0 5

-1 3 2O + K 2 -3

0 1O = DOES NOT EXIST

3 K 1 1 2

6 5 7O = K 3 3 6

18 15 21O

THEOREM 1

Let A, B, and C be matrices of the same size, and let r and s be scalars.

a. A + B = B + A

b. HA + BL + C = A + HB + CLc. A + 0 = A

d. rHA + BL = rA + rB

e. Hr + sL A = rA + sA

f. rHsAL = HrsL A

Matrix Multiplication does not work quite how you might expect it to!

GOAL:

x B x A HB xL

Multiplication Multiplication

by B by A

FIGURE 2: Multiplication by B and then A

Page 2: 2.1 MATRIX OPERATIONS - Washington State University · 2.1 MATRIX OPERATIONS ... Matrix addition and scalar multiplication works like you would expect it to. ... 4 1 7 5 8 11 O K

x B x A HB xL

Multiplication Multiplication

by B by A

Multiplication

by A B

FIGURE 3: Multiplication by A B

DEFINITION : A B = AA b1 A b2 º A bpE Multiplication of matrices corresponds to composition of linear transformations.

Compute A B, where A = K 2 5 -2

-1 -5 1O and B =

4 2

5 2

1 2

.

SOLUTION Write B = @ b1 b2 D , and compute:

A b1 =2 5 -2

-1 -5 1

4

5

1

, A b2 =2 5 -2

-1 -5 1

2

2

2

,

=31

-28=

10

-10

Then A B = B A b1 A b2 D =31 10

-28 -10

Each column of A B is a linear combination of the columns of A using weights from the corresponding column of B.

The number of columns of A must equal the number of rows in B in order for A B to exist.

Row - Column Rule for Computing A B

HA BLi j = ai 1 b1 j + ai 2 b2 j + º + ai n bn j = Úk=1

naik bkj

Row View :

rowi HA BL = rowi HAL × B

2 Lecture2.1.nb

Page 3: 2.1 MATRIX OPERATIONS - Washington State University · 2.1 MATRIX OPERATIONS ... Matrix addition and scalar multiplication works like you would expect it to. ... 4 1 7 5 8 11 O K

EX5

row of AB 1 2 3 4 5

column of AB 1 2 3A

3 5 -1 2

-2 1 -4 1

0 3 0 -4

-4 -3 -2 4

-2 1 0 0

B

2 0 1

0 -2 2

4 1 3

2 0 6

AB =

6 -11 22

-18 -6 -6

-8 -6 -18

-8 4 8

-4 -2 0

H-4 LH 1 L + H -3 LH 2 L + H -2 LH 3 L + H 4 LH 6 L=

-4 + -6 + -6 + 24

=

8

Number of rows for A 4

Number of columns for A 4

new matrices

A=

1 -4 4 -2

-2 -1 -5 2

3 -2 -3 -3

1 0 -5 -2

B=

-1 -5 -5 -5

-3 3 -2 -5

4 5 0 -5

-1 0 -3 0

AB=

29 3 9 -5

-17 -18 6 40

-6 -36 -2 10

-19 -30 1 20

BA=

-11 19 61 17

-20 13 4 28

-11 -21 16 12

-10 10 5 11

THEOREM 2

Let A be an m � n matrix, and let B and C have sizes for which the indicated sums and products are defined.

a. A HB CL = HA BL C (associative law of multiplication)

b. AHB + CL = A B + A C (left distributive law)

c. HB + CL A = B A + C A (right distributive law)

d. r HA BL = Hr AL B = AHr BL for any scalar r

e. Im A = A = A In (identity for matrix multiplication)

f. A B ¹ B A MOST of the time.

Lecture2.1.nb 3

Page 4: 2.1 MATRIX OPERATIONS - Washington State University · 2.1 MATRIX OPERATIONS ... Matrix addition and scalar multiplication works like you would expect it to. ... 4 1 7 5 8 11 O K

Powers of a Matrix

Ak = A A º A

§

k timesNote: A

0 = I

The Transpose of a Matrix

Let A be a matrix. The transpose, denote AT, is formed by writing the rows of A down the columns of A

T

A =

-5 2

1 -3

0 4

AT

= K -5 1 0

2 -3 4O

THEOREM 3

Let A and B denote matrices whose sizes are appropriate for the following sums and products.

a. JIAT MT N = A

b. HA + BLT = AT + B

T

c. For any scalar r, Hr ALT = r IAT M

d. HA BLT = BT

AT

c. For any scalar r, Hr ALT = r IAT M

4 Lecture2.1.nb