4th Class - MathBE - Matrices
4th Class - MathBE - Matrices
4 – Matrices
Pedro Encarnação
[email protected]
2
Matrices
1
Matrices
Matrices
am 2 L amn
am1
Matrices: Terminology
2
Matrices: Terminology
1 2 3
4 5 6
7 8 9
Matrices: Terminology
1 2 3 a1(3−1+1) = a13
4 5 6 a2 (3−2+1 ) = a22
a3 (3−3+1) = a31
7 8 9
Matrices: Terminology
3
Matrices: Terminology
• A diagonal matrix is a square matrix in which
all the off the main diagonal entries are zero,
i.e., aij = 0, i ≠ j 1 0 0
0 2 0
0 0 3
• The identity matrix of order n is an n × n
diagonal matrix with all entries in the main
diagonal equal to one 1 0 0
I 3 = 0 1 0
0 0 1
10
Matrices: Terminology
11
• For example,
1 = 3 x − 2 x = 1
2 x = 2 x = 1
1 2 x 3 x − 2 2
=
3 y + 1 z 5 z ⇔ ⇔ 1
0 3 y + 1 = 5 z y = −3
z = 0 z = 0
12
4
Matrix algebra: Addition
13
Product by a scalar
14
15
5
Matrix algebra: Subtraction
16
17
18
6
An applied example
• Consider a chain of m stores that sell n different
products. In order to organize the data regarding
the revenues of each store related to each
product, one can build the table
Product 1 Product 2 … Product n
Store 1 r11 r12 … r1n
Store 2 r21 r22 … r2n
⋮ ⋮ ⋮ ⋮
Store m rm1 rm2 … rmn
19
An applied example
• Omitting the title row and the title column we
have the matrix
r11 r12 L r1n
r r22 L r2 n
R = 21
M M M
r L rmn
m1 rm 2
• Suppose now that there’s one revenue matrix
by month Rk and you would like to compute
the annual revenue
20
An applied example
• The annual revenue would be given by the
addition of the twelve monthly revenue
matrices, with the matrix addition defined as
we did before
• Assuming that the revenues in each matrix
include 23% of VAT and you need to compute
the monthly VAT value per store and per
product that you need to deliver to the State,
you can multiply each revenue matrix by 0.23
1.23
with the product by a scalar as defined before
21
7
Exercise
22
66 44 16
b) + =
67 68 40
4 10 10
c) − =
17 10 8
23