Slides 2022 Week 6

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

Quantitative Methods I

Zehra Eksi-Altay, Jana Hlavinova, Sourav Adhikari,


(Gregor Kastner)

Institute for Statistics and Mathematics


Dept. of Finance, Accounting and Statistics

Winter 2022
Part I

Introductory Session: SH 23, BM 2

Slide 2
Outline

 Elementary algebra

 Equations

 Summation notation

Slide 3
Real numbers

 N (natural numbers):

 Z (integers):

 Q (rational numbers): , where a, b ∈ Z, b 6= 0


 decimal system: 42.14 = · 101 + · 100 + · 10−1 + · 10−2

 scientic notation: 2.34e-02= · 10 =


Note: Here, e is not the Euler constant!
 can be written as nite decimal fractions (see above) or periodic decimal fractions:
13/11 =
 R (real numbers): arbitrary decimal fractions  all of the above, plus:
√ √
2
2, π, 2 , 0.12112111211112 . . . and many (many) others
Slide 4
Integer Powers I

Denition:

an := a
| · a · a{z· . . . · a}
n factors

0
a := for a 6= 0

a−n := for a 6= 0
an
Properties:

ar · as = a

(ar )s = a

Slide 5
Integer Powers II

Example
If x−2 y 3 = 5, compute x2 y −3 + 2x−10 y 15

Slide 6
Integer Powers III

Example
Suppose you deposit e 1000 in a bank account paying 2% interest at the end of each
year. How much do you have after 5 years?

Slide 7
Integer Powers IV

Example
Suppose you buy something for e 1000 · 1.025 which decreases in value (depreciates) by
2% per year. How much is it worth after 5 years?

Slide 8
Integer Powers V

Example
How much money should you have deposited in a bank 5 years ago at 2% yearly interest
in order to buy something for e 1000 today?

Slide 9
Some important rules of algebra I

−(a + b) = −a b
a(b + c) = ab +
(a + b)(c + d) = ac + ad + bc + bd

(a + b)2 =

(a − b)2 =

(a + b)(a − b) =

Slide 10
Some important rules of algebra II

Example
Expand and simplify: (2t − 1)(t2 − 2t + 1)

Slide 11
Some important rules of algebra III

Example
Expand and simplify: (a + 1)2 + (a − 1)2 − 2(a + 1)(a − 1)

Slide 12
Some important rules for fractions I

a · c a
= if b 6= 0 and c 6= 0
b · c b
−a a a
= =−
b −b b
a b
+ =
c c c
a c
+ =
b d bd
a c
· =
b d bd
a c a d ad
÷ = · =
b d b c bc

Slide 13
Some important rules for fractions II

Example
Simplify:

1 1
p−q
+
1+x 1 + xq−p

Slide 14
Fractional powers I

Find x such that x2 = a?

a1/2 · a1/2 = a1/2+1/2 = a1 = a

Find x such that xn = a?

a1/n · . . . · a1/n = a1/n+...+1/n = a1 = a

Notation:


a1/2 = a

a1/n = na

Slide 15
Fractional powers II

Example

Compute
3
27, (1/32)1/5 , and 0.00010.25 .

Slide 16
Fractional powers III

Example
An amount of e 5000 in an account has increased to e 6000 in 20 years. What (constant)
yearly interest ratep has been used?

Slide 17
Inequalities I

Example
Find what values of x satisfy 3x − 5 > x − 3.

Slide 18
Inequalities II

Example
Find all x such that |3x − 2| ≤ 5.

Slide 19
Outline

 Elementary algebra

 Equations

 Summation notation

Slide 20
Equations I

Equations are called equivalent if they have the same solutions, and

 adding/subtracting the same number

 multiplying (or dividing) by the same number 6= 0


to both sides of the equality sign constitutes an equivalence transformation. We often
call doing fancy equivalence transformations solving.

Slide 21
Equations II

Example
Solve for x:
√ ax
1+x+ √ =0
1+x

Slide 22
Equations III

Example
A rm manufactures a commodity that costs e 20 per unit to produce. In addition, the
rm has xed costs of e 2000. Each unit is sold for e 75. How many units must be sold
if the rm is to meet a prot target of e 14 500?

Slide 23
Quadratic equations I

Find x, such that


ax2 + bx + c = 0, where a, b, c ∈ R

 Easy case 1: a = 0:

 Easy case 2: b = 0:

 Easy case 3: c = 0:

Slide 24
Quadratic equations II

General case: If b2 − 4ac ≥ 0 and a 6= 0, then

q
−b ±
ax2 + bx + c = 0 if and only if x=
2a

Slide 25
Quadratic equations III

Example
A producer faces the following demand: P = 100 − 2Q, where P stands for the price
of a certain product and Q for the quantity of products sold. For what price is the total
revenue TR = P · Q equal to zero?

Slide 26
Outline

 Elementary algebra

 Equations

 Summation notation

Slide 27
Summation notation I

n
X
Ni := N1 + N2 + . . . + Nn
i=1

Some important properties:

n
X
(ai + bi ) =
i=1

n
X
c · ai =
i=1

Slide 28
Summation notation II

Example
Evaluate
3
X
(i + 3)i
i=−2

Slide 29
Summation notation III

Example
Express in summation notation:

x x2 x3 x79 x80
1− + − + ... − +
2 3 4 80 81

Slide 30
Part II

Functions of One Variable: SH 4, BM 2

Slide 31
Outline

 Functions (SH 4.14.3)

 Linear Functions (SH 4.44.5)

 Polynomials (SH 4.64.7)

 Power Functions (SH 4.8)

 Exponential and Logarithmic Functions (SH 4.94.10)

Slide 32
Functions I

A function is an assignment. The denition of a function f requires three objects to be


specied:

1. a domain A,
2. a target set ( codomain) B ,
3. rule that assigns to any element of the domain one element of the codomain.

Notation: f : A → B , x 7→ f (x)

The range of a function f : A→B is the set f (A) = {f (x)| x ∈ A}.

Slide 33
Functions II

Example
Assign to each person in this room his/her age (in years).

Slide 34
Functions III

Example
Assign to each age (in years) the corresponding person in this room.

Slide 35
Functions IV

Example
Assign to each number its square.

Slide 36
Functions V

Example
Assign to each area of a square its side length.

Slide 37
Functions VI

Example

The total dollar cost of producing x units of a product is given by C(x) = 100x x+500.
Domain? Codomain? Range? Graph?

Slide 38
Functions VII

Example
The absolute value function is dened as follows:

R → R+ 0
x 7→ |x|

with 
if x≥0
|x| =
if x<0

Slide 39
Outline

 Functions (SH 4.14.3)

 Linear Functions (SH 4.44.5)

 Polynomials (SH 4.64.7)

 Power Functions (SH 4.8)

 Exponential and Logarithmic Functions (SH 4.94.10)

Slide 40
Linear (affine) functions I


R → R
f:
x 7→ ax + b

 a ∈ R...
 b ∈ R...

Slide 41
Linear (affine) functions II

Example
Suppose demand D for a good is a linear function of its price per unit P. When price
is e 10, demand is 300 units, and when price is e 15, demand is 250 units. Find the
demand function.

Slide 42
Linear (affine) functions III

Example
Suppose supply S for a good is a linear function of its price per unit P. When price is
e 10, supply is 100 units, and when price is e 20, supply is 200 units. Find the supply
function.

Slide 43
Linear (affine) functions IV

Example
Graph D and S and nd the equilibrium price P : D(P ) = S(P ).

Slide 44
Outline

 Functions (SH 4.14.3)

 Linear Functions (SH 4.44.5)

 Polynomials (SH 4.64.7)

 Power Functions (SH 4.8)

 Exponential and Logarithmic Functions (SH 4.94.10)

Slide 45
Polynomials I

Polynomial of degree n:

R → R
f:
x 7→ an xn + an−1 xn−1 + · · · + a1 x + a0

 an ∈ R \{0}
 an−1 , . . . , a1 , a0 ∈ R

Well behaved and well understood from a mathematical point of view. However,
nding roots, maxima, etc. can be tedious to do by hand.

Knowing the roots is powerful.

Slide 46
Polynomials II

Example

R → R
f:
x 7→ ax2 + bx + c

 a ∈ R \{0}
 b, c ∈ R

Its graph is a parabola that opens


 upwards if

 downwards if

Slide 47
Polynomials III

Example
Note that !2
b2 − 4ac
ax2 + bx + c = a x + −
4a

Slide 48
Polynomials IV

Example
Let f (x) = − 12 x2 − x + 3
2.
 Graph?
 Minimum/Maximum?
 x : f (x) = 0?
1
 Show that f (x) = − (x )(x ) and use this to study how the sign of f (x)
2
varies.

Slide 49
Polynomials V

Example
Factorize f (x) = − 21 x3 − x2 + 32 x.

Slide 50
Outline

 Functions (SH 4.14.3)

 Linear Functions (SH 4.44.5)

 Polynomials (SH 4.64.7)

 Power Functions (SH 4.8)

 Exponential and Logarithmic Functions (SH 4.94.10)

Slide 51
Power functions I

R+ \{0} → R

f:
x 7→ Axr

 A, r ∈ R

If r > 0, then we may allow the value 0 in the domain of f with f (0) = 0.

Slide 52
Power functions II

Example
Assume that the relationship between the size of houses s (in m2 ) and their selling price P (in
e) follows approximately
P (s) = 40 000 · s0.4

Slide 53
Outline

 Functions (SH 4.14.3)

 Linear Functions (SH 4.44.5)

 Polynomials (SH 4.64.7)

 Power Functions (SH 4.8)

 Exponential and Logarithmic Functions (SH 4.94.10)

Slide 54
Exponential functions I


R → R
f:
t 7→ Aat

 A ∈ R, a ∈ R+ \{0}
 Special case: The
P∞ natural exponential function t 7→ exp(t) where A=1 and
1
a=e= n=0 n! = 2.718281828459045 . . .

Slide 55
Exponential functions II

Example
The normal (or Gaussian) density function is given by

1 2
√ e−x /2

Slide 56
Exponential functions III

Some properties of exponential functions:

For any a > 0, x ∈ R we have

E1 a
x · = ax+y
ay
E2 axy = (ax )y = (ay )x
x
E3 a−x = a1
E4 a0 = 1

Slide 57
Exponential functions IV

General Interpretation:
p
 If a=1+ 100 , where p > 0, and A > 0, then f (t) will increase by p% for each unit
increase in t.
p
 If a=1− 100 , where0 < p < 100, and A > 0, then f (t) will decrease by p% for
each unit increase in t.

Slide 58
Exponential functions V

Example
Assume that you invest e 10 at an annual interest rate of 1%. Determine f (t), the
amount you have t years from now. How long does it take (approximately) for your
investment to double, how long to quadruple?

Slide 59
The logarithm I

The doubling time of an exponential function f (t) = Aat was dened as the time it
takes for f (t) to become twice as large. In order to nd the doubling time t∗ , we must
solve the equation a t∗ =2 ∗
for t :

Logarithm function
For any positive number x,
aloga x = x
Thus, loga x is the power of a you need to get x:

R+ \{0} → R

f:
x 7→ loga x

Note: Sometimes, we write log (or ln). This is the notation for loge x.
Slide 60
The logarithm II

Example
Find ln 1, ln e, ln 1/e, ln 4, and ln(−6).

Slide 61
The logarithm III

Some important rules for logarithms for x, y > 0 and p ∈ R:


L1 log xy =
L2 log xp =
L3 ln ex =
L4 eln x =
What is the rule for ln(x) − ln(y)?

Slide 62
The logarithm IV

Example
Simplify exp(ln x2 − 2 ln y).

Slide 63
The logarithm V

Example
How long does it take for an amount x to double at a yearly interest rate of i ∈ {1, 2, 3}
per cent? Verify the rule of 70!

Slide 64
The logarithm VI

Example
Find the mistake in the following proof , showing that 2 is smaller than 1.

1/4 < 1/2 ⇔


ln(1/4) < ln(1/2) ⇔
ln((1/2)2 ) < ln(1/2) ⇔
2 ln(1/2) < ln(1/2) ⇔
2<1

Slide 65
Part III

More About Functions: SH 5

Slide 66
Outline

 Transformations of Graphs

 New Functions from Old

 Inverse Functions

 Common Properties of Functions

Slide 67
Transformations of graphs I

 Replacing f (x) with f (x) + c moves the graph of f c units

 Replacing f (x) with f (x + c) moves the graph of f c units

 Replacing f (x) with cf (x) corresponds to a stretch (c <0 gives an x-axis


ip)

 Replacing f (x) with f (cx) corresponds to a compression (c <0 gives a


y -axis ip)

Slide 68
Transformations of graphs II

Example
Suppose a person earning y euros in a given year pays

 
y2
(
max 0, 1,000 000 − 100 if 0 ≤ y < 100 000
T (y) =
9 900 + (y − 100 000)/4 if y ≥ 100 000

euros that year in income tax. Illustrate graphically!

Slide 69
Transformations of graphs III

Slide 70
Transformations of graphs IV

Example
To reduce taxes,
 A suggests to allow every individual to deduct 10 000 euros before the tax is
calculated.
 B suggests to allow every individual to deduct 5% before the tax is calculated.
 C suggests to calculate the income tax on the full amount and then to allow each
person a tax credit of 1000 euros.
 D suggests to calculate the income tax on the full amount and then to allow each
person a tax credit of 10%.
Visualize and comment.

Slide 71
Outline

 Transformations of Graphs

 New Functions from Old

 Inverse Functions

 Common Properties of Functions

Slide 72
New functions from old I

Sums, dierences, products, and quotients of functions can be easily dened.

 The sum of f and g, f + g, is given by (f + g)(x) = f (x) + g(x).


 The dierence of f and g, f − g, is given by (f − g)(x) = f (x) − g(x).
 The product of f and g, f · g or f g, is given by (f · g)(x) = f (x)g(x).
 The quotient of f and g , f /g , is given by (f /g)(x) = f (x)/g(x).

Slide 73
New functions from old II

If g:A→B and f : B → C, then the composition is dened by


A → C
f ◦g :
x 7→ f (g(x))

The function g is often called the kernel or interior/inner function, while f is called the
exterior/outer function.

Note: In general,

 f ◦ g 6= f · g (and thus f 2 6= f ◦ f )
 f ◦ g 6= g ◦ f

Slide 74
New functions from old III

Example
Iff (x) = 3x − x3 and g(x) = x3 , compute and visualize (f + g)(x), (f − g)(x), (f g)(x),
(f /g)(x), f (g(x)), g(f (x)) and evaluate f (g(1)), and g(f (1)).

Slide 75
Outline

 Transformations of Graphs

 New Functions from Old

 Inverse Functions

 Common Properties of Functions

Slide 76
Injections, Surjections, Bijections I

 A function f is called injective if

 A function is called surjective if its range is equal to its codomain

 A function is called bijective if it is and

Slide 77
Injections, Surjections, Bijections II

Example
The function f : R → R; x 7→ x2 is neither injective nor surjective.

Slide 78
Inverse functions I

Let f :A→B be a bijective function. A function g : B → A is called the inverse of f if

g ◦ f = IdA (i.e. g(f (x)) = x)

Notes:

 If g ◦ f = IdA then f ◦ g = IdB


 The most common notation for the inverse of f is f −1
 Don't confuse f −1 (the inverse) with 1/f (the reciprocal)!

Slide 79
Inverse functions II

Example
Find the inverse of f : [−2, 2] → [−9, 7]; x 7→ x3 − 1. Plot f and f −1 .

Slide 80
Inverse functions III

Example

Consider f dened by f (x) = 4 ln( x + 4 − 2). Determine natural domain, range, and
inverse.

Slide 81
Outline

 Transformations of Graphs

 New Functions from Old

 Inverse Functions

 Common Properties of Functions

Slide 82
Symmetry

A function f is called
 symmetric about a if for all x it holds that

f (a + x) = f ( )

 even if f is symmetric about 0, i.e.

 odd if for all x it holds that


f (−x) =

Slide 83
Monotonicity

A function f is called
 increasing if a < b ⇒ f (a) f (b)
 decreasing if a < b ⇒ f (a) f (b)
for all values a, b on a suitable interval.

The function is called strictly increasing or decreasing (on that interval) if the
corresponding strict inequalities hold.

A function is said to be (strictly) monotonic if it is either (strictly) increasing or


(strictly) decreasing (on that interval).

A local extremum is a point where a function changes .

Slide 84
Convexity I

A function f is called

 conVex if
f (λa + (1 − λ)b) ≤ λf (a) + (1 − λ)f (b)
 concAve if
f (λa + (1 − λ)b) ≥ λf (a) + (1 − λ)f (b)
for all values a, b on a suitable interval and λ ∈ [0, 1].

An inection point is a point where a graph changes .

Slide 85
Convexity II

Example
Discuss the convexity of f with f (x) = x2 .

Let x1 , x 2 ∈ R and λ ∈ [0, 1]. We have:

(λx1 + (1 − λ)x2 )2 − λx21 − (1 − λ)x22


= (λ2 − λ)x21 + 2(λ − λ2 )x1 x2 + (λ2 − λ)x22
= (λ2 − λ)(x1 − x2 )2
≤0

Hence, f (x) = x2 is a convex function.

Slide 86
Part IV

Derivatives (SH 6\{6.5} + 7.1 + 7.2 + 7.5 + 7.7)

Slide 87
Slopes of curves I

What is the steepness of a function at a particular point?


 f (x) = kx + d,
For a linear function, the answer is clear
 But how about a general function f ?

Slide 88
Slopes of curves II

exp(− x)
f(x) = kx + d f(x) = −3
0.5cos(x)
7

6
6
5

k=?

4
k=2
4
f(x)

f(x)
3

2
2
1

0
0
−1

−2
−1 −0.5 0 0.5 1 1.5 2 2.5 3 −1.0 −0.5 0.0 0.5 1.0 1.5
x x

Slide 89
Definition of derivative I

(If it exists) the derivative of a function f at point x, denoted f 0 (x), is

f (x + h) − f (x)
f 0 (x) := lim . (1)
h→0 h
If the limit (1) exists ...

 ... on a certain subset C of Domain(f ), then we say that f is dierentiable on C


 ... for all elements of D = Domain(f ), then we simply say that f is dierentiable. In
particular, f0 is itself a function with

f 0 : D → R.

Slide 90
Definition of derivative II

Example
Compute f 0 (x) for f (x) = x2 .

Slide 91
Rules of differentiation I

1. Denition and Notation

df (x) ∂f (x) f (x + h) − f (x)


:= := f 0 (x) := lim
dx ∂x h→0 h
2. Constant Function Rule

f (x) = c
f 0 (x) = 0

3. Power Function Rule

f (x) = xc
f 0 (x) = cxc−1
Slide 92
Rules of differentiation II

4. Multiplication by a Constant

f (x) = c · g(x)
f 0 (x) = c · g 0 (x)

5. Sums and Dierences

f (x) = g(x) ± h(x)


f 0 (x) = g 0 (x) ± h0 (x)

6. Product Rule

f (x) = g(x)h(x)
f 0 (x) = g 0 (x)h(x) + g(x)h0 (x)
Slide 93
Rules of differentiation III

7. Quotient Rule

g(x)
f (x) =
h(x)
g 0 (x)h(x) − g(x)h0 (x)
f 0 (x) =
[h(x)]2

8. Chain Rule

f (x) = g(h(x))
f 0 (x) = g 0 (h(x)) · h0 (x)

Slide 94
Rules of differentiation IV

Derivatives of some special functions

d
exp(x) = exp(x),
dx
d 1
ln(x) = ,
dx x
d
sin(x) = cos(x),
dx
d
cos(x) = − sin(x).
dx

sin(x)
What about tan(x) = cos(x) ?

Slide 95
Rules of differentiation V

Example
f0 f (x) = sin 1/ exp(x2 ) − x2

Find of f with .

Slide 96
Increasing and decreasing functions

Recall the denitions of (strictly) increasing and (strictly) decreasing functions

Suppose f is dierentiable on an interval I .


 f 0 (x) ≥ 0, for all x∈I ⇔ f is increasing in I
 f 0 (x) ≤ 0, for all x∈I ⇔ f is decreasing in I

Slide 97
Convex and concave functions

Recall the denitions of convex and concave functions.

Note that (if it exists) the second derivative f 00 of a function f is simply the derivative
0
of f . We can use the same logic to dene the nth derivative f
(n) of a function f .

Suppose f is twice dierentiable on an interval I .


 f 00 (x) ≥ 0, for all x∈I ⇔ f is convex on I
 f 00 (x) ≤ 0, for all x∈I ⇔ f is concave on I

Slide 98
Implicit differentiation I

Suppose you observe for a constant k an equation like

f (x, y) = k (2)

 For Equation (2) to be fullled for changing x, y needs to adapt as well

 Thus, Equation (2) denes y implicitly as a function of x

 0
We can nd y by dierentiating both sides of Equation (2) w.r.t. x and by solving
the resulting equation

Note: in Equation (2) we have a slight abuse of notation since we do not know multivariate calculus
yet

Slide 99
Implicit differentiation II

Example
Find an expression for y0, where it holds that xy = 5.

Slide 100
Implicit differentiation III

Example
Find an expression for y0, where it holds that y 3 + 3x2 y = 13.

Slide 101
Implicit differentiation IV

To nd y0 when an equation relates two variables x and y:


1. Dierentiate each side of the equation w.r.t. x, considering y as a function of x.
2. Solve the resulting equation for y0.

Slide 102
Taylor approximation I

The Taylor approximation of a function f (x) about a point a is given by

n
X f (i) (a)
f (a) + (x − a)i . (3)
i!
i=1

 Note that Equation (3) is a polynomial function in x.


 For n=1 we get a linear and for n=2 we get a quadratic approximation.

 For values x close to a, the Taylor approximation gets better with increasing n;
however, for values far from a this does not need to hold!

 How well the approximation works in general depends on the nature of f.

Slide 103
Taylor approximation II

Example
Do an nth order Taylor approximation of f (x) = exp(x) about a = 0 for n ∈ {1, . . . , 5}.

Slide 104
Elasticities

If f is dierentiable at x and f (x) 6= 0, the elasticity of f w.r.t. x is

df (x)
x 0 f (x)
Elx f (x) = f (x) = .
dx
f (x) x

 Elasticity is the ratio of the percentage change in f (x) to the percentage change in x.
 Elasticity is an important concept for economists.
 Take e.g. the demand for a certain good as a function of its price, D(p). The price
elasticity of the demand, Elp D(p), measures the percentage change in quantity
demanded in response to a one percent change in price.

Slide 105
Further topics

Derivatives give rise to many important applications, e.g.


 Unconstrained and Constrained optimization problems (Will be covered in a seperate
unit)
Rb
 Integration: computation of area under a curve via
a f (x)dx can be simplied by
nding the antiderivative of f.
 limx→a fg(x)
L'Hôpital: Limits of type
(x)
, where limx→a f (x) = limx→a g(x) = ±∞ or

limx→a f (x) = limx→a g(x) = 0 can be easily handled by using f 0 and g 0 .


 Dierential equations
 ...

Slide 106
Part V

Matrix Algebra (SH 15 + 16.6 + 16.7(2) + 16.9)

Slide 107
Before we start I

First o: Check out 3Blue1Brown.com if you really want to know what's going on. Not
exactly free lunch but very rewarding.

Slide 108
Before we start II

A simple example of a Leontief model


A simple economy has three industries: shing, forestry, and boatbuilding. Producing
 1 ton of sh requires α shing boats
 1 ton of timber requires β tons of sh
 1 shing boat requires γ tons of timber

Assume further that this economy has a nal demand of d1 tons of sh and d2 tons of
timber (and no nal demand for boats). How many tons of sh x1 , how many tons of
timber x2 , and how many shing boats x3 have to be produced?

Slide 109
Matrices

 
a11 a12 . . . a1n
 a21 a22 . . . a2n 
A = (aij )m×n = (aij ) =  .
 
. . 
 .. .
.
. 
.
am1 am2 . . . amn

Important terms: Special matrices:


 row  0m×n or simply 0, the zero matrix of
 column size m times n

 dimension/size / order
 In or simply I , the identity matrix of
order n (times n)
 elements / entries
 (row or column) vector

Slide 110
Matrix operations I

For a scalar α (i.e. a real number) and two matrices A and B of the same :

 The matrices are called equal (A = B) if all their elements are equal

 Matrix addition (A + B) is dened element-wise

 Scalar-matrix multiplication (αA) is dened element-wise

For these operations, all the usual rules apply

 (A + B) + C = A + (B + C) ( )

 A+B =B+A ( )

 (α + β)A = αA + βA ( )

 α(A + B) = αA + αB ( )

Slide 111
Matrix operations II

Matrix multiplication is dierent! For A = (aij )m×n and B = (bij )n×p , the matrix

n
X
AB := C = (cij )m×p with cij = air brj
r=1

Otherwise put: cij is the scalar product of the ith row of A with the j th row of B.

Slide 112
Matrix operations III

Example
   
0 1 2 3 2
2 3 1 ·  1 0 =
4 −1 6 −1 1

   
3 2 0 1 2
 1 0 · 2 3 1 =
−1 1 4 −1 6

Slide 113
Matrix operations IV

Example
Initially, three rms, A, B, and C, share the market for a certain commodity. Firm A has
20% of the market, B has 60%, and C has . In the course of the next year, the
following changes occur: rm A keeps 85% of its customers while losing 5% to B and
to C; rm B keeps 55% of its customers, while losing 10% to A and to C;

and rm C keeps 85% of its customers, while losing 10% to A and to B.

Find the transition matrix T and the market share vector s. Find and interpret the
values of T s, T (T s), T (T (T s))), etc.!

Slide 114
Rules for matrix multiplication I

 (AB)C = A(BC) ( )

 (A + B)C = AC + BC ( )

 A(B + C) = AB + AC ( )

but
 AB 6= BA (in general)

Note: An := AA . . . A}
| {z is well dened!
n times

Slide 115
Rules for matrix multiplication II

Example
Expand (A + B)2 !

Slide 116
Rules for matrix multiplication III

Example
Country A Country B Country C

1
b1
2
2
3 1 c1
1
a1 b2
1
c2
1
2
4 1
a2 b3
c3

1 b4

What is the total number of ight connections between the dierent airports in
countries A and C?

Slide 117
The transpose I

A0 = A> = (a0ij ) where a0ij = aji (interchanging rows and columns)

Some useful rules:

 (A0 )0 = A
 (A + B)0 = A0 + B 0
 (AB)0 = B 0 A0

A matrix A is called symmetric if A = A0 .

Slide 118
The transpose II

Example
For any matrix X, show that X 0X and XX 0 are symmetric.

Slide 119
Systems of equations in matrix form I

A simple example of a Leontief model (revisited)


A simple economy has three industries: shing, forestry, and boatbuilding. Producing
 1 ton of sh requires α shing boats
 1 ton of timber requires β tons of sh
 1 shing boat requires γ tons of timber

Assume further that this economy has a nal demand of d1 tons of sh and d2 tons of
timber (and no nal demand for boats). How many tons of sh x1 , how many tons of
timber x2 , and how many shing boats x3 have to be produced?

Write down the corresponding system of equations in matrix form and solve it for
α = 1/2, β = 1/4, γ = 2, d1 = 100, and d2 = 80!

Slide 120
Systems of equations in matrix form II

Gaussian elimination (Gauss-Jordan method) consists of performing elementary row


operations to simplify matters:
 Interchange any pair of rows
 Multiply any row by a scalar 6= 0
 Add any multiple 6= 0 of one row to a dierent row

Gauss Elimination Method


1. Make a staircase with 1 as the coecient for each nonzero leading entry.

2. Produce 0's above each leading entry.

3. The general solution is found by expressing the unknowns that occur as leading
entries in terms of those unknowns that do not. The latter unknowns (if there are
any) can be chosen freely. The number of unknowns that can be chosen freely
(possibly 0) is the number of degrees of freedom.

Slide 121
Systems of equations in matrix form III

Example

x1 + x3 + 2x4 = a
x1 + 3x2 − x3 + x4 = b
x1 + 9x2 − 5x3 − x4 = c

We can write the above system in the following form:

 
1 0 1 2 a
 1 3 −1 1 b 
1 9 −5 1 c

Slide 122
The inverse of a matrix I

For scalars, we know that

α· = ·α=1
if α 6=

For matrices, we call X the inverse of A if

AX = XA = I

 Note that A (and thus X) need to be square matrices for this to make sense!

 If A has an inverse (A is invertible), this inverse is uniquely dened (try to proof

this!) and we denote it by .

Slide 123
The inverse of a matrix II

Example
Find the inverse of    
2 1 1 0
, ,
1 0 0 0
and  
a b
!
c d
Answer:
 −1  
a b 1 d −b
=
c d ad − bc −c a

Slide 124
The inverse of a matrix III

Determinant
The determinant of a matrix A, det(A), is a special number that can be calculated for
any square matrix A.

 The determinant helps us nd the inverse of a matrix. Inverse of a matrix exist if and
only if the determinant of the matrix is non-zero.

 A matrix is called singular if it is not invertible (i.e., determinant is 0).


 A matrix is called regular if it is invertible (i.e., determinant is dierent than 0).
 
a b
 For a 2×2 matrix A= det(A) = ad − bc
,
c d
 
a1 0 0 ...
 0 a2 0 ... 
 For an n × n diagonal matrix A = 
. . . . . . . . .
, det(A) = a1 a2 . . . an
. . .
0 0 ... an
Slide 125
The inverse of a matrix IV

Properties of the inverse:

 (A−1 )−1 =
 (AB)−1 =
 (A0 )−1 =
 (αA)−1 =

Slide 126
Solving matrix equations I

A simple example of a Leontief model (revisited once more)


A simple economy has three industries: shing, forestry, and boatbuilding. Producing
 1 ton of sh requires α shing boats
 1 ton of timber requires β tons of sh
 1 shing boat requires γ tons of timber

Assume further that this economy has a nal demand of d1 tons of sh and d2 tons of
timber (and no nal demand for boats). How many tons of sh x1 , how many tons of
timber x2 , and how many shing boats x3 have to be produced?

Write down the corresponding system of equations in matrix form and solve it generally
and for α = 1/2, β = 1/4, γ = 2, d1 = 100, and d2 = 80!

Slide 127
Solving matrix equations II

Example
Find a matrix X that satises AB + CX = D .

Slide 128
Solving matrix equations III

Example
Let C be a square matrix that satises C2 + C = I. Show that
 C −1 = I + C
 C 3 = −I + 2C
 C 4 = 2I − 3C

Slide 129
Part VI

Functions of Many Variables (SH 11\{11.4} )

Slide 130
Functions of Two Variables

Denition: Suppose D is a subset of the xy -plane. A function f of two real variables


x and y with domain D is a rule that assigns a specied number f (x, y) to each point
(x, y) in D.
Example
R×R → R
Consider the function dened by f:
(x, y) 7→ 2x + x2 y 3
What are f (0, 1), f (−1, 0), and f (a + 1, b)?

Slide 131
An example for a function of two variables

Example
Consider the following Cobb-Douglas production function

R+ × R+ → R+
f:
(p, m) 7→ p−1.5 m2.08

where f is milk consumption, p is the relative price of milk and m is income per family.
 Plot and interpret! (in R)
 Find and interpret f (c1 p, c2 m)/f (p, m) for positive numbers c1 and c2 .
 Find and interpret f (p + h, m) − f (p, m) for a positive number h.

Slide 132
Partial derivatives I

For functions of two variables, z = f (x, y), we want to examine how quickly the value
of the function changes w.r.t. changes in the values of the variables x and y .

Partial derivatives are dened by:

∂f f (x + h, y) − f (x, y)
fx = fx0 = f10 = := lim
∂x h→0 h
and
∂f f (x, y + h) − f (x, y)
fy = fy0 = f20 = := lim
∂y h→0 h

Slide 133
Partial derivatives II

Interpretation of partial derivatives


 fx ≥ 0 (> 0) means f is (strictly) increasing in x.
 fx ≤ 0 (< 0) means f is (strictly) decreasing in x.
 Same interpretation holds for the other variables of the function.

Slide 134
Partial derivatives III

Example
Consider again f (p, m) = p−1.5 m2.08 . Compute and interpret the partial derivatives fp
and fm .

Slide 135
Demand for money

Example
The demand for money M in the United States for the period 1929 to 1952 has been
estimated as
M = 0.14Y + 76.03(r − 2)−0.84 , (r > 2),
where Y r is the interest rate measured in percent
is the annual national income, and
per year. Find the partial derivatives ∂M/∂Y = MY = MY0 and ∂M/∂r = Mr = Mr0
and discuss their signs.

Slide 136
Butter and margarine

Example
Let D(p, q) and E(p, q) be the demands for two commodities when the prices per unit
are p and q , respectively. Suppose the commodities are substitutes in consumption, such
as butter and margarine. What are the normal signs of the partial derivatives of D and
E w.r.t. p and q ?

Slide 137
Higher-order partial derivatives I

If z = f (x, y), then fx and fy are called rst-order partial derivatives. These partial
derivatives are, in general, again functions of two variables. From fx , we can generate
two new functions by taking the partial derivatives w.r.t. x and y and same for fy . The
four functions we obtain by dierentiating twice in this way are called second-order
partial derivatives of f (x, y):
Direct partial derivatives:

00 00 ∂2f 00 00 ∂2f
fxx = fxx = f11 = , fyy = fxx = f22 =
∂x2 ∂y 2

and Cross-partial derivatives :

00 00 ∂2f 00 00 ∂2f
fxy = fxy = f12 = , fyx = fyx = f21 =
∂x∂y ∂x∂y

Slide 138
Higher-order partial derivatives II

Interpretation of second-order partial derivatives


 fxx ≥ 0 (> 0) means f is (strictly) convex in x.
 fxx ≤ 0 (< 0) means f is (strictly) concave in x.
 Same interpretation holds for the other variables of the function.

Slide 139
Higher-order partial derivatives III

Example
Consider again f (p, m) = p−1.5 m2.08 . Compute the second order partial derivatives fpp ,
fmm , fpm , fmp .

Slide 140
The Hessian matrix I

Suppose we have a function of n variables f (x1 , x2 , . . . , xn ). It is usual to display the


second-order partials fxi xj , i, j = 1, . . . , n in an n × n square matrix. The matrix,
denoted by H, is called the Hessian (matrix). For n = 3, i.e., function of the form
f (x, y, z), we have the following:

 2 
  00 ∂ f ∂2f ∂2f
00 00
 
fxx fxy fxz f11 f12 f13 ∂x2 ∂x∂y ∂x∂z 
00 00 00 ∂2f ∂2f ∂2f 

H = fyx fyy fyz = f21 f22 f23 =  ∂y∂x
    
∂y 2 ∂y∂z 
fzx fzy fzz 00
f31 00
f32 00
f33 ∂2f ∂2f ∂2f
| {z } | {z } ∂z∂x ∂z∂y ∂z 2
Classroom notation Coursebook notation
| {z }
Leibniz's notation

Slide 141
The Hessian matrix II

Example
Find the second order partial derivatives of f with f (x, y, z) = 3xyz + xz 3 + xey − y ln x,
i.e. nd the Hessian matrix.

Slide 142
Part VII

Optimization: SH
8.1-8.2-8.3-8.5-8.6-13.1-14.1-14.2-14.3-14.5; BM
7.4,7.5

Slide 143
Outline

 Single-variable Optimization: SH 8.1-8.2-8.3-8.5-8.6

 Multivariate optimization: SH 13.1

 Constrained optimization: SH 14.1-14.2-14.3-14.5

Slide 144
Single-Variable Optimization I

We are dealing with single-variable optimization without constraints (Ch. 8 of SH).

Local Extrema
The function f has a local maximum (minimum) at c if there exists an interval (α, β)
about c s.t.
f (x) ≤ (≥) f (c) for all x ∈ (α, β) ∩ Domain(f )

If f (x) ≤ (≥)f (c) for all x ∈ Domain(f ), then we call c a global maximum (minimum).

Slide 145
Single-Variable Optimization II

Necessary First-Order Condition


Let function f be dierentiable in an interval I and x be an interior point
∗ of I. For x
to be a local extreme point (i.e. a maximum or a minimum) of f in I, x needs to be a
solution of
f 0 (x) = 0. (4)

Big Note: Condition (4) for an arbitrary x does not guarantee that x is an extremum!

∗ a, b ∈ R, a < b. All the points in (a, b) are interior points of [a, b], [a, b), (a, b] and
(a, b).

Slide 146
Single-Variable Optimization III

First Derivative Test


Suppose c is a critical point of f , i.e. f 0 (c) = 0.
 0 0
If f (x) ≥ (≤)0 on some interval (a, c) and f (x) ≤ (≥)0 on some interval (c, b),
then x is a local maximum (minimum) of f .
 0
If f (x) > 0 both on some intervals (a, c) and (c, b), then c is not a local extreme
0
point of f . Same conclusion holds for f (x) < 0.

Slide 147
Single-Variable Optimization IV

Second Derivative Test


Let f be a twice dierentiable function on an interval I, and let c be an interior point
of I.
 0
If f (c) = 0 and f 00 (c) < (>)0, then c is a strict local maximum (minimum).
 0
If f (c) = 0 and f 00 (c) = 0, then the character of c remains undetermined.

A Recipe for nding Extrema of f


1. Find all x ∈ Domain(f ), s.t. f 0 (x) = 0
2. Use critical points x found in part 1 and decide about convexity/concavity in x using
00
sign(f (x))

Slide 148
Example (Single variable optimization):
Profit Maximization I

Example
Maximize the prot Π of a rm, given total revenue function

R(Q) = 4000Q − 33Q2

and total cost function

C(Q) = 2Q3 − 3Q2 + 400Q + 5000.

Assume Q > 0.

Slide 149
Example (Single variable optimization):
Profit Maximization II

Step 1: Set up the prot function Π(Q) =


Step 2: Take the rst derivative, set it equal to zero, and solve for Q to nd the critical
points Q= , Q= .

Step 3: Apply the second derivative test to decide on the extremum.

Slide 150
Outline

 Single-variable Optimization: SH 8.1-8.2-8.3-8.5-8.6

 Multivariate optimization: SH 13.1

 Constrained optimization: SH 14.1-14.2-14.3-14.5

Slide 151
Multivariate optimization I

Necessary rst-order conditions


A dierentiable function f with f (x, y) can have a maximum or minimum at an interior
point (x0 , y0 ) of its domain only if it is a critical point, i.e.

fx (x0 , y0 ) = 0 and fy (x0 , y0 ) = 0

which are known as FOCs.

Slide 152
A more general recipe I

(a) Find the critical (a.k.a. stationary, a.k.a. interesting) points, i.e. the points where
both partial derivatives fx (x, y) and fy (x, y) are zero.

(b) Find the direct second order partial derivatives fxx (x, y) and fyy (x, y) and evaluate
them at the stationary points found in (a). If both direct second order partial
derivatives evaluated at a stationary point are greater than zero, you have found a
candidate for a local minimum. If both direct second order partial derivatives
evaluated at a stationary point are smaller than zero, you have found a candidate for
a local maximum.

Slide 153
A more general recipe II

(c) To verify that a candidate (a, b) found in (b) is actually a local extremum, check that
the product of the direct second order partial derivatives evaluated at (a, b) is greater
than the product of the indirect second order partial derivatives evaluated at (a, b),
i.e.
fxx (a, b)fyy (a, b) > fxy (a, b)fyx (a, b).
(d) For stationary points (a, b), where

fxx (a, b)fyy (a, b) < fxy (a, b)fyx (a, b),

you have found a saddle point, i.e. a stationary point that is neither a maximum nor
a minimum.

(e) If
fxx (a, b)fyy (a, b) = fxy (a, b)fyx (a, b),
the test is inconclusive.
Slide 154
Example: Profit Maximization, two goods
I

Example
A rm producing two goods x and y has the prot function:

Π(x, y) = 64x − 2x2 + 4xy − 4y 2 + 32y − 14

Find the prot maximizing output for each of the two goods.

Slide 155
Example: Profit Maximization, two goods
II

Step 1: Take the rst-order partial derivatives, set them equal to zero, and solve for x and y
simultaneously:

Πx = =0
Πy = = 0.

Hence the critical point is x∗ = and y ∗ = 24.

Slide 156
Example: Profit Maximization, two goods
III

Step 2: Take the second-order direct partial derivatives and check the signs (negative is
required for a maximum !)

Πxx (x∗ , y ∗ ) = Πyy (x∗ , y ∗ ) =

Step 3: Take the cross partials to check the second order condition:

Πxx (x∗ , y ∗ )Πyy (x∗ , y ∗ ) > (Πxy (x∗ , y ∗ ))2

We conclude that prots are indeed maximized at x= and y= . At that point,


Π= .

Slide 157
Example: profit maximization

The demands for a monopolist's two products are determined by the equations

p = 25 − x, q = 24 − 2y,

where p and q are prices per unit of the two goods, and x and y are the corresponding
quantities. The costs of producing and selling x units of the rst good and y units of
the other are
C(x, y) = 3x2 + 3xy + y 2 .
1. Find the monopolist's prot π(x, y) from producing and selling x units of the rst
good and y units of the other.

2. Find the values of x and y that maximize π. Verify that you have found the
maximum prot.

3. Calculate the maximum prot.

Slide 158
Outline

 Single-variable Optimization: SH 8.1-8.2-8.3-8.5-8.6

 Multivariate optimization: SH 13.1

 Constrained optimization: SH 14.1-14.2-14.3-14.5

Slide 159
The Lagrange Multiplier Method I

Formulate a constrained optimization problem with equality constraints:

max f (x, y) such that g(x, y) = c

Can (often) be solved through the so-called Lagrange multiplier method.

Slide 160
The Lagrange Multiplier Method II

 Dene the Lagrangian

L(x, y) = f (x, y) − λ(g(x, y) − c)

 Find the partials w.r.t. x, y , and λ (trivial!) and set these to zero:

First Order Conditions (FOC)

Lx = fx − λgx = 0 (5)

Ly = fy − λgy = 0 (6)

g−c=0 (7)

 Solve for x, y , and λ which are the optimality candidates.


Slide 161
The Lagrange Multiplier Method III

Suciency Conditions
Consider the constrained optimization problem and suppose (x0 , y0 ) is a stationary
point for the Lagrangian

L(x, y) = f (x, y) − λ(g(x, y) − c).

 If the Lagrangian is concave, then (x0 , y0 ) solves the maximization problem.


 If the Lagrangian is convex, then (x0 , y0 ) solves the minimization problem.

Slide 162
The Lagrange Multiplier Method IV

 The Lagrange multiplier approximates the marginal impact on the objective function
caused by a small change in the constant of the constraint.

 Lagrange multipliers are often referred to as shadow prices. In utility maximization


subject to a budget constraint, for example, λ would represent the marginal utility of
an extra dollar of income.

 The constraint can be added to or subtracted from the objective function without
changing the critical values of x and y. Only the sign of λ will be aected.

Slide 163
Example: Profit Maximization under pro-
duction constraints I

Example
What combination of goods x and y should a prot-maximizing rm produce when its
total prot function is

Π(x, y) = 80x − 2x2 − xy − 3y 2 + 100y

and its maximum output capacity is x + y = 12. Calculate the eect on prot if the
maximum capacity is expanded by 1 unit.

Slide 164
Example: Profit Maximization under pro-
duction constraints II

Step 1: Write down the Lagrangian and compute the partial derivatives:

L(x, y) = 80x − 2x2 − xy − 3y 2 + 100y + λ(12 − x − y)


Lx = 80 − 4x − y − λ = 0
Ly = =0
Lλ = 12 − x − y = 0

Step 2: Solve the above system simultaneously and get x∗ = , y∗ = and λ∗ = 53. This
yields Π=
Step 3: Check the second order conditions i.e., convexity/concavity of L.
Step 4: An increase in production capacity should lead to increased prots of approximately
53.

Slide 165

You might also like