Вы находитесь на странице: 1из 35

Course : Matematika Ekonomi (1507ME09)

online.uwin.ac.id
Bachelor in Economics (S.E): Manajemen

UWIN eLearning Program

Session Topic : Introduction to Matrices


Course: Matematika Ekonomi
By Handri Santoso, Ph.D

Content

Part 1

Introduction

Part 2

Matrix Addition, Subtraction

Part 3

Matrix Multiplication

Powered by HarukaEdu.com

- 1507ME09-

S.3

Part1: Introduction

Introduction: Matrices

What Youll 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

Powered by HarukaEdu.com

- 1507ME09-

S.5

Introduction: Word Cloud

Powered by HarukaEdu.com

- 1507ME09-

S.6

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.
Powered by HarukaEdu.com

c.

d.

Typically we use dimensions,


2 x 2 for 2D work &
3 x 3 for 3D work.
Well find a use for 4 x 4
matrices also.
Its a kluge.
More later.

- 1507ME09-

S.7

Matrix: Definition

A Matrix
Defn: A rectangular array of numbers.

Powered by HarukaEdu.com

- 1507ME09-

S.8

Matrix: Definition (Cont.)

a11
a
21

A

a
m1

a12
a22

am 2

a1n
a2 n

aij

amn

Element in ith row, jth column

m rows

Also written as A=aij

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

Powered by HarukaEdu.com

- 1507ME09-

S.9

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.

Powered by HarukaEdu.com

Square Matrices
a. Same number as rows as columns
b. Entries,
mij are called the diagonal
entries.
The others are called
nondiagonal entries.

- 1507ME09-

S.10

Matrix: Diagonal

>A diagonal matrix. Defn:


A square matrix whose nondiagonal elements are zero.

>Symmetric Matrix

If A t A

1
4

A is called symmetric.

4 1
3

1 0

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

I n is trivially symmetric...
Powered by HarukaEdu.com

- 1507ME09-

S.11

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. Theyre not once you start treating them as matrices.

Powered by HarukaEdu.com

- 1507ME09-

S.12

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).

Powered by HarukaEdu.com

- 1507ME09-

S.13

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.

Powered by HarukaEdu.com

- 1507ME09-

S.14

Part2: Matrix Addition, Subtraction

Matrix: Addition & Subtraction

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


A + B = aij + bij &
A - B = aij - bij

1 1 3

4 4 3

4 1 4 4 0

1 1 3

4 3

4 2 5

4 1 4 2

Powered by HarukaEdu.com

- 1507ME09-

S.16

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.
T=A+B=

=
Powered by HarukaEdu.com

12

10 12

5 8

49

7 8 9 3 4

14 8 18 21 5
123

7 4

108 1218 9 21 14 5
- 1507ME09-

13 13 15 11

18 30 30 19

S.17

Matrix: Addition & Subtraction (Cont.)

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


A + B = aij + bij &
A - B = aij - bij
If A =

12 30

15

& B=

7 35

Q: What is A-B?
A: Solution
12 30 7 35 12-7 30-35 5 -5

A-B =

4
7
8 15 4 8 8- 4 15-8

Powered by HarukaEdu.com

- 1507ME09-

S.18

Matrix: Properties

Powered by HarukaEdu.com

- 1507ME09-

S.19

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. (M1M2M3Mn)T = MnT M3TM2TM1T

Powered by HarukaEdu.com

- 1507ME09-

S.20

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.
Powered by HarukaEdu.com

- 1507ME09-

S.21

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.

Powered by HarukaEdu.com

- 1507ME09-

S.22

Part3: Matrix Multiplication

Matrix Multiplication: Fletcher Dunn & Ian Parberry

Fletcher Dunn
Software Developer
(2011-Present)
Lead Engineer (20072009)

Prof. Ian Parberry


Prof. Computer Science &
Engineering (1984)

Multiplying an r x n matrix A by
an n x c matrix B gives an r x c result AB.

Powered by HarukaEdu.com

- 1507ME09-

S.24

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:

Powered by HarukaEdu.com

- 1507ME09-

S.25

Multiplication: Example

Powered by HarukaEdu.com

- 1507ME09-

S.26

Multiplication: Another Way of Looking at It

Powered by HarukaEdu.com

- 1507ME09-

S.27

Multiplication: 2 x 2

2x2

AB

Case

Example

Powered by HarukaEdu.com

- 1507ME09-

S.28

Multiplication: 3 x 3 Case

Powered by HarukaEdu.com

- 1507ME09-

S.29

Multiplication: 3 x 3 Example

Powered by HarukaEdu.com

- 1507ME09-

S.30

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 weve seen the definition of matrix multiplication,
we can say that IM = MI = M for
all matrices M (dimensions appropriate)

Powered by HarukaEdu.com

- 1507ME09-

S.31

Multiplication: Row & Column Vector

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.

Powered by HarukaEdu.com

- 1507ME09-

S.32

Multiplication: Row vs Column Vector

a. Row vs. column vector matters now.


Heres 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.

Powered by HarukaEdu.com

- 1507ME09-

S.33

Multiplication: Common Mistake

Common Mistake
MvT (vM)T, but MvT = (vMT)T
compare the following 2 results:

Powered by HarukaEdu.com

- 1507ME09-

S.34

Course : Matematika Ekonomi (1507ME09)

online.uwin.ac.id
Associate Partners :
Powered
by HarukaEdu.com
Powered
by HarukaEdu.com

- 1507ME09-

S.35

Вам также может понравиться