[go: up one dir, main page]

0% found this document useful (0 votes)
2 views24 pages

8A - Matrices

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 24

MATRICES

Business Mathematics
CONTENTS

Matrices
Special matrices
Operations with matrices
Matrix multiplication
More operations with matrices
Matrix transposition
Symmetric matrices
Relevance in the business literature (example)
Further study

2
MATRICES

A matrix is a rectangular array of numbers or variables

Notation
We often use bold non-italic capital letters to refer to them
𝑎1,1 𝑎1,2 ⋯ 𝑎1,𝑛
3 2 𝑎2,1 𝑎2,2 ⋯ 𝑎2,𝑛
𝐐 = −2 0 or 𝐀 = ⋯ ⋯ ⋯ ⋯
12.5 −12.7 𝑎𝑚,1 𝑎𝑚,2 ⋯ 𝑎𝑚,𝑛

Terminology
▪ these matrices consist of 6 respectively 𝑚𝑛 elements
▪ the order (or size) is 3 × 2 respectively 𝑚 × 𝑛
▪ when 𝑚 = 𝑛, the matrix is a square matrix
▪ when 𝑚 ≠ 𝑛, the matrix is rectangular

3
MATRICES

Some remarks on notation


𝑥 𝑥 𝑥 𝑥 𝑥 𝑥
▪ embraced by brackets: or (not by braces )
𝑥 𝑥 𝑥 𝑥 𝑥 𝑥
▪ indexing individual elements through two subscripts: 𝑎𝑖𝑗 or 𝑎𝑖,𝑗

We define 𝐀 = 𝑎𝑖𝑗 as the matrix of order 𝑚 × 𝑛


𝑚×𝑛
with elements 𝑎𝑖𝑗 , 𝑖 = 1, … 𝑚, 𝑗 = 1, … , 𝑛:

𝑎11 𝑎12 ⋯ 𝑎1𝑛


𝑎21 𝑎22 ⋯ 𝑎2𝑛
𝐀= ⋯ ⋯ ⋯ ⋯
𝑎𝑚1 𝑎𝑚2 ⋯ 𝑎𝑚𝑛

4
MATRICES

3 2
In 𝐐 = −2 0 the element 𝑞2,1 refers to the cell at row 2 and column 1
12.5 −12.7
▪ so to −2 Notice the order
▪ while 𝑞1,2 is in row 1 and column 2 and has value 2 of the indices

The order of 𝐐 is 3 × 2, not 2 × 3

Conventions: A column is
▪ element 𝑎row index,column index vertical ...
▪ order 𝑚row × 𝑛column
▪ when no ambiguity you write 𝑎𝑖𝑗 instead of 𝑎𝑖,𝑗

5
EXERCISE 1

1 0 −3
Given is 𝐙 = 𝑧𝑖𝑗 =
5 4 2

Find 𝑧1,2 + 𝑧2,2

6
SPECIAL MATRICES

0 0 ⋯ 0
0 0 ⋯ 0
Zero matrix: 𝟎=
⋯ ⋯ ⋯ ⋯
0 0 ⋯ 0
for a matrix of any order (not necessarilly square)

1 0 ⋯ 0
0 1 ⋯ 0
Identity matrix: 𝐈 =
⋯ ⋯ ⋯ ⋯
0 0 ⋯ 1
for a square matrix (so, 𝑚 = 𝑛)

If needed, we indicate the order by subscripts

Examples: 𝟎3×4 , 𝐈5

8
OPERATIONS WITH MATRICES

We can define some basic operations with matrices, similar to the basic operations with
vectors
▪ addition: 𝐀 + 𝐁, through 𝑎 + 𝑏 𝑖𝑗 = 𝑎𝑖𝑗 + 𝑏𝑖𝑗
▪ multiplication: 𝑐𝐀, through 𝑐𝑎 𝑖𝑗 = 𝑐 × 𝑎𝑖𝑗
▪ negative matrix:−𝐀, through −𝑎 𝑖𝑗 = −𝑎𝑖𝑗
▪ subtraction: 𝐀 − 𝐁, through 𝑎 − 𝑏 𝑖𝑗 = 𝑎𝑖𝑗 − 𝑏𝑖𝑗
▪ equality: 𝐀 = 𝐁, through 𝑎𝑖𝑗 = 𝑏𝑖𝑗

But what about the inner product?


▪ not available for matrices, so don’t write 𝐀 ⋅ 𝐁 or 𝐀, 𝐁
▪ instead: matrix multiplication (see next slides) The matrices 𝐀
and 𝐁 must be of
equal order

9
EXERCISE 2

2 −1 0 2
Given is 𝐀 = and 𝐁 =
3 0 1 −3

Find 2𝐀 − 𝐁

10
MATRIX MULTIPLICATION

Let 𝐀 and 𝐁 be two matrices, of order 𝑚 × 𝑝 respectively 𝑝 × 𝑛

We define the matrix product 𝐀𝐁 as

𝐀𝐁 𝑖𝑗 = ෍ 𝑎𝑖𝑘 𝑏𝑘𝑗 , 𝑖 = 1, … , 𝑚, 𝑗 = 1, … , 𝑛
𝑘=1

Notice: the result of multiplication of two matrices is a matrix


(while the inner product of two vectors is a scalar number)

12
MATRIX MULTIPLICATION

Illustration
element in row 1 column 2:
2

𝐀𝐁 1,2 = ෍ 𝑎1,𝑘 𝑏𝑘,2 = 𝑎1,1 𝑏1,2 + 𝑎1,2 𝑏2,2


𝑘=1
element in row 3 column 3
2

𝐀𝐁 3,3 = ෍ 𝑎3,𝑘 𝑏𝑘,3 = 𝑎3,1 𝑏1,3 + 𝑎3,2 𝑏2,3


𝑘=1

13
MATRIX MULTIPLICATION

Notice the orders of the matrices:


𝐀 𝑚×𝑝 𝐁 𝑝×𝑛 = 𝐀𝐁 𝑚×𝑛

▪ so #columns in 𝐀 should match #rows in 𝐁


▪ and #rows in 𝐀𝐁 is #rows in 𝐀
▪ and #columns in 𝐀𝐁 is #columns in 𝐁

Consequences
Given a matrix 𝐀 or order 3 × 3 and a matrix 𝐁 of order 3 × 2
▪ 𝐀𝐁 exists and is of order 3 × 2
▪ 𝐁𝐀 does not exist
▪ what about 𝐀𝐀? and 𝐁𝐁? and 𝐀𝐁 𝐀𝐁 ?

14
EXERCISE 3

2 −1 0 2
Given is 𝐀 = and 𝐁 =
3 0 1 −3

Find 𝐀𝐁

15
MATRIX MULTIPLICATION

It follows that (with suitable 𝐀, 𝐁, and 𝐂)


▪ 𝐀 𝐁 + 𝐂 = 𝐀𝐁 + 𝐀𝐂 (distributive property)
▪ 𝐀𝐁 𝐂 = 𝐀 𝐁𝐂 = 𝐀𝐁𝐂 (associative property)

But not that


▪ 𝐀𝐁 = 𝐁𝐀 (commutative property)

1 2 2 −8
Example: take 𝐀 = and 𝐁 =
3 6 −1 4
0 0 −22 −44
you’ll find that 𝐀𝐁 = , and that 𝐁𝐀 = , so 𝐀𝐁 ≠ 𝐁𝐀
0 0 11 22

By the way, notice that in this example 𝐀𝐁 = 𝟎, while 𝐀 ≠ 𝟎 and 𝐁 ≠ 𝟎


▪ while for scalar numbers 𝑎𝑏 = 0 ⇔ 𝑎 = 0 or 𝑏 = 0

17
MATRIX MULTIPLICATION

Some properties (for suitable 𝐀, 𝐁, and 𝐂):


1: 𝐀𝟎 = 𝟎 and 𝟎𝐀 = 𝟎
2: 𝐀𝐈 = 𝐀 and 𝐈𝐀 = 𝐀
3: 𝐀𝐁 = 𝐀𝐂 ⇏ 𝐁 = 𝐂

Example of 3:
1 2 3 −4 1 4
Choose 𝐀 = ,𝐁= , and 𝐂 = .
3 6 −2 3 −1 −1

−1 2
Then it follows that 𝐀𝐁 = 𝐀𝐂 = , but 𝐁 ≠ 𝐂.
−3 6

18
MATRIX MULTIPLICATION

What about powers of a matrix?

Let us define 𝐀2 = 𝐀𝐀 for any square matrix 𝐀 (why square?)

Likewise 𝐀3 = 𝐀𝐀𝐀, etc. mind the difference


between “a square matrix”
and “a squared matrix”
What is 𝐀𝐀𝐀: is it 𝐀 𝐀𝐀 or is it 𝐀𝐀 𝐀?

𝐀 𝑛=1
More in general 𝐀𝑛 = ቊ
𝐀𝐀𝑛−1 𝑛 = 2,3, …

And what do you think of 𝐀0 ?

19
EXERCISE 4

2 −1 0 2
Given is 𝐀 = and 𝐁 =
3 0 1 −3

Find 𝐀𝟐 𝐁

20
MATRIX TRANSPOSITION

𝑎1,1 𝑎1,2 ⋯ 𝑎1,𝑛


𝑎2,1 𝑎2,2 ⋯ 𝑎2,𝑛
Consider 𝐀 = 𝑎𝑖𝑗 = ⋯ ⋯ ⋯ ⋯
𝑚×𝑛
𝑎𝑚,1 𝑎𝑚,2 ⋯ 𝑎𝑚,𝑛

The transpose of 𝐀, denoted by 𝐀′ is given by

𝑎1,1 𝑎2,1 ⋯ 𝑎𝑚,1


𝑎1,2 𝑎2,2 ⋯ 𝑎𝑚,2
𝐀′ = ⋯ ⋯ ⋯ ⋯
𝑎1,𝑛 𝑎2,𝑛 ⋯ 𝑎𝑚,𝑛

In words: 𝐀′ has 𝑛 rows and 𝑚 columns so 𝐀′ is a (𝑛 × 𝑚)-matrix and row 𝑖 of 𝐀 is


column 𝑖 of 𝐀′
“reflection in the
diagonal”

22
MATRIX TRANSPOSITION

Some properties (for suitable 𝐀, 𝐁, and 𝐂):


▪ 𝐀′ ′ = 𝐀
▪ 𝐀 + 𝐁 ′ = 𝐀′ + 𝐁 ′
▪ 𝐀𝐁 ′ = 𝐁′ 𝐀′ and (therefore!) 𝐀𝐁𝐂 ′ = 𝐂′ 𝐁′ 𝐀′
▪ 𝑐𝐀 ′ = 𝑐𝐀′

23
SYMMETRIC MATRICES

Definition: The matrix 𝐀 is symmetric if and only if 𝐀 = 𝐀′

So if and only if 𝑎𝑖𝑗 = 𝑎𝑗𝑖 for all 𝑖, 𝑗

Note: only a square matrix can be symmetric

1 3
Example: 𝐀 = is symmetric
3 6

1 2 −1
For any matrix 𝐀, 𝐀𝐀′ is symmetric (just try 𝐀 = )
3 6 5

Note: 𝐀′ 𝐀 is symmetric too, but in general 𝐀′ 𝐀 ≠ 𝐀𝐀′ (check this)

24
EXERCISE 5

4 −2 5
Given is 𝐗 =
0 3 −1

Find −2𝐗 ′

25
EXERCISE 6

Show that 𝐪𝐪′ is symmetric for any vector 𝐪

27
RELEVANCE IN THE BUSINESS LITERATURE (EXAMPLE)

P.E. Pfeiffer & R.L. Carraway, Modelling customer relationships as Markov chains.
Journal of Interactive Marketing 14:2 (2000), 43-55

“This paper ... introduces a general class of mathematical models, Markov Chain
Models, which are appropriate for modeling customer relationships.”

29
FURTHER STUDY

Sydsæter et al. 6/E 12.2-12.5

Tutorial exercises week 4

matrices
matrix addition
matrix multiplication
matrix transpose
matrix multiplication is not commutative

Canvas quizzes 8A

30

You might also like