Autar Kaw Benjamin Rigsby - MATH FOR...

37
Autar Kaw Benjamin Rigsby http://nm.MathForCollege.com Transforming Numerical Methods Education for STEM Undergraduates

Transcript of Autar Kaw Benjamin Rigsby - MATH FOR...

Page 1: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

Autar KawBenjamin Rigsby

http://nm.MathForCollege.comTransforming Numerical Methods Education for STEM Undergraduates

Page 2: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

http://nm.MathForCollege.com

Page 3: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

1. add, subtract, and multiply matrices, and

2. apply rules of binary operations on matrices.

Page 4: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

Two matrices and can be added only if they are the same size. The addition is then shown as

][][][ BAC +=

ijijij bac +=

where

Page 5: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

Add the following two matrices.

.

=

721325

][A

−=

1953276

][B

Page 6: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

][][][ BAC +=

−+

=

1953276

721325

+++−++

=1975231237265

=

26741911

Page 7: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

×

Blowout r’us store has two store locations and , and their sales of tires are given by make (in rows) and quarters (in columns) as shown below.

×

=

2771662515105232025

][A

=

2071421156304520

][B

where the rows represent the sale of Tirestone, Michigan and Copper tires respectively and the columns represent the quarter number: 1, 2, 3 and 4. What are the total tire sales for the two locations by make and quarter?

Page 8: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

ABCDG d trapezoiofArea =

][][][ BAC +=

+

=

2771662515105232025

2071421156304520

( ) ( ) ( ) ( )( ) ( ) ( ) ( )( ) ( ) ( ) ( )

++++++++++++

=20277711646212515156103502435202025

Page 9: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

So if one wants to know the total number of Copper tires sold in quarter 4 at the two locations, we would look at Row 3 – Column 4 to give .4734 =c

=

471417104630168272545

The answer then is,

Page 10: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

Two matrices ][A and ][B can be subtracted only if they are the same size. The subtraction is then given by

][][][ BAD −=

Where

ijijij bad −=

Page 11: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

Subtract matrix ][B from matrix .][A

=

721325

][A

−=

1953276

][B

Page 12: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

][][][ BAD −=

−−

=

1953276

721325

−−−−−−−

=)197()52()31())2(3()72()65(

−−−

−−=

1232551

Page 13: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

×

Blowout r’us store has two store locations and , and their sales of tires are given by make (in rows) and quarters (in columns) as shown below.

×

=

2771662515105232025

][A

=

2071421156304520

][B

where the rows represent the sale of Tirestone, Michigan and Copper tires respectively and the columns represent the quarter number: 1, 2, 3 and 4. What are the total tire sales for the two locations by make and quarter?

Page 14: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

][][][ BAD −=

+

=

2771662515105232025

2071421156304520

−−−−−−−−−−−−

=20277711646212515156103502435202025

Page 15: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

So if you want to know how many more Copper tires were sold in quarter 4 in store A than store B, . Note that implies that store A sold 1 less in Michigan tire than store B in quarter 3.

734 =d 113 −=d

−=

70152404221155

The answer then is,

Page 16: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

Two matrices [A] and [B] can be multiplied only if the number of columns of [A] is equal to the number of rows of [B] to give

nppmnm BAC ××× = ][][][

If ][A is a pm× matrix and ][B is a np× matrix, the resulting matrix ][C

is a nm× matrix.

Page 17: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

So how does one calculate the elements of ][C matrix?

∑=

=p

kkjikij bac

1

pjipjiji bababa +++= 2211

for each mi ,,2 ,1 = and nj ,,2 ,1 =

To put it in simpler terms, the thi row and thj column of the ][C matrix in

]][[][ BAC = is calculated by multiplying thethi row of ][A by the thj

column of . ][B

Page 18: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

Given the following two matrices,

=

721325

][A

−−−

=1098523

][B

Find their product,

[ ] [ ][ ]BAC =

Page 19: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

12c be found by multiplying the first row of ][A by the second column of ,][B

[ ]

−−−

=1082

32512c

)10)(3()8)(2()2)(5( −+−+−=

56−=

Page 20: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

Similarly, one can find the other elements of ][C to give

−−

=88765652

][C

Page 21: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

×

Blowout r’us store has two store locations and , and their sales of tires are given by make (in rows) and quarters (in columns) as shown below.

×

=

2771662515105232025

][A

=

2071421156304520

][B

where the rows represent the sale of Tirestone, Michigan and Copper tires respectively and the columns represent the quarter number: 1, 2, 3 and 4.

Page 22: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

Find the per quarter sales of store A if the following are the prices of eachtire.

Tirestone = $33.25Michigan = $40.19Copper = $25.03

The answer is given by multiplying the price matrix by the quantity of sales of store

A. The price matrix is

A

A

. The price matrix is .[ ]03.2519.4025.33

Page 23: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

Therefore, the per quarter sales of store A dollars is given by the four columns of the row vector

[ ] [ ]06.174781.87738.146738.1182=C

×Remember since we are multiplying a 1 3 matrix by a 3

resulting matrix is a 1 4 matrix.

4 matrix, the××

Page 24: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

If ][A is a nn× matrix and k is a real number, then the scalar product of

k and ][A is another nn× matrix , where . ][Bijij akb =

Page 25: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

Given the matrix,

=

615231.2

][A

][2 AFind

Page 26: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

=

615231.2

2][2 A

××××××

=62125222321.22

=

12210462.4

The solution to the product of a scalar and a matrix by the following method,

Page 27: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

][],.....,[],[ 21 pAAA pkkk ,.....,, 21

][........][][ 2211 pp AkAkAk +++

][],.....,[],[A 21 pAA

If are matrices of the same size and are scalars,then is called a linear combination of

Page 28: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

=

=

=

65.3322.20

][,615231.2

][,123265

][ 321 AAA

If

then find

][5.0][2][ 321 AAA −+

Page 29: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

][5.0][2][ 321 AAA −+

+

=

65.3322.20

5.0615231.2

2123265

+

=

375.15.111.10

12210462.4

123265

=

1025.25.1159.102.9

Page 30: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

Commutative law of addition

If [A] and [B] are m×n matrices, then [A]+[B]=[B]+[A]

Associative law of addition

If [A], [B] and [C] are m×n, n×p, and p×r size matrices, respectively, then[A]+([B]+[C])=([A] +[B])+[C]

Associative law of multiplication

If [A], [B] and [C] are all m×n, n×p and p×r size matrices, respectively, then[A]([B][C])=([A][B])[C]

and the resulting matrix size on both sides of the equation is m×r.

Page 31: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

If [A] and [B] are m×n matrices, and [C] and [D] are n×p size matrices[A]([C]+[D])=[A][C]+[A][D]([A]+[B])[C]=[A][C]+[B][C]

and the resulting matrix size on both sides of the equation is m×r.

Distributive Law

Page 32: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

Illustrate the associative law of multiplication of matrices using

=

=

=

5312

][,6952

][,205321

][ CBA

Page 33: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

=]][[ CB

=

5312

6952

=

39362719

=

39362719

205321

])][]([[ CBA

=

787227623710591

Page 34: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

=

6952

205321

]][[ BA

=

121845511720

=

5312

121845511720

]])[][([ CBA

=

787227623710591

Page 35: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

If [A][B] exists, number of columns of [A] has to be same as the number of rows

of [B] and if [B][A] exists, number of columns of [B] has to be same as the

number of rows of [A].

Now for [A][B]=[B][A], the resulting matrix from [A][B] and [B][A] has to be of

the same size. This is only possible if [A] and [B] are square and are of the same

size. Even then in general [A][B]≠[B][A].

Page 36: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

Determine if

[A][B]=[B][A]

for the following matrices

−=

=

5123

][,5236

][ BA

Page 37: Autar Kaw Benjamin Rigsby - MATH FOR COLLEGEmathforcollege.com/.../gen/04sle/mws_gen_sle_ppt_binary.pdf2. apply rules of binary operations on matrices. Two matrices and can be added

]][[ BA

=

5123

5236

−−

=2912715

]][[ AB

−=

5236

5123

−=

2816114

]][[]][[ ABBA ≠Therefore