Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Environmental Econ

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

SIMPLE ECONOMIC APPLICATIONS OF MATRICES

Eva Ulrychová1
1
Vysoká škola finanční a správní, Fakulta ekonomických studií, Estonská 500, 101 00 Praha 10
Email:ulrychova@mail.vsfs.cz

Abstract: This article deals with simple examples pointing out to the use of mathematical models,
especially of linear algebra tools (matrix operations, eigenvectors, Markov chains, systems of linear
equations, least squares approximation), in economic applications. In some cases, solved problems
and data given in examples may have been simplified compared to real values as the main aim is to
show possibilities of applications rather than to obtain accurate results. The presented examples can
help to introduce students of economics-oriented universities into the matrix theory and illustrate the
connection between theory and practice.

Keywords: application, eigenvalues, matrix, matrix operations, system of linear equations.

JEL classification: A12, A22

Doručeno redakci: 20.11.2012; Recenzováno: 20.2.2013; 18.2.2013; Schváleno k publikování: 19.6.2013

Introduction
In the process of education it is often advisable to show the connection between theory and
practice. In this article several economic applications of matrices are presented – from quite
simple to more complicated. These examples are simple so that difficult economic theories do
not have to be explained. While the solved problems and data given in examples can be
simplified in comparison with real values for easier computation, the economic significance is
not affected. It is important to show possibilities of applications rather than to obtain an
accurate result. On the other hand, it is interesting to include some real problems if possible.

1 Matrix operations
1.1 Scalar multiplication
Formulation of the problem
A store discounts commodities c1, c2, c3, c4 by 30 percent at the end of the year. The values of
stocks in its three branches B1, B2, B3 prior to the discount are given in Table 1. Using
matrices, find the value of stock in each of B1, B2, B3 after the discount.

Table 1: Values of stocks in B1, B2, B3


c1 c2 c3 c4
B1 65000 40000 55000 35000
B2 50000 30000 60000 45000
B3 70000 55000 75000 50000
Source: Illustrative data

Solution
A 30 percent reduction means that the commodities are being sold for 70 percent of their
original value. If we organize the information given in Table 1 into a matrix V1, then the
matrix
V2 = 0.7 V1
expresses the value of stock after the discount:

190
 65000 40000 55000 35000   45500 28000 38500 24500 
   
V2 = 0.7 V1 = 0.7  50000 30000 60000 45000  =  35000 21000 42000 31500  .
 70000 55000 75000 50000   49000 38500 52500 35000 
   

1.2 Distributive law for matrix multiplication


Formulation of the problem
A store sells commodities c1, c2, c3 in two its branches B1, B2. The quantities of the
commodities sold in B1, B2 in a week are given in Table 2, the individual prices of the
commodities are given in Table 3, the costs to the store are given in Table 4. Find the store’s
profit for a week, using
a) total concepts
b) per-unit analysis
to show that matrix multiplication is distributive.

Table 2: Quantities of commodities Table 3: Selling prices Table 4: Costs


c1 c2 c3 c1 2.00 c1 1.50
B1 200 350 100 c2 4.00 c2 3.00
B2 250 400 150 c3 5.00 c3 4.00
Source: (Table 2, 3, 4) Illustrative data

Solution
The quantities (Q) of the commodities, the selling prices (P) and the costs (C) of the
commodities can be represented in matrix form:
 2.00   1.50 
 200 350 100     
Q =   P =  4.00  C =  3.00  .
 250 400 150   5.00   4.00 
   
a) Using total concepts:
The total revenue in B1 is:
200  2.00  350  4.00  100  5.00  2300
and in B2:
250  2.00  400  4.00  150  5.00  2850.
These calculations can be written using a product of two matrices: the total revenue (TR) is
given by the matrix QP:
 2.00 
 200 350 100     2300 
TR = QP =    4.00  =   .
 250 400 150   5.00   2850 
 
Similarly, the total cost (TC) is given by the matrix QC:
 1.50 
 200 350 100     1750 
TC = QC =    3.00  =   .
 250 400 150   4.00   2175 
 
Profits (Π) are
 2300   1750   550 
Π = TR – TC = QP – QC =   –   =   .
 2850   2175   675 
b) Using per-unit analysis:
The per-unit profit (U) is

191
 2.00   1.50   0.50 
     
U = P – C =  4.00  –  3.00  =  1.00  .
 5.00   4.00   1.00 
     
The total profit (Π) is given by the matrix QU:
 0.50 
 200 350 100     550 
Π = QU =    1.00  =   .
 250 400 150   1.00   675 
 
From a) and b) ve have Π = QP – QC and Π = QU = Q(P – C). Thus
QP – QC = Q(P – C).

1.3 Product of matrices


Formulation of the problem
Let us consider five factories, each of them needs to supply each other. Determine the number
of possibilities to transport commodities from one factory to the other one with one change at
most, if there are truck and train connections as given thereinafter.

Solution
Let us denote the factories as 1, 2, 3, 4, 5 and define the 5 5 matrix A: aii = 0 and for i  j
we put ai j= 1 if there is a truck connection between i and j, and aij = 0 otherwise. Because of
two way connection between i and j the matrix A is symmetric.
For example the matrix
0 1 0 1 0
 
1 0 1 1 0
A  0 1 0 1 0
 
1 1 1 0 1
0 0 0 1 0
 
expresses that there is a truck connection between factory 1 and factory 2 (as a12 = a21 = 1),
whereas there is no connection between factory 1 and factory 3 (as a13 = a31 = 0) etc.
In a similar way we define the matrix T representing a train connection:
 0 0 1 1 0
 
0 0 0 0 1
T   1 0 0 0 1 .
 
1 0 0 0 0
 0 1 1 0 0
 
Then the matrix
1 0 0 0 1
 
2 0 1 1 1
AT   1 0 0 0 1 
 
1 1 2 1 2
1 0 0 0 0
 
gives the number of possibilities how to get from one of the factories to the other one in two
steps – by truck at first and then by train. If we denote the elements of the matrix AT as
(at)ij, we can see that for example (at)45 = 2 – there are two possibilities how to get from the

192
factory 4 to the factory 5 (but not from the factory 5 to the factory 4 – the order train-truck
makes a difference).
For example, since
(at)45 = a41 t14+ a42 t25+ a43 t35+ a44 t45+ a45 t55 = 0+1+1+0+0,
it is possible to get from factory 4 to factory 5 changing in 2 or in 3.
Similarly, the matrix
1 2 1 1 1
 
 0 0 0 1 0
TA   0 1 0 2 0 
 
 0 1 0 1 0
1 1 1 2 0
 
gives the number of possibilities how to get from one of the factories to another one by a train
at first and then by a truck.
While there are for example two possibilities of connection between factory 4 and factory 5 in
the order truck-train, there is no connection between 4 and 5 in the order train-truck.
The number of all the connections between the particular factories with one change at most is
given by the matrix
 2 3 2 3 2
 
 3 0 2 3 2
A  T  AT  TA   2 2 0 3 2 .
 
 3 3 3 2 3
 2 2 2 3 0
 
For example, we can see that there are three possibilities to get from the factory 2 to the
factory 4 – one possibility of a direct connection (as a24=1) and two possibilities with a
change – one in the order truck-train ((at)24 =1) and one in the order train-truck ((ta)24 =1).

2 System of linear equations


Formulation of the problem
Average salaries in Czech Republic for the years 1990, 1995, 2000 and 2005 are subsequently
3 286, 8172, 13 219, 18 344 crowns. The values, rounded in order to compute easily without a
calculator, are given in Table 5.

Table 5: Average salaries in Czech Republic


1990 1995 2000 2005
Thousands of crowns 3 8 13 18
Source: Web portal Kurzycz [online]. Available: http://www.kurzy.cz/makroekonomika/mzdy/

Taking into consideration these data, we estimate the average salary in 2015.

Solution
We consider the time to be an independent variable and the salary a dependent variable – we
obtain a function of one variable. If we denote the year 1990 as 0, 1995 as 1, 2000 as 2 and
2005 as 3, then we have four points [0,3], [1,8], [2,13], [3,18] in plane. We are looking for a
function whose graph approximately goes through these points. If we draw the picture, we can
see that the points seem to lie on a straight line (see Figure 1).

193
Figure 1: A line passing through the given points

Source: author’s own processing

We will try to find a linear function so that coordinates of the given points satisfy the equation
y = ax+b of this function:
a0  b  3
a 1  b  8
a  2  b  13
a  3  b  18.
We obtained a system of linear equations represented by the augmented matrix
0 1 3 
 
 1 1 8   1 1 8
 2 1 13    0 1 3 .
   
 3 1 18 
 
The solution is a = 5, b = 3. It is really surprising that the linear system has a solution – the
given points lie exactly on a straight line! The equation of this line is
y = 5x+3.
To estimate the average salary in 2015 we substitute x = 5 (the value corresponding to the
year 2015) into the equation y = 5x+3 and obtain y = 28.

Let us note that if the system has no solution (the given points do not lie on a straight line) it
is possible to find the least squares solution of this system - see below.

3 Least squares approximation


Formulation of the problem
The ratios of households in Czech Republic having computers (in percentage) are given in
Table 6.

We find the least squares approximating parabola for these data, compute the norm of the
least squares error and estimate the ratio of households having computers in the year 2010.

194
Table 6: Ratios of households with computers
%
1990 3
1995 7
2000 21
2005 42
Source: Web portal of Czech Statistical Office: Česká republika od roku 1989 v číslech. [online]. Available:
http://www.czso.cz/cz/cr_1989_ts/0803.pdf

Solution
As in the previous problem we denote the year 1990 as 0, 1995 as 1, 2000 as 2 and 2005 as 3.
In this case it is obvious that the points [0,3], [1,7], [2,21], [3,42] do not lie on a straight line
(see Figure 2).

Figure 2: A least squares approximating parabola

Source: author’s own processing

We will try to find a parabola that gives the least squares approximation to the given four
points. Substituting these points into the equation of a parabola y = ax2+bx+c, we obtain the
system of linear equations
a0  b0  c  3
a 1  b 1  c  7
a  4  b  2  c  21
a  9  b  3  c  42
represented by the augmented matrix
0 0 1 3  1 1 1 7
   
1 1 1 7  0 2 3 7
 4 2 1 21    0 0 1 3 .
   
 9 3 1 42   0 0 0 3 
   
This system is inconsistent – the four given points do not lie on a parabola. To find a parabola
that fits the points as much as possible, we use the least squares approximation. The least
squares solution (Poole, 2003, p. 581) of the system
Ax = b ( Amn , x  R n , b  R m ) (1)

195
is the vector ~
x such that
|| b  A~
x ||  || b  Ax || for all x  R n (2)
and can be obtained as a solution of the equation
AT A x = AT b . (3)
In our case we have
0 0 1 3
    a
1 1 1 7  
A , b   , x   b .
4 2 1 21 c
     
9 1  42 
 3  
We compute products AT A and AT b , put into the equation AT A x = AT b and obtain the
equation
 98 36 14  a   469 
    
 36 14 6  b    175 
 14 6 4  c   73 
    
that is the system of linear equations
 98 36 14 496 
 
 36 14 6 175 .
 14 6 4 73 
 
The solution of this system is a = 4.25, b = 0.35, c = 2.85 and
~
x = (4.25, 0.35, 2.85)T.
The desired equation of parabola is
y = 4.25x2+0.35x+2.85.
To obtain the least squares error
|| e |||| b  A~x || (4)
we compute the product A~
x at first:
0 0 1  2.85 
  4.25   
1 1 1   7.45 
A~
x   0.35    .
4 2 1  20.55 
  2.85   
9
 3 1  42.15 
 
Then
|| e || = ||(0.15, –0.45, 0.45, –0.15)T|| = 0.45 .
We estimate the ratio of households having computers in the year 2010 substituting x = 4 into
the equation y = 4.25x2+0.35x+2.85: y = 72.25  72. Thus, using the data in the table 3 the
ratio of households having computers in the year 2010 is estimated at 72%.

4 Eigenvector
Formulation of the problem
Three producers (denoted by P1, P2, P3) organized in a simple closed society produce three
commodities c1, c2, c3. Each of these producers sells and buys from each other, all their
products are consumed by them and no other commodities enter the system (the ”closed
model” (Friedberg, 2003, p. 176)). The proportions of the products consumed by each of P1,
P2, P3 are given in Table 7:

196
Table 7: Proportions of products c1, c2, c3 consumed by P1, P2, P3
c1 c2 c3
P1 0.6 0.2 0.3
P2 0.1 0.7 0.2
P3 0.3 0.1 0.5
Source: Illustrative data

For example, the first column lists that 60% of the produced commodity c1 are consumed by
P1, 10% by P2 and 30% by P3. As we can see, the sum of elements in each column is 1.
Let us denote x1, x2, x3 the incomes of the producers P1, P2, P3. Then the amount spent by P1
on c1, c2, c3 is 0.6 x1+0.2 x2+0.3 x3.
The assumption that the consumption of each person equals his or her income leads to the
equation 0.6 x1+0.2 x2+0.3 x3 = x1, similarly for producers P2, P3. We obtain the system of
linear equations
0.6 x1  0.2 x1  0.3x1  x1
0.1x1  0.7 x1  0.2 x1  x1
0.3x1  0.1x1  0.5 x1  x1
This system can be rewritten as the equation A x = x , where
 0.6 0.2 0.3 
 
A   0.1 0.7 0.2 
 0.3 0.1 0.5 
 
and
x  x1 , x2 , x3 .T
Moreover, we assume the income to be nonnegative, i.e. xi  0 , i=1, 2, 3 (we denote x  o ).
We can rewrite the equation A x = x into the equivalent form (A–I) x = o , represented by
the augmented matrix
  0.4 0.2 0.3 0 
 
 0.1  0.3 0.2 0 .
 0.3 0.1  0.5 0 

It means that we are looking for an eigenvector of A corresponding to the eigenvalue 1.
The general solution of the system has the form x = t(13,11,10)T; the condition x  o is
satisfied for t  0 .
Thus, to ensure that this society operates, the incomes of the producers P1, P2, P3 have to be in
the proportions 13:11:10.

5 Markov chains. Eigenvector


Formulation of the problem
Suppose a market research monitoring a group of 300 people, 200 of them use a product A
and 100 use a product B. In any month 80% of product A users continue to use it and 20%
switch to the product B and 90% of product B users continue to use it and 10% switch to the
product A. The percentages of users loyal to the original product are assumed to be constant in
next months – it means the probability of changing from one product to the other is always the
same. That is a simple example of so called Markov chains. Following this research we
determine, how many people will be using each product one, two and k months, respectively,
later, and estimate the state in the long run.

197
Solution
The number of product A users after one month is given by the following formula
0.8  200  0.1  100  170,
since 80% of 200 A users (that is 0.8  200 ) stay with A and in addition 10% of 100 B users
(that is 0.1100 ) convert to A.
Similarly, the number of product B users is given by the following formula
0.2  200  0.9  100  130,
We can rewrite these two formulas using the matrix (transition matrix)
 0.8 0.1 
T   
 0.2 0.9 
(an entry tij represents the probability of moving from state corresponding to i to state
corresponding to j):
 0.8 0.1  200  170 
       .
 0.2 0.9   100  130 
If we denote x 0  o = (200,100)T (initial vector) and x1 = (170,130)T, we can write
x1 = Tx0 .
Numbers of each of A and B users after one month are given by the components of the vector
x1 (let us note that these components are not necessarily integers – they are only
approximations of numbers of people).
Similarly to computing numbers of users after one month we determine numbers of users after
two months (represented by the vector x2 ):
 0.8 0.1 170  149 
x2  Tx1         
 0.2 0.9  130   151
(we can also write x2 = Tx1 = T(T x0 ) = T 2 x0 ).
It is obvious that numbers of A and B users after k months are determined by
xk  Txk 1 or xk  T k x0 (5)
k k
(an entry (t )ij of this matrix T represents the probability of moving from state
corresponding to i to state corresponding to j in k transitions).
It is possible to show (Poole, 2003, p. 323) that if the transition matrix is a matrix, which has
some power positive, then vectors xk (state vectors) converge for large k to an unique vector
x (steady state vector); when this vector is reached, it will not change by multiplying by T:
x  Tx (6)
(it means that T has 1 as an eigenvalue and the steady state vector is one of eigenvectors
corresponding to this eigenvalue). Moreover, steady state vector does not depend on the
choice of the initial vector x0 . To determine numbers of A and B users after a long time we
compute the steady state vector (I is a unit matrix):
x  Tx  Tx  x  o  (T  I ) x  o . (7)
Since
  0.2 0.1 
T  I   ,
 0.2  0.1
we obtain the following homogeneous linear system
  0.2 0.1 0 
 
 0.2  0.1 0 

198
the general solution of which is
x = (t, 2t)T.
Since components of each of state vectors represent numbers of A resp. B users, the sum of
these components must be equal to the global number of users; in our case components of the
steady stage vector must satisfy
t+2t = 300,
from which it follows that t=100 and
x = (100, 200)T.
After a long time, 100 people will be using the product A and 200 people will be using the
product B (and this result does not depend on the initial distribution of A and B users).

Conclusion
The aim of this article is to show easy examples, which point out to the use of matrices in
economic applications. To use the tools of linear algebra for solving some real problems it is
usually necessary to have deeper knowledge of linear algebra or other branches of science. In
this article a few examples motivated by tasks in economy are provided. Their solutions
illustrate the use of linear algebra tools such as matrix operations, eigenvectors, Markov
chains, system of linear equations and least squares approximation. These examples can be
used in mathematical courses taught at economics-oriented universities.

References
[1] FRIEDBERG, S. H., A. J. INSEL and L. E. SPENCE, 2003. Linear Algebra. 4th edition,
Prentice Hall, ISBN 0-13-008451-4.
[2] POOLE, D., 2003. Linear Algebra: A Modern Introduction. 1st edition, Brooks/Cole,
ISBN 0-534-34174-8.

199

You might also like