fin118 unit 5
TRANSCRIPT
جامعة اإلمام محمد بن سعود اإلسالمية
كلية االقتصاد والعلوم اإلدارية
قسم التمويل واالستثمار
Al-Imam Muhammad Ibn Saud Islamic University College of Economics and Administration Sciences
Department of Finance and Investment
Financial Mathematics Course
FIN 118 Unit course
5 Number Unit
Matrices Unit Subject
Dr. Lotfi Ben Jedidia Dr. Imed Medhioub
we will see in this unit
Matrix / Matrices
Different types of matrices
Usual operations on matrices
2
Learning Outcomes
3
At the end of this chapter, you should be able to:
1. Define and use the matrix form.
2.Distinct between the different types of
matrices and its properties.
3. Make usual operations on matrices.
In Mathematics, matrices are used to store information. • This information is written in a rectangular arrangement of rows and columns. • Each entry, or element, of a matrix has a precise position and meaning.
Example1:
Matrix / Matrices
4
7 115
1204
0 312
4,3A
4 Columns
3
Ro
ws
Definition:
5
Example of Matrix • Food shopping online: people go online to shop four items
and have them delivered to their homes.
• Cartons of eggs, bread, bags of rice, packets of chickens were ordered online and the people left their address for delivery.
• A selection of orders may look like this:
Order
Address
Carton of
eggs
Bread Rice Chicken
Al Wuroud 2 1 3 0
Al Falah 4 0 2 1
Al Izdihar 5 1 1 7
6
Matrix notation A matrix is defined by its order which is always number of rows by number of columns.
• A horizontal set of elements is called a row • A vertical set is called a column • First subscript refers to the row number • Second subscript refers to column number
mnmmm
n
n
nm
aaaa
aaaa
aaaa
A
...
....
...
...
321
2232221
1131211
,
7
Matrix notation
• It has the dimensions m by n (m x n)
mnmmm
n
n
nm
aaaa
aaaa
aaaa
A
...
....
...
...
321
2232221
1131211
,
row 2
column 3
7 115
1204
0 312
4,3A
7 ,1 ,1 ,5
1 ,2 ,0 ,4
0 ,3 ,1 ,2
34333231
24232221
14131211
aaaa
aaaa
aaaa
8
Types of matrices
1/ Row vector m=1 2/ Column vector n=1
3/ Square Matrix m=n
nn rrrR .......21,1
m
m
c
c
c
C
.
.
2
1
1
7
3
1
1,3C
14234,1 R
nnnnn
n
n
nn
aaaa
aaaa
aaaa
A
...
....
...
...
321
2232221
1131211
,
721
54 3
32 1
3,3A
Some other Matrices
• Zero Matrix
• Transpose of a matrix
• Symmetric matrix
• Diagonal matrix
• Identity matrix
• Upper triangular matrix
• Lower triangular matrix
9
Zero Matrix
Every element of a matrix is zero, it is called a zero matrix, i.e.,
• The symbol O is used to denote the zero matrix.
10
0...00
......
0.....
0...00
O
11
Transpose of a matrix
The matrix obtained by interchanging the rows and columns of a matrix A is called the transpose of A (write AT or A’).
e.g.
mnmm
n
n
nm
aaa
aaa
aaa
A
...
......
......
......
...
...
21
22221
11211
,
nmnn
m
m
T
aaa
aaa
aaa
AA
...
......
......
......
...
...
21
22212
12111
'
724
3013,2A
73
20
41'
2,32,3 AAT
12
Symmetric matrix
• A symmetric matrix is a square matrix which
satisfy the following property:
• A symmetric matrix satisfy that : A = AT
Example: the following matrix is symmetric
a12 = a21 , a13 = a31
a23 = a32
.' ' sjandsiallforaa jiij
943
462
325
AAAT
943
462
325
13
Diagonal matrix
• A Diagonal matrix is a square matrix where all
elements off the main diagonal are zero.
Example:
jiwithsjandsiallforaa jiij ' ' 0
1000
0400
0030
0002
D
nn
nn
a
a
a
D
...000
....
0...00
0...00
22
11
,
14
Identity matrix
• An identity matrix is a diagonal matrix where all
elements of the main diagonal are one.
Examples:
jiallforaandia ijii 0 1
1000
0100
0010
0001
4I
1...000
....
0...010
0...001
nI
100
010
001
3I
10
012I
15
Upper triangular matrix
• An upper triangular matrix is a square matrix
where all elements below the main diagonal are
zero.
Examples:
jiallforaij 0
9000
6800
4120
1231
4U
300
710
542
3U
nn
nn
n
a
a
a
aaa
U
00
0
,1
22
11211
16
Lower triangular matrix
• A Lower triangular matrix is a square matrix
where all elements above the main diagonal are
zero.
Examples:
0 jiallforaij
9641
0812
0023
0001
4L
375
014
002
3L
nnnnn aaa
aa
a
L
1,1
2221
11
0
00
Usual operations on matrices
Addition and Subtraction of matrices
Matrices can be added or subtracted if they have the same order. Corresponding entries are added (or subtracted).
17
mnmnmn CBA
Examples
Consider
Find, if possible,
(1) A + B (2) A – C (3) B - A
(4) A + D (5) D – C (6) D - A
(7) C + D (8) C – D (9) D - B 18
43
21A
52
13B
54
03
21
C
11
12
10
D
19
Scalar Multiplication of matrices:
Multiplication of a matrix A by a scalar is obtained by multiplying every element of A by :
A = [ aij].
Examples:
mnmm
n
n
aaa
aaa
aaa
A
...
......
......
......
...
...
21
22221
11211
51
31
21
A
153
93
63
3A
255
155
105
5A
Usual operations on matrices
20
Usual operations on matrices
Multiplication of two matrices:
Multiplication of a matrix A by a matrix B is possible if the number of columns of A is equal to the number of rows of B.
Example:
A m x n B n x p = C m x p
4,24,33,2 CBA
21
Examples Consider
1/
2/
3/
43
21A
52
13B
54
03
21
C
54132433
52112231
52
13
43
21BA
BAAB
43
21
52
13
52
13
54
03
21
AC
Example of use • Let’s show, by a real-life example, why matrix
multiplication is defined in such a way.
• Ahmad, Muhammad and Nayef three students in IMAM University invest their money in the same stocks but with different quantities. Ahmad’s, Muhammad's and Nayef’s stock holding are given by the matrix:
22
10040
102010
103020
321
Nayef
Muhammad
Ahmad
QQQ
M
Example of use (continued)
• Now suppose that the prices of three types of stocks are respectively 25 SAR, 22 SAR and 30 SAR.
• Let the price matrix be
• Then the amount that the first student will pay is just the first entry of the product.
23
30
22
25
P
1300
990
1460
30
22
25
10040
102010
103020
PM
Matrix Properties • Matrix addition is commutative : A + B = B + A
• Matrix addition is associative: A + (B +C) = (A + B) +C
• Matrix addition is distributive : α(A + B) = α A + α B
where α is a scalar.
• Matrix multiplication is associative : (A.B).C = A.(B.C)
• Matrix multiplication is distributive : (A + B).C = A.C + B.C
• Multiplication is generally not commutative : A.B ≠ B.A
24
Time to Review !
Matrices are used to store information. This information is written in a rectangular arrangement of rows and columns.
Matrices can be added or subtracted if they have the same order.
Multiplication of a matrix A by a matrix B is possible if the number of columns of A is equal to the number of rows of B.
25