150714_uwin-me09-s35

35
Bachelor in Economics (S.E): Manajemen Course : Matematika Ekonomi ( 1507ME09) online.uwin.ac.id

Upload: elearninglspr

Post on 13-Jan-2016

179 views

Category:

Documents


0 download

DESCRIPTION

150714_UWIN-ME09-s35

TRANSCRIPT

Page 1: 150714_UWIN-ME09-s35

Bachelor in Economics (S.E): Manajemen

Course : Matematika Ekonomi (1507ME09)

online.uwin.ac.id

Page 2: 150714_UWIN-ME09-s35

Session Topic : Introduction to Matrices

Course: Matematika Ekonomi

By Handri Santoso, Ph.D

UWIN eLearning Program

Page 3: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.3

Content

• Part 1 Introduction

• Part 2 Matrix Addition, Subtraction

• Part 3 Matrix Multiplication

Page 4: 150714_UWIN-ME09-s35

Part1: Introduction

Page 5: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.5

Introduction: Matrices

What You’ll See in This Chapter

• This chapter introduces matrices.

• It is divided into 3 sections.

Discusses...,

a. Some of the basic properties & operations of matrices strictly

from a mathematical perspective.

b. Several types of special matrices

c. Basic operation of matrices

Page 6: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.6

Introduction: Word Cloud

Page 7: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.7

Matrix: An Algebraic Definition

a. Algebraic definition of a matrix:

A table of scalars in square

brackets.

b. Matrix dimension. Defn:

The width & height of the table,

w x h.

c. Typically we use dimensions,

• 2 x 2 for 2D work &

• 3 x 3 for 3D work.

d. We’ll find a use for 4 x 4

matrices also.

• It’s a kluge.

• More later.

Page 8: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.8

Matrix: Definition

A Matrix

Defn: A rectangular array of numbers.

Page 9: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.9

Matrix: Definition (Cont.)

mnmm

ij

n

n

aaa

a

aaa

aaa

A

21

22221

11211

m rows

n columns

m n matrix

Element in ith row, jth column

When m=n, A is called a square matrix.

Also written as A=aij

Page 10: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.10

Matrix: Components & Square

Matrix Components

a. Entries

• Defn: Numbered by row &

column,

• eg. mij is the entry in row i,

column j.

b. Start numbering at 1, not 0.

Square Matrices

a. Same number as rows as columns

b. Entries,

• mij are called the diagonal

entries.

• The others are called

nondiagonal entries.

Page 11: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.11

Matrix: Diagonal

>A diagonal matrix. Defn:

• A square matrix whose non-

diagonal elements are zero.

At AIf A is called symmetric.

201

034

141• is symmetric.

• Note, for A to be symmetric, is has to be square.

nI is trivially symmetric...

>Symmetric Matrix

Page 12: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.12

Matrix: The Identity & Vector

The identity matrix of,

• dimension n, denoted In,

• is the n x n matrix with…

• …1s on the diagonal & 0s elsewhere.

Vectors as Matrices

a. A row vector is a 1 x n matrix.

b. A column vector is an n x 1 matrix.

c. They were pretty much interchangeable in the lecture on Vectors.

d. They’re not once you start treating them as matrices.

Page 13: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.13

Matrix: Transpose

Transpose of a Matrix

1. The transpose of an r x c matrix M is a c x r matrix called MT.

2. Take every row & rewrite it as a column.

3. Equivalently, flip about the diagonal

Facts About Transpose

a. Transpose is its own inverse: (MT)T = M for all matrices M.

b. DT = D for all diagonal matrices D (including the identity matrix I).

Page 14: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.14

Matrix: Vector & Equality

Transpose of a Vector

• If v is a row vector,

• vT is a column vector & vice-versa

Matrix Equality

Defn: Let A & B be 2 matrices.

• A=B if they have the same number of rows &columns, &

• every element at each position in A equals element at corresponding

position in B.

Page 15: 150714_UWIN-ME09-s35

Part2: Matrix Addition, Subtraction

Page 16: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.16

Matrix: Addition & Subtraction

Let A = aij , B = bij be mn matrices. Then:

• A + B = aij + bij &

• A - B = aij - bij

34

04

34

32

41

43

02

43

11

30

82

52

32

41

43

02

43

11

Page 17: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.17

Matrix: Addition & Subtraction (Cont.)

Let A = aij , B = bij be mn matrices. Then:

• A + B = aij + bij &

• A - B = aij - bij

Solution

Total sales for each week will simply be the sum of,

• the corresponding elements in matrices A & B.

• For example, in week I the total sales of product Q will be 5 plus 8.

• Total combined sales for Q & R can therefore be represented by the

matrix.

521188

4398

1491210

71245T = A + B =

5142191812810

473129485= =

19303018

11151313

Page 18: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.18

Matrix: Addition & Subtraction (Cont.)

Let A = aij , B = bij be mn matrices. Then:

• A + B = aij + bij &

• A - B = aij - bij

158

3012If A = & B =

84

357

Q: What is A-B?

A: Solution

A-B =

74

5-5

8-154-8

35-307-12

84

357

158

3012

Page 19: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.19

Matrix: Properties

Page 20: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.20

Matrix: Multiplication

Matrix Multiplication Facts

a. Not commutative: in general AB BA.

b. Associative:

(AB)C = A(BC)

c. Associates with scalar multiplication:

k(AB) = (kA)B =A(kB)

d. (AB)T = BTAT

e. (M1M2M3…Mn)T = Mn

T …M3TM2

TM1T

Page 21: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.21

Matrix: Multiplication (Cont.)

Vector-Matrix Multiplication Facts,

a. …1

Associates with vector multiplication.

Let v be,

1. …a row vector

v(AB) = (vA)B

2. …a column vector

(AB)v = A(Bv)

b. …2

• Vector-matrix multiplication distributes over vector addition:

(v + w)M = vM + wM

• That was for row vectors v, w.

Similarly for column vectors.

Page 22: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.22

Matrix: Scalar

Multiplying by a scalar

a. Can multiply a matrix by a scalar.

b. Result is a matrix of the same dimension.

c. To multiply,

• …a matrix by a scalar,

• …each component by the scalar.

Page 23: 150714_UWIN-ME09-s35

Part3: Matrix Multiplication

Page 24: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.24

Matrix Multiplication: Fletcher Dunn & Ian Parberry

Fletcher Dunn

• Software Developer

(2011-Present)

• Lead Engineer (2007-

2009)

• Multiplying an r x n matrix A by…

• …an n x c matrix B gives an r x c result AB.

Prof. Ian Parberry

Prof. Computer Science &

Engineering (1984)

Page 25: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.25

Multiplication: Result

a. Multiply an r x n matrix A by,• an n x c matrix B to..• …give an r x c result C = AB.

b. Then C = [cij], • where cij is the dot product of…• …the ith row of A with the jth column of B.

c. That is:

Page 26: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.26

Multiplication: Example

Page 27: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.27

Multiplication: Another Way of Looking at It

Page 28: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.28

Multiplication: 2 x 2

2 x 2 AB

Case

Example

Page 29: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.29

Multiplication: 3 x 3 Case

Page 30: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.30

Multiplication: 3 x 3 Example

Page 31: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.31

Multiplication: Identity Matrix

a. Recall that the identity matrix I (or In) is,

• a diagonal matrix whose diagonal entries are all 1.

b. Now that we’ve seen the definition of matrix multiplication,

• we can say that IM = MI = M for…

• …all matrices M (dimensions appropriate)

Page 32: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.32

Row Vector Times Matrix Multiplication

• Can multiply a row vector times a matrix

Matrix Times Column Vector Multiplication

• Can multiply a matrix times a column vector.

Multiplication: Row & Column Vector

Page 33: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.33

a. Row vs. column vector matters now.

Here’s why: Let v be a row vector, M a matrix.

• vM is legal, Mv is undefined

• MvT is legal, vTM is undefined

b. DirectX uses row vectors.

c. OpenGL uses column vectors.

Multiplication: Row vs Column Vector

Page 34: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.34

Common Mistake

• MvT (vM)T, but MvT = (vMT)T

• compare the following 2 results:

Multiplication: Common Mistake

Page 35: 150714_UWIN-ME09-s35

Powered by HarukaEdu.com - 1507ME09- S.35

online.uwin.ac.id

Associate Partners :

Powered by HarukaEdu.com

Course : Matematika Ekonomi (1507ME09)