20
John Riley 29 August 2016 Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays 11 1.5 Numerical solution of a linear equation system 16 19 pages

Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

John Riley 29 August 2016

Basic mathematics of economic models

1. Arrays and sets

1.1 Vectors 1

1.2 Application: First Law of input demand 3

1.3 Sets 6

1.4 General arrays 11

1.5 Numerical solution of a linear equation system 16

19 pages

Page 2: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

1

Economists study economic phenomena by building highly stylized models. Understanding and

making use of almost all such models requires a high comfort level with a some key mathematical skills.

In these notes we explore the concepts that are absolutely essential. And using applications to the

theory of the firm and consumer we illustrate their value in economic analysis.

1.1 Vectors

We begin with the algebra of arrays. Economists typically study arrays of numbers, both in

building models and in analyzing data. The simplest such array is a single row or column. This is called a

vector. If the array has n components it is said to be a vector of dimension n or an “ -vectorn ”. For

example suppose a firm uses iz units of input i where 1,...,i m to produce n commodities. The

input vector is 1 2( , ,..., )nz z z z .

The rules of addition and subtraction of two -dimensionaln vectors follow naturally from the one

dimensional case.

1 1( ,..., )n na b a b a b and 1 1( ,..., )n na b a b a b .

Similarly multiplying a vector by a number scales all the components of the vector.

1( ,..., )nc c c .

Inequalities

For weak and strict inequalities we make the following distinctions.

b a “ b is greater than a ” .

This is the statement that , 1,...,i ib a i n

b a “ b is strictly greater than a ” .

This is the statement that , 1,...,i ib a i n and at least one inequality is strict.

b a “every component of b is greater than the corresponding component of a ” .

Page 3: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

2

Distance between two vectors

Consider the 2-dimensionalvectors a and b depicted below.

If we think of this figure as a geographical map, a vector a is a point in the plane. The first component

1a is the distance East from some originating point O and the second component 2a is the distance

North. The distance between the two vectors, written as b a is the length of the line joining a and

b . Appealing to Pythagoras Theorem,

2 2 2

1 1 2 2( ) ( )b a b a b a and so 2 2 1/2

1 1 2 2(( ) ( ) )b a b a b a

We can argue exactly the same way for three dimensional vectors. Appealing to Pythagoras Theorem,

the square of the distance between the vectors is

2 2 2 2

1 1 2 2 3 3( ) ( ) ( )b a b a b a b a .

This is illustrated below. In the horizontal (x1-x2) plane, by Pythagoras Theorem

2 2 2

2 1 2 1( ) ( )h a a b b

In the vertical plane,

2 2 2

3 3( )b a h b a

Page 4: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

3

For vectors of higher dimension we have no physical analogy. We simply use the same formula

called the Euclidean distance.

Definition: Euclidean distance between two vectors of dimension n

The square of the Euclidean distance between two vectors is

2 2 2

1 1( ) ... ( )n nb a b a b a

Sumproduct of two vectors

Let r and z be two -dimensionalm vectors. The sumproduct (also called the dot product or inner

product) of the two vectors is

1 1 ... m mr z r z r z

In words, the sumproduct of the two vectors is the sum of the term-by-term products of the

components of each vector.

Page 5: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

4

Example 1: Cost of production for a firm

Let 1( ,..., )mz z z be the vector of inputs purchased by the firm and 1( ,..., )mr r r is the vector of

input prices. Then the total cost of these inputs is

1 1 ... m mTC r z r z r z .

Example 2: Revenue of a firm producing n commodities

Let 1( ,..., )nq q q be the vector of outputs produced by the firm and let 1( ,..., )np p p be the vector

of output prices. Then the total revenue is

1 1

1

...n

n n j j

j

TR p q p q p q p q

.

Linear combinations of vectors

Let 1,..., nz z be n vectors of dimension m . A linear combination of these vectors is any linearly

weighted sum

1 1 ... n ny z z

Convex combinations of vectors

Let 1,..., nz z be n vectors of dimension m . A convex combination of these vectors is a linear

combination where the weights are strictly positive and sum to one.

1.2 Application: First law of input demand

Consider a firm that produces a single output using m inputs. If the firm does not have a large

enough market share to significantly affect the market price of its inputs, then the firm is called an input

price-taker. Suppose that the firm is an input price-taker. Let the input price vector be 1( ,..., )mr r r .

We make no particular assumption about the firm’s market power in its output market so write the

price as ( )p q . Total revenue is then ( ) ( )R q p q q .

Page 6: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

5

We now derive the following fundamental law.

Proposition: First law of input demand

Let *z be the profit-maximizing input vector when the input price vector is r and let *z be the profit-

maximizing input vector when the input price vector is r . Then

* *ˆ ˆ( ) ( ) 0r z r r z z (1.1)

Remark 1: If only the price of input i changes this inequality becomes

* *ˆ ˆ( )( ) 0i i i i ir z r r z z .

Thus if a single input price rises, demand for that input falls.

Remark 2: Working carefully through the following proof will be a good test of your comfort level with

the algebra of vectors.

Proof: Let ( , )z q be any feasible plan for the firm. That is, the firm can produce q units of output using

input vector z . If it does so, then the profit of the firm is

( )R q r z .

Let * *( , )z q be profit-maximizing when the input price vector is r . Then for all feasible input output

vectors,

* *( ) ( )R q r z R q r z . (1.2)

Also let * *ˆˆ( , )z q be profit-maximizing when the input price vector is r . Then, for all feasible input

output vectors,

* *ˆ ˆ ˆˆ( ) ( )R q r z R q r z . (1.3)

Since * *ˆˆ( , )z q is a feasible plan it follows from (1.2) that

* * * *ˆ ˆ( ) ( )R q r z R q r z

Since * *( , )z q is a feasible plan it follows from (1.3) that

Page 7: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

6

* * * *ˆ ˆ ˆˆ( ) ( )R q r z R q r z .

Rearranging these two inequalities yields the following result.

* * * * * *ˆ ˆ ˆˆ ˆ( ) ( )r z r z R q R q r z r z .

Therefore

* * * *ˆ ˆ ˆ( ) ( )r z z r z z .

Finally, rearranging this inequality yields (1.1).

QED

1.3 Sets of vectors

Any collection of objects, S , is called a set. In economics we often work with sets of numbers

or vectors. Any vector 0x in the set S is called an element of the set and we say that “

0x belongs to

S ” or that “0x is in S ”. We use the shorthand

0x S .

If 0x does not belong to the set we write

0x S .

Subset

If all the elements of a set S are also in the set T we say that S is a subset of T and write S T

is a subset of

Page 8: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

7

The set of all real numbers is written as . The set of all -vectorsn is written as n .

Convex Set

Consider the sets depicted in the diagrams below. In the left diagram, all convex combinations

of two vectors in the set also lie in the set. Such a set is called a convex set. This is not the case for the

right-hand diagram. Convex sets play a very central role in economic modelling.

Definition: Convex Set

A set S of -vectorsn is convex if, for any pair of vectors 0x and

1x in S , all convex combinations are

also in S . That is, for all , 0 1 , 0 1(1 )x x x is in S .

Example 1: Interval { | }S x a x b

Example 2: Rectangle

This is a natural generalization of an interval.

2

1 1 1 2 2 2{ | , }S x a x b a x b

Non-convex set

Convex set

Page 9: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

8

Boundary point of a set

A vector 0x is a boundary point of the set S if there are vectors in the set and vectors not in the set

that are arbitrarily close to 0x . We define this formally using our Euclidean measure of distance.

Definition: Boundary point

0x is a boundary point of a set nS if for any 0 there exist a vector x S and ˆx S such

that 0x x and 0ˆx x .

Interior point

Any point in a set that is not a boundary point is called an interior point.

Example 3: Interval on the real line

( , ) { | }a b x a x b , [ , ] { | }a b x a x b

Note that in both cases the points a and b satisfy the definition for a boundary point. Thus none of the

boundary points of a set need lie in the set.

Closed set

The set S is closed if it contains all of its boundary points. Then the interval [ , ]a b is closed.

Open Set

Set containing none of its boundary points. Then the set ( , )a b is an open interval.

Note that a set may be neither open nor close. For example the interval [ , ) { | }a b x a x b is

neither open nor closed.

Example 4: Open Hypercube with side .

{ | ( , ), 1,..., }n

i i iS x x a a i n .

Example 5: Consumer’s budget set

A consumer with income I can choose among n commodities. The price of commodity j is jp .

Page 10: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

9

{ | 0, }nB x x p x I .

Following the definition of a convex combination it can be proved in a few lines that for all of these

examples, the set S is convex. The next two sets are also convex but the proofs are more subtle.

Example 6: Closed -balln with center 0x

0{ | }nS x x x

Note that if 2n ,

2

2 0 2 2 0 2 0 2 2

1 1 2 2{ | } { | ( ) ( ) }S x x x x x x x x

This is a circle of radius . Similarly, if 3n this is a sphere of radius .

Circle of radius

Budget set of a consumer

Page 11: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

10

Example 7: Production Set

A “production vector” of a firm is a vector listing all of a firm’s inputs 1( ,..., )mz z z and outputs

1( ,..., )nq q q

( , )y z q .

The set of all production vectors, Y , that are feasible for a firm is called the firm’s production set.

A simple production set in the case in which a single input is used to produce a single output is

illustrated below.

Upper and lower bounds

The set S has an upper bound b if x b for all x S . A lower bound is similarly defined.

A set with both an upper and lower bound is called a bounded set.

Compact Set

A set is compact if it is closed and bounded.

Production set of a firm

Page 12: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

11

1.4 General arrays

Arrays can also have more than 1 row and column. The following array has dimension 2 3 .

11 12 13

21 22 23

t t t

t t t

T .

Such an array is called a matrix. When using matrix notation we will use bold-face. Of course column or

row vectors are special cases of a matrix. We will continue to call an array with one column or one row a

vector. But, if using matrix notation, it becomes important to distinguish between column and row

vectors. In this case a vector, c , written in bold-face, will always be a column vector. We then use the

following notation to “transpose” a column vector into a row vector.

1

2

c

c

c , 1 2[ , ]c c c .

It is often helpful to think of a general array as an array of n column vectors. Consider the array

T above.

1 2 3[ , , ]T t t t where 1

2

j

j

j

t

t

t .

Linear combinations of vectors

Consider the general m n array A , that is an array consisting of n column vectors, each of dimension

m . Given the algebra of vectors, any linear combination of these n column vectors is also a vector of

dimension m .

1 1 ... n nx x y a a .

The mathematical shorthand for this linear combination is as follows:

y Ax

Consider the 2 2 case so that 11 12

21 22

a a

a a

A and 1

2

x

x

x

Page 13: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

12

11 12 11 1 12 2

1 1 2 2 1 2

21 22 21 1 22 2

a a a x a xx x x x

a a a x a x

y a a

Note that 1y , the first component of y , is the sumproduct of the first row of A and the vector x . And

2y is the sumproduct of the second row of A and the vector x .

In the same way, for an array A of dimension m n , the sum of the columns of A weighted

by the components of the vector x is a vector y . The -thi component of y is the sumproduct of the

-thi row of A and the vector y .

Convex combinations of vectors

If the components of the vector x are strictly positive and add to 1, then the vector y Ax is a

convex combination of the columns of A . These convex combinations are depicted below for two

2 2 arrays.

(i) 2 0

0 3

A 1

1 2 1 2

2

2 0 2 0

0 3 0 3

xx x x x

x

1 2Ax a a

(ii) 4 3

2 7

A 1

1 2 1 2

2

4 3 4 3

2 7 2 7

xx x x x

x

1 2Ax a a .

For each example, the two vectors, 1a and 2a are depicted below. The set of convex combinations is

then the heavy line connecting them.

Convex combinations of two vectors

Case (i) Case (ii)

Page 14: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

13

Positive linear combinations of vectors

Next consider the weighted sum of 1a and 2a where the weights are both positive and the sum

of the weights is at most 1. These are all the points in the shaded areas in the figure below.

Next suppose that we allow weights to be positive or negative but the sum of the absolute values must

satisfy

1 2 1x x .

As you should check, the possible values of y = Ax for case (ii) array are those in the lightly and heavily

shaded areas in the figure below.

Positive linear combinations where

Page 15: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

14

Finally, if we allow any weights at all it should now be clear that the vector y can be any 2-dimensional

vector. That is, for any vector y there is some x such that Ax = y .

This is true unless there is some non-zero x such that the linear combinations sum to 1

11 12

1 1 2 2 1 2

21 22

0

0

a ax x x x

a a

Ax a a .

For if so,

11 12

1 2

21 22

a ax x

a a

and so

11 12 2

21 22 1

( )a a x

a a x

That is, 1a is a scalar multiple of 2a . In this case all the weighted sums are scalar multiples of 2a .

Graphically, all the weighted sums lie on a line.

Absolute value of weights sum to at most one

Page 16: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

15

Any collection of vectors are said to be linearly dependent if some linear combination is the zero

vector. Otherwise the vectors are said to be linearly independent.

Definition: Linearly dependent vectors

The vectors 1,..., ma a are linearly independent if there is no vector of weights 0x such that

1 1 ... m mx x a a 0 .

Square matrixes

Suppose that the matrix A is of dimension n n . Consider the mapping

y = Ax

That is, the vector y is a linear combination of the columns of A . If the columns of A are linearly

independent. Then for any vector ny there is some vector x such that y = Ax .

Actually we can say more than this. Given linear independence, there is another n n matrix 1A ,

such that

1x A y .

This is called the inverse of the matrix A .

For the 2 2 the two columns of A are linearly dependent if for 0α

11 12

1 2

21 22

0a a

a a

Suppose that 1 0 . Then

211 12

1

( )a a

and 2

21 22

1

( )a a

.

Then 2 211 22 12 22 12 22 12 21

1 1

( ) ( )a a a a a a a a

.

Therefore the “determinant” of the square matrix A

Page 17: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

16

11 22 12 21( ) 0a a a a A .

Thus for linear independence we require that ( ) 0 A .

As you may check by considering examples, the inverse of a 2 2 matrix A is

22 121

21 11

1

( )

a a

a a

AA

.

As we will see below, for 2n the inverse of a matrix can be easily computed using a spread-sheet.

1.5 Solving numerically a system of linear equations

Consider a system of n linear equation in n unknowns. Using arrays, this system can be written

as follows:

1 1 .. n nx x Ax = a a b

As long as the columns of A are linearly independent, we can use a spread-sheet to compute the

inverse array 1A . Then the solution of these equation is

1x = A b

That is, it is the weighted sum of the columns of 1A where the weights are the components of b.

Numerical example: Three linear equations

Suppose

0 1 1

2 0 2

5 5 0

A and

5

4

3

b . We wish to solve the equations system Ax = b .

These arrays are shown below in a spreadsheet. The objective is to compute the inverse matrix in cells

[ 8 : 10]B D . Drag the cursor to select these calls then type the following formula in the formula bar as

shown.

=minverse(B3:D5)

Page 18: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

17

To compute a formula in a single cell you would then click on the Enter key. To get Excel to compute the

formula for an array you need to hold down the CTRL+SHIFT keys and then click on the Enter key.

Try this and you will find that the inverse matrix is as depicted below.

The final step is to multiply the array 1A and the array b . For the example you can easily do this

yourself. You simply compute the sumproduct of each row of the inverse matrix and the vector b .

For more complicated problems it is much quicker to use your workbook to multiply two arrays. The

formula for this computation is

=mmult(B8:D10,F3;F5))

Proceed as above. Select the cells where you wish to locate the solution [ 8 : 10]F F . Then type the

above formula in the formula bar. Then hold down CTRL+SHIFT and click on ENTER. The solution is

shown below.

Page 19: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

18

Note that having done this once, you can use this same spreadsheet to solve any system of three linear

equations. Simply change the yellow data cells and the solution is automatically computed.

Exercise: System of equations with linear dependence

Suppose

1 0 1

2 4 6

3 1 4

A and

2

12

8

b .

(a) Let jc be the j -th column of A . Show for some 1x and 2x 1 1 2 2 3x x c c c . Hence the column

vectors are linearly dependent.

(b) Use the above result to show that if x solves the equation system Ax = b then for some 1z and 2z

1 1 2 2z z c c b

It follows that

1 11 2 12 2z a z a , 1 21 2 22 12z a z a and 1 31 2 32 8z a z a

(c) Solve for 1z and 2z satisfying the first two equations and hence show that the third equation cannot

be satisfied. Thus there is no x satisfying the equation system Ax = b .

Page 20: Basic mathematics of economic models...Basic mathematics of economic models 1. Arrays and sets 1.1 Vectors 1 1.2 Application: First Law of input demand 3 1.3 Sets 6 1.4 General arrays

19

(d) If instead 3 9b confirm that

1

1

1

x is a solution to the equation system Ax = b .

(e) Show that if 3 9b , then there is a unique solution to

1 11 2 12 1z a z a b , 1 21 2 22 2z a z a b and 1 31 2 32 3z a z a b

(f) Show that there is more than one solution to the equation system Ax = b .