Professional Documents
Culture Documents
1 2 3
a
X 4 5 6 or Y = d
g
7 8 9
b
e
c
f
h i
A=
a 11 a12 a 1n
a a a
21 22 2n
a m1 a m2 a mn
The order of the matrix is m n, read as m by n.
A square matrix is one in which m = n.
Given the ordering of matrices, it is possible to identify a particular element by its row and
column position. Thus (a12) represents the element in the first row and second column of the
matrix.
In general matrices are derived from systems of linear simultaneous equations. Thus:
3x + 2y = 10
4x + 7y = 17
may be decomposed in matrix form as:
Az = b
where A =
3 2
4 7
is a matrix of coefficients and both b and z are column vectors of constants and
b=
10
17
and z =
x
y
Row Vector
A row vector is a set of quantities which is arranged in a row. If there are n data items in this row,
we say that the row vector is of size 1n. For A being an n element row vector, we have
[A] = [a1, a2, a3, an]
Column Vector
A column vector is a set of quantities which are arranged in a column. If there are m data items
in this column, then we say that the column vector is of size m1. For A, and m element column
vector, we have
a1
a2
[A] a 3
a
m
a11 a 12 a 1n
a m1 a m2 a mn
b m1 b m2 b mn
(a 11 b11 ) (a 1n b1n )
=
(a m1 b m1 ) (a mn b mn )
The resulting matrix A + B is of the same order as A and B. In general, for A and B of order mn,
their sum or difference may be defined as:
A B = [aij bij]m n
Note that the addition (and subtraction) of matrices is:
(i) Commutative
(A + B) = B + A
(ii) Associative
(A + B) + C = A + (B + C)
Note also that:
(i)
a b
c d
e f g
h i j
Example 5.1
New chains of One stop stores have opened in T&T with 4 outlets, San Fernando, P.O.S.,
Arima and Pt. Fortin. Three of its main items and their stock levels at the start of week 1 in the
various districts are:
San Fernando
P.O.S.
Arima
Pt. Fortin
Bread (loaves)
6
8
12
19
San Fernando
P.O.S.
Arima
Pt. Fortin
Bread (loaves)
4
5
8
17
10
11
12
3
2
7
1
8
12
19
2
1
4
0
-
7
5
17
1
1
San Fernando
P.O.S.
=
=
4 3 4
Arima
Pt. Fortin
Example 5.2
A popular hardware in Mayaro advertises the following price and delivery cost per unit of wood,
cement and galvanize.
Wood
Cement
Galvanize
Purchase
Delivery
12
2
8
2
4
1
Assume that government regulation raises the purchase price by 10% per unit and the delivery
cost by 40%. Write out expressions for:
a) The change in unit prices and delivery costs
b) The new price and delivery cost levels
Solution
The change in unit prices and delivery costs can be obtained as follows:
(i)
12
8
2
C=
2
C =
4
1
1.2
C =
0.8
0.8
0.8
0.4
0.4
The new price and delivery costs levels can be evaluated as follows:
C* = C + C = C + C
12
=
2
13.2
=
2.8
8
2
4
1.2
+
1
0.8
8.8
2.8
0.8
0.8
0.4
0.4
4.4
1.4
Example 5.3
The table below shows the trends in the life expectancy of vegetarians and non-vegetarians in a
Caribbean island. From the data in the table, form a matrix which illustrates the life expectancy
differential of vegetarians and non-vegetarians.
Year
1960
1970
1980
1990
2000
Vegetarians
60
70
75
71
80
Meat Eaters
45
50
52
55
56
Solution
60
70
75
71
80
45
50
52
55
56
15
25
23
16
24
The column vector on the R.H.S. of the expression above shows for the available snapshot time
periods the extra life expectancy of vegetarians to meat eaters.
5.3 Matrix Multiplication
Two matrices A and B are conformable for multiplication if the number of columns in A is equal
to the number of rows in B. If A and B are of order m n and n p respectively, then AB = C
where C is of order m p. More technically, matrix multiplication refers to a repeat process of
vector multiplication. Thus consider the first row of A and the first column of B, where A and B
are m n and n p matrices respectively.
b11
bn1
which indicates that corresponding elements are multiplied and the results are summed.
Alternatively, let a1 and b1 represent the first row and the first column (vectors) from A and B,
then a1b1 is a convenient way to express the product of these row and column vectors.
In general A(m n) B(n p) = C(m p)
or
| | |
a m1 a m2 a mn b n1 b n2 b np a m
The element in the ijth position in the matrix AB is the product of the ith row of A and jth column
of B. To form the product AB, we pre-multiply B by A, and to form the product BA we post
multiply B by A.
Example 5.4
1 2 5 6
3 4 7 8
(1 5) (2 7) (1 6) (2 8)
(3 5) (4 7) (3 6) (4 8)
19 22
43 50
Example 5.5
A=
a11 a12
a a
21 22
AB=
and
B=
a11 b11 a12 b21 a11 b12 a12 b22 a11 b13 a12 b23
a b a b a b a b a b a b
21 11 22 21 21 12 22 22 21 13 22 23
Bread ($)
30
40
60
45
10
If the firm is celebrating its 1st anniversary in T&T and cuts all prices by 10%, what is the value
of its stock
(a) per district?
(b) per commodity?
Solution
Value of stock per district can be read of as the row elements of the matrix in the middle whilst
the value of the stocks per commodity is the sum of the columns of the same matrix.
360
400
60
40
30
40
20
45
324
360
54
36
0.9
440 140 60
396 126
480
432
18
27
San Fernando
36
P.O.S.
54
Arima
Po int Fortin
40.5
Example 5.7
Wills ice-cream chain sell on average 200 strawberry, 120 chocolate and 240 orangepine icecreams per hour in the time period 6pm-11pm on a Friday evening. The price of a strawberry ice
cream is $0.45, a chocolate ice cream is $0.60 and an orangepine is $0.50. The cost to Wills of a
strawberry ice cream is $0.38, a chocolate is $0.42 and an orangepine is $0.32. Derive the firms
total profits using:
(i) total revenue less total costs
(ii) profit per unit times sales volume
Solution
(i)
It is well known that Total Revenues (TR) = Price (P) Quantity (Q)
TR = P Q
11
200
Q 5 120 =
240
1000
600
1200
0.45
P 0.60
0.50
0.45 10
PQ 0.6 60
0.5 120
but PQ as is has no mathematical significance. Transposing P and forming P'Q gives:
TR = P'Q = 0.45
0.60
1000
0.50 600
1200
12
1000
= 0.38 0.42 0.32 600
1200
= $1 016.00
so that profits () can be represented as:
= TR - TC = $1 410.00 - $1 016.00 = $394.00
(ii)
0.50
0.32
0.18
0.18
1000
0.18 600
1200
= $394.00
5.3.2 Multiplication by a Scalar
If we multiply A(m n) by a vector, V(n 1), then
13
a1
a |
2 v
|
a m
a1 v
a v
2
=C
a m v
20
5
600
50
14
With the introduction of a 20% VAT, the new average total cost per unit would increase to:
144
18
ATC* = 1.2ATC
24
6
720
60
a ik (b kj c kj )
k 1
k 1
a ik b kj a ik c kj
k 1
which represents the sum of the elements in the ith row and jth column of AB and AC and which
demonstrates that matrix multiplication adheres to the distributive law.
5.3.3.2 Associative Law
With scalar multiplication, the associative law states that a(bc) = (ab)c. This also holds for matrix
multiplication i.e. A(BC) = (AB)C. We will illustrate this with the proof below.
15
Proof: If A = [aij] is of order mn, B = [bij] is of order np, and C = [cij] is of order pq, then the
element of the ith row of A are ai1, ai2, ain and the elements of the jth column of BC are
p
b1h chj,
h 1
h 1
In this regard, the element standing in the ith row and jth column of A(BC) is
p
ai1
h 1
k 1
h 1
k 1
bnh chj
h 1
k 1
k 1
k 1
7(4) 5(2)
AB 1( 4) 3(2)
8(4) 6(2)
5
3
4
2
7(9) 5(6)
1(9) 3(6)
8(9) 6(6)
38 93 95
(AB)C 10 27
25
44 108 110
9 10
6 5
2
C 6
7
7(10) 5(5)
95
38 93
1(10) 3(5) 10 27
25
44 108 110
8(10) 6(5)
2
38(2) 93(6) 95(7)
1299
6 10(2) 27(6) 25(7) 357
7
44(2) 108(6) 110 (7)
1506
BC
7
A ( BC) 1
8
5
7(132) 5(75)
1299
132
3
1(132) 3(75) 357
75
8(132) 6(75)
1506
6
16
x y
0 0
y y
x x
0 0
0 0
a 11 a 12 a 1n
a a a
21 22 2n
a m1 a m2 a mn
b m1 b m2 b mn
17
a 11 a1n
A = a a
21 2n
a m1 a mn
a11 a 21 a m1
A' = A =
a1n a 2n a mn
T
The transpose of the sum of two matrices A and B, i.e. (A+B)', is A'+B' (see proof 1 below). The
transpose of the product of AB is B'A' (see proof 2 below). In general, the transpose of the
product of any number of matrices is equal to the product of their transpose in reverse order.
Note further that:
(A)T = AT
(AT)T = A
Proof 1: (A + B)' = A' + B'
Let A = [aij] and B = [bij]. To verify that (A + B) 1 = A1 + B1 we simply need to show that the
element in the ith row and jth column of A1 and B1 is the same as the elements in the same position
in the matrix (A+B)1 and these are respectively aji, bji and aji + bji.
Proof 2: (AB)' = B'A'
Let A = [aij], B = [bij] and C = [cij] be of order mn, np and mp respectively. We can form a
matrix C = [cij] = AB. The element in the ith row and jth column of Cij is the same as the element
18
th
th
k 1
the jth row of B' are b1j, b2j bnj and the element of the ith column of A' are ai1, ai2 ain. In this
regard, the element in the jth row and ith column of the product B'A' is
n
bkj . aik =
k 1
k 1
19
1 2 3
A= A = 2 4 7 = A
3 7 8
T
It can be shown that the sum of any square matrix A and its transpose is symmetric. To see this,
form:
B = A + AT
BT = (A + AT)T
= AT + (AT)T
= AT + A
= A + AT
which shows that B is symmetric, i.e. A + AT is symmetric.
5.7 The Zero Matrix
The zero matrix has all its elements equivalent to zero and can vary in size. It is also called the
null matrix and it is written as:
(0)m n, which indicates it can have any size.
Given the definition of 0, then A = B, means that A - B = 0. Also A + 0 = A and A - 0 = A. Note
also that 0A = A0 = 0. It is important to recognize that AB = 0 does not mean that A or B equals
zero i.e. the cancellation law of multiplication is inapplicable to matrices. To illustrate this
x
y
and B =
0
x
y
, both of which are non zero
x
20
AB =
x y y y
0 0 x x
0 0
0 0
1 0 0
0 1 0
I =
0 0 1
n
The identity and zero matrices play roles in matrix algebra parallel to scalar algebra. Thus:
(i) 0 + A = A + 0 = A
(ii) A - A = 0
(iii) 0 * B = 0
(iv)B * 0 = 0
(v) Im m Am n = Am n
(vi)Am n In n = Am n
Example 5.10
21
1 0 0
0 1 0
0 0 1
a 11
a
21
a 31
a 12
a 22
a 32
a 13
a 11
a 23 = a 21
a 31
a 33
a 12
a 22
a 32
a 13
a 23
a 33
A square matrix which has zeroes as the data items in every cell except in the leading diagonal is
called a diagonal matrix. More specifically, the matrix A, in which the typical element is aij, is a
diagonal matrix if aij = 0 for i j.
For example typical 4 4 diagonal matrix is
d 22
0
0
0
0
d 33
0
d 11
d11 0 0
0 d 0
22
D =
0 0 d nn
Example 5.11
d 44
22
d1 0 0
Let D be the diagonal matrix 0 d 0
2
0 0 d 3
i.e. D = diag (d1, d2, d3)
Prove by induction that
Dn = diag (d1n, d2n, d3n)
Solution
Step 1: Show the result is true when n = 1
D1 = (d11, d21, d31)
= (d1, d2, d3)
Step 2: Assume the statement is true for n = k
DK = (d1K, d2K, d3K)
Step 3: Show statement is true for n = k + 1
DK + 1 = DK. D
d 1 K 0 0 d1 0 0
K
=0 d
2 0 0 d 2 0
K
0 0 d 3 0 0 d3
23
d1K1 0 0
K 1
0 d 2 0
K 1
0 0 d 3
= diag (d1K+1, d2K+2, d3K+3)
Step 4: The expression holds for n = k, n = k+1 and by the principle of induction for all n.
5.8.1 Upper Triangular (UTM), Lower Triangular (LTM) and Diagonal Matrices
A matrix An n is said to be upper triangular if the aijth element is zero for all elements where i>j.
Correspondingly, a Bn n matrix is said to be lower triangular if the bijth element is zero for all
elements where i < j. A diagonal matrix is both upper and lower triangular.
1
0
E.g. of a UTM:
0
2 3 4
5 6 7
0 8 9
0 0 10
24
1 0 0 0
2 3 0 0
E.g. of a LTM:
4 5 6 0
7 8 9 10
5.9 Orthogonal Matrices
A matrix A is said to be orthogonal if its transpose is equivalent to its inverse. Alternatively
stated, a square matrix is said to be orthogonal if the product of the matrix with its transpose
yields the identity matrix.
AT = A-1
i.e. if AAT = ATA = I
Note that the product of two or more orthogonal matrices is also orthogonal and the determinant
of an orthogonal matrix is 1.
Example 5.12
Demonstrate that the following matrix is orthogonal:
1
1/9 4
8
Solution
8
4
1
4
7
4
25
AAT
1 64 16
0
81 81 81
81
=
0
81
0
0
= I3
81
81
Example 5.12
Show that for a symmetric matrix A such that AT = A-1 that A2 = I.
Solution
A2 = A . A = A . AT
= A . A-1
=I
5.9.1 Some Properties of Orthogonal Matrices
(1) If A and B are orthogonal matrices, then AB is an orthogonal matrix:
(AB)T = BT AT
(AB)T AB = BT AT AB
= BT IB since AT A = I
BT B = I
and hence AB is orthogonal.
(2) For An n an orthogonal matrix, the determinant is 1.
i.e. |A| = 1
Note that |A-1| = 1/|A|
(1)
(2)
26
and AT = A-1
(3)
27
Thus the matrix B-1A-1 is such that when pre-multiplied and post-multiplied by AB it results in
the identity matrix.
Hence (AB)-1 = B-1 A-1
5.11 Power of Matrices
For a square matrix A of order n n, we can write the product of A A (p times) as A p. In the
mould of reasoning consistent with the associative law, we can note that
Ax Ay = Ay Ax = Ax+y
and (Ax)y = (Ay)x = Axy
Example 5.14
1
Let A =
0 1
1
, A3 =
1
0
A2 =
and A4 =
1
0 1
Example 5.15
Show using proof by induction that (An)-1 = (A-1)n, where A is a non-singular matrix and n is a
positive number.
Solution
Step 1: Show that the expression is true when n = 1
(A1)-1 = A-1 = (A-1)1
so that the result holds when n = 1
Step 2: Assume the result is true when n = k i.e. Assume that (Ak)-1 = (A-1)k.
Step 3: Show that the result is true for n = k + 1
28
(Ak+1)-1 = (A-1)k+1
(Ak+1)-1 = A-1(Ak)-1 = (A-1) (A-1)k = (A-1)k+1
Step 4: Since the result holds for n=k and n=k+1, by induction it is true for all positive integers.
5.12 Differences between Scalars and Matrices
For scalars a and b and matrices A and B, their main points of distinction are:
(i) Whilst with scalars ab = ba, this is not generally the case with matrices as AB = BA only in a
specific special case.
(ii) With scalars, ab = 0 means either a and/or b = 0. With matrices, AB = 0 does not necessarily
mean that A and/or B = 0.
Transition Matrices
The West Indies Cricket Board (WICB) is evaluating whether Guyana should be allowed to
continue as a test venue. The WICB sent a panel of experts into Guyana, and they recorded the
following sequences of wet/dry days.
WWDWW
DWWWD
WDDWD
WDWDW
DDWWW
W: wet day
D: dry day
The WICB is trying to ascertain how the weather on any one day will affect weather conditions
on the following day. Based on their collected data the WICB panel makes the following record,
WW 6
WD 6
DD 2
DW 8
29
This type of sequenced data can be complied into a transition matrix of the form below:
W 6
D W 8
6
2
or generally,
a11 a12
a a
21 22
where;
a11: wet dry followed by a wet day
a12: wet day followed by a dry day
a21: dry day followed by a wet day
a22: dry day followed by a dry day
With transition matrices D and W are referred to as states. It is possible to convert the matrix A =
aij above into a matrix of proportions by dividing each of the a ij element by the sum of the row
elements. Thus we conform
a 12
a 11 a 12
a 11
a a
11
12
P=
a 22
a 21 a 22
a 21
a 21 a 22
P* =
8
10
6
12
2
10
30
121
011
212
221
201
122
122
211
012
122
201
002
(a) Obtain the transition matrix, T, for the proportions of 0, 1 or 2 lorries being serviceable on
the following day, given the number (0, 1 or 2) serviceable on one particular day.
(b) Find T2 also, and use this to find, if there is one serviceable lorry today, the proportion of
times that there will be at least one serviceable lorry in two days time.
Answer
(a)
Reading the data from left to right gives: 22; 22; 21; 12; 21; etc leading to
the following numbers of serviceable lorries from one day to the next:
Number of lorries serviceable on the following day
0 1 2 Total
0 1 4 1 6
Number of lorries serviceable on a particular day 1 3 3 9 15
2 2 8 10 20
Writing each value as a proportion of the row total gives the following transition matrix:
122
31
T1
2
(b) T
1
6
3
15
2
20
4
6
3
15
8
20
1
6
9
15
10
20
0.167
T T 0.200
0.100
0.167
0.200
0.600
0.500
0.400
0 0.178
T 1 0.133
2 0.147
i.e.
0.667
0.311
0.413
0.346
0.167
0.200
0.100
0.667
0.167
0.200
0.600
0.400
0.500
2
0.511
0.454
0.507
(Note that the sum of the proportions in each row adds to 1, as required for a transition matrix.)
The proportion of times that there will be at least one serviceable lorry in 2 days time (if there is
one serviceable lorry today), is equivalent to:
Pr (11 or 12) after two transitions = 0.413 + 0.454 (from row 2) = 0.867
A=
4
2 2i
2i
4 2i
Where i = -1
And so A is a matrix with complex numbers as some of its elements. We can form A*, such that
2 2i
6
A* =
4
2 2i
2i
4 2i
32
In general, if
a 11 i a 12 i a 13 i a 1n i
a i a i a i a i
21
22
23
2n
A=
a nn i
a n1 i a n 2 i
then
a 11 i a 12 i a 13 i
a i a i a i
21
22
23
A* =
a n1 i a n 2 i
a 1n i
a 2 n i
a nn i
A =
1 i
1 i
1 i
A* =
1 i
H = (A*1) =
1 i
1 i
Observe that all the elements along the leading diagonal of the Hermitian matrix are real. In the
event that (A*)1 = -A, then the A matrix is said to be skew-Hermitian.
33
Many practical situations can be expressed simply in matrix form. In particular, financial
economists nowadays employ a form of language which is easy to express in matrix terms, and
which we shall introduce here.
The basic idea is that an investor can choose between a number of different assets; these may be
thought of as shares in companies, holdings of foreign exchange, old-master paintings, or
whatever. After a fixed time period, say one year, the assets will have a new value, and this will
depend on what has happened in the meantime. We model this uncertainty by assuming that
there are a number of states which may occur.
Example
The citizens of the island of Apathia can invest in land, bonds (which yield a fixed return) and
stocks (which yield and uncertain return). A general election is due, after which one of the 2
political parties, the Liberal-Conservatives or the Conservative-Liberals, will be in power. There
are three assets: Asset 1 = land, Asset 2 = bonds, Asset 3 = stocks, and there are two states:
State 1 = LibCons in power, State 2 = ConLibs in power.
Clearly, the value of an investment will depend upon which of the states occurs. For example,
government by LibCons may result in an increase in the value of land and a decrease in the
value of stocks, while government by ConLibs may have the opposite effect. We can describe this
by writing down the value in a years time of the amount of each asset which costs one dollar
now, under the assumption that a given state occurs. In this example, we could get a table like
the following.
Land
Bonds
Stocks
LibCon ConLib
1.25
0.95
1.05
1.05
0.90
1.15
In other words, we have a 32 matrix R = (r ij) which determines the return of each asset in the
various states. In general, if there are m assets and n states, then the returns will be an mn
matrix
34
Suppose an Apathian investor decides, before the election, to invest $5000 in land, $1000 in
bonds and $4000 in stocks. Then the row vector [5000
1000
1000
1.25
4000 1.05
0.90
0.95
1.05 10900
1.15
10400
is a 12 matrix. When R is given, YR tells us the possible values of the portfolio Y in the various
states.
The terminology introduced above is very useful when we try to model investment decisions. For
example, a cautious investor might ask if there is a riskless portfolio, that is, one which has the
same value whichever party wins the election.
On the other hand, an investor might look for a portfolio which costs nothing. In the Apathian
context, this could be a portfolio such as [5000 -10000 5000], which means that the investor
borrows $10000 from the bank and uses it to buy the land and stocks. At the end of the year she
owes the bank more, 100001.05 dollars, but the changes in value of land and stocks may offset
this. In fact, we calculate that
YR 5000
10000
1.25
5000 1.05
0.90
0.95
1.05 250
1.15
Thus if the LibCons win she has gained $250 without having to invest anything, in real terms,
while if the ConLibs win she is no worse off.
A portfolio like the one just described, which costs nothing, cannot lose and in at least one state
yields a profit, is called an arbitrage portfolio. The question of the existence of riskless and
35
arbitrage portfolios leads us inevitably to the study of linear equations, which we begin in the
next chapter.
Partitioning
Any matrix can be separated arbitrarily into a number of sub-matrices. For example, we could
partition A as follows:
B C
A
D E
and if
1
A 4
0
2
0
3
6
1
1
1
we could take
1
4
D 0
2
0
2
3
,
6
2 ,
1
C
1
E 1
Conformable matrices which are suitably partitioned have the property that their product can be
expressed in terms of the products of the sub-matrices as follows:
If
B C
A
D E
and
W X
V
Y Z
then
BW CY BX CZ
AV
DW EY DX EZ
This operation is useful for several reasons. For one thing, it may be very much easier to
calculate the sub-matrix products than to calculate the whole product at once; if D is a null
matrix, for example. Partitioning can also be a great help in interpretation, in such models as
the input-output model or the Markov chain. Suppose that, after a suitable rearrangement of the
rows and columns of the input-output matrix, it can be partitioned in the way given for A above,
with D a matrix of zeros. Then we see that the first few industries do not use the outputs of the
last few industries as their inputs, and we say that the system is decomposable (or segmentable).
36
This has implications for the properties of the solutions to the system. Partitioning is also
important in econometrics, for example, in interpreting structural forms and in handling
identification problems.