© 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix...

25
© 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types

Transcript of © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix...

Page 1: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 1

Fundamentals of Engineering AnalysisEGR 1302 - Matrix Multiplication, Types

Page 2: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 2

Matrix Multiplication

Define “Conformable”

To multiply A * B, the matrices must be conformable.

Given matrices: A m x n and B n x p

The number of “Columns” n of A, must equal the number of “Rows” n of BWhich defines the order of the multiplication

A=

2 x 3

For A: m=2, n=3 B=

3 x 4

For B: n=3, p=4

Note that B * A is Undefined (not allowed) because p = m

For A * B, n=n; i.e. 3=3, so A*B is “conformable”

Page 3: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 3

Order of Multiplication

The order in which a multiplication is expressed is important.

We use the terms “pre-multiply” or “post-multiply” to stipulate the order.

Given A * B = C, we say that “B” is “pre-multiplied” by “A”(we could also say that A is post-multiplied by B).

In other words, Matrix Multiplication is NOT Commutative(except in special cases)

Because matrices must be conformable for multiplication; in general

A * B = B * A

Page 4: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 4

Matrix Multiplication

232221

131211

aaa

aaaA

m x n2 x 3

232221

131211

cca

cccC

m x p

333231

232221

131211

bbb

bbb

bbb

B

n x p3 x 3

=

A * B = C is Conformable

Is a Row on Column operation

The Product C will be a 2 x 3

Page 5: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 5

Matrix Multiplication

232221

131211

aaa

aaa

333231

232221

131211

bbb

bbb

bbb

232221

131211

cca

ccc* =

31132112111111 bababac

C11 is made up of Row 1 from A, and Column 1 from B

Note the “sum of products” form

C12 is made up of Row 1 from A, and Column 2 from B

32132212121112 bababac

Remember: 31132112111111 bababac

Page 6: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 6

Matrix Multiplication

232221

131211

aaa

aaaA

3231

2221

1211

bb

bb

bb

B

A * B =

333231

232221

131211

ccc

ccc

ccc

C

2221

1211

cc

ccC

B * A = 3 x 3

2 x 2

Page 7: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 7

112

310

23

10

21

* =9 5

1 7

Matrix Multiplication

A * B =

Page 8: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 8

Matrix Multiplication

4 3 -1

2 1 1

4 -1 11

112

310

23

10

21

B * A =

* =

Work this out yourself, before proceeding,

To make sure you understand the method of matrix multiplication.

Page 9: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 9

Linear Systems as Sum of Products

ax1 + bx2 + cx3 = d

Sum of Products form

[ a b c ] - a 1 x 3 row vector

x1

x2

x3

- a 3 x 1 column vector

[ a b c ] * = [ d ] - a 1 x 1 scalar – i.e.;

x1

x2

x3

ax1 + bx2 + cx3 = d

Page 10: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 10

Conformability and Order of Matrix Multiplication

Given: A5x4 B4x5 C6x4

A * B = D5x5

B * A = E4x4

A * C = not conformable

C * A = not conformable

C * B = F6x5

A * B * C = not conformable

C * B * A = G6x4

Page 11: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 11

Properties of a Zero Matrix

123

011

21

21

21

* =

00

00

In Algebra, x * 0 = 0, but if x = 0, and y = 0, then x * y = 0

In Matrix Algebra, even if A = 0, and B = 0, A * B can be [0]

Note that:

123

011

21

21

21* =

257

257

257

Page 12: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 12

Matrix Form of Linear Equations

Distributive Property: A(B+C) = AB + AC

Associative Property: A(BC) = (AB)C

111 cba

3

2

1

x

x

x 312111 xcxbxa

1312111 dxcxbxa

2322212 dxcxbxa

3332313 dxcxbxa

Then can become

333

222

111

cba

cba

cba

3

2

1

x

x

x

3

2

1

d

d

d

A x

d

* = Any Order

?How do wesolve thissystem

of equations

Page 13: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 13

Special Matrices

The Transpose Matrix

Rule: The Row becomes the Column, and the Column becomes the Row

232221

131211

aaa

aaaA

2313

2212

2111

aa

aa

aa

AT

A is a 2x3, so AT will be a 3x2

333231

232221

131211

bbb

bbb

bbb

B

332313

322212

312111

bbb

bbb

bbb

BTFor a 3x3

Page 14: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 14

Properties of the Transpose Matrix

112

101TA

11

10

21

A

221

013B

20

21

13TB

11

10

21

221

013

232

221

435

A*B=

AT*BT = ?

BT*AT =

20

21

13

112

101

224

323

215

(AB)T= BT*AT

Page 15: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 15

Additional Properties of the Transpose

If A+B and A*B are allowed (are conformable), then

(A+B)T = AT + BT

(AB)T = BTAT

Page 16: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 16

The Symmetric Matrix

212

123

235

A = AT

Must be Square: n x n

jiij aa

A + AT must also be Symmetric

The Diagonal

Page 17: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 17

The Diagonal Matrix

300

020

005

Must be Square: n x nAll off-diagonal elements

Are Zero

333322221111 ,, bababa

If A and B areDiagonal

200

040

001

300

020

005

+A+B

will be Diagonal

500

060

006

=

200

040

001

300

020

005If A and B areDiagonal * A*B

will be Diagonal

600

080

005

=

Page 18: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 18

The Identity Matrix

100

010

001Must be Square: n x nAnd must be Diagonal

Can be any Order Notation: IN The Unity term

A*I = AI*A = A

A does not have to be square

Amxn * In = A or Im * Amxn = A

Page 19: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 19

Powers of Matrices

A * A = A2 for Square Matrices Only

A * A2 = A3 … and so on

If A is Diagonal … A2 = a112, a22

2, a332

200

010

003

200

010

003

400

010

009

=*

Page 20: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 20

Matrix Math on the TI-89 Calculator

My Philosophy for using Calculators(and Computers …)

Be aware of theOrder of Magnitude

Sign Errors are easy to miss

Double check your work

If you understand the solution methodology,You will understand the answer.

Page 21: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 21

103

231

012

A

412

150B

A*B – not conformable B*A = ?

Matrix Math on the TI-89 Calculator

Page 22: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 22

412

150B

Matrix Math on the TI-89 Calculator (cont.)

Page 23: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 23

Matrix Math on the TI-89 Calculator (cont.)

Page 24: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 24

Using the Matrix Editor on the TI-89

Page 25: © 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 - Matrix Multiplication, Types.

© 2005 Baylor UniversitySlide 25

Questions?