ECON01 - Vector Di erentiation Simon Grant October 00 Abstract Notes on vector di erentiation and some simple economic applications and examples 1 Functions of One Variable g : R! R derivative (slope) d dx g (x) g (x + h) g (x) g0 (x) lim h!0 h nd derivative (rate of change of slope) d dx g (x) g 0 (x + h) g 0 (x) g00 (x) lim h!0 h Functions of Several Variables 1 Real-valued function of a vector x (N 1) 1 g : R N! R Partial derivative of g wrt x n is de ned as g (x 1 ; : : : ; x n + h; : : : ; x N ) g (x) g (x) g n (x) lim x n h!0 h (1) Dg (x) D x g (x) [rg (x)] T g (x) ; : : : ; g (x) x 1 x N () Ie the gradient of g evaluated at x = x, and denoted rg (x), is the vector (ie N 1 matrix) of partial derivatives 1 Vectors are assumed to be column vectors, ie (N 1) matrices Row vectors [ (1 N) matrices] will be denoted by vector transposed Eg (x 1 ; : : : ; x N ) = x T
ECON01 - Vector Differentiation Example 1 Let u : R L +! R be a utility function for consumption bundles that can be represented by points in R L + r is then the gradient of the utility function at consumption bundle x Ie r [D] T Vector function of a vector x x 1 x L g : R N! R M Ie g maps points from R N to points in R M Example Demand function x (p; w) which will later be referred to as a system of demand functions, maps a price vector and income/wealth level to a consumption bundle Denote x` (p; w) as the quantity of good ` demanded by a consumer facing an L-dimensional vector of prices p and who has wealth level w Ie x : R L+1 +! R L + and for each `, x` : R L+1 +! R + Example The gradient of the utility function from example 1, may be viewed as a function from R N into R N The vector function g : R N! R M may be viewed as M scalar functions: g m : R N! R, m = 1; : : : ; M From equation () we have Dg m (x) g m (x) ; : : : ; g m (x) x 1 x N thus we may view the derivative of g (x), evaluated at x = x, as the M stacked row vectors of partial derivatives for each g m (x) Thus we
ECON01 - Vector Differentiation have an M N matrix of partial derivatives: Dg (x) = x 1 g 1 (x) : : : x N g 1 (x) x 1 g M (x) : : : x N g M (x) Notice that if we took the derivative of g (x) at x wrt 0 1 0 1 holding B x x N C B A xed at rst two columns of Dg (x) D 0 p w D 0 x 1 x 1 A 1 A x (p; w) = g (x) = x x N () x1 x, C A, our derivative would then be the x 1 g 1 (x) x 1 g M (x) x g 1 (x) x g M (x) () Example (Example cont): For our system of demand functions x (p; w) p 1 x 1 (p; w) : : : p L x 1 (p; w) p 1 x L (p; w) : : : p L x L (p; w) x w 1 (p; w) x w L (p; w) = [D p x (p; w) D w (p; w)] () where D p x (p; w) is the L L matrix of price partial derivatives and D w x (p; w) is the L 1 matrix of wealth e ects Example (Example cont): r [D] T is a function from R L to R L The derivative of this function (ie the derivative
ECON01 - Vector Differentiation of the gradient of u) is called the Hessian of u H u r D [r] D x 1 u 1 (x) : : : x L u 1 (x) Applications x 1 u L (x) : : : x L u L (x) x 1 x 1 : : : x 1 x L x L x 1 : : : x L x L 1 Di erentiation of an Inner Product By equation () Dg (x) g (x) = p T x = `=1 p`x` g (x) ; : : : ; g (x) = (p 1 ; : : : ; p L ) x 1 x L Notice that the budget hyperplane, fx R L jp T x = wg, is the level set of the linear functon g (x) = p T x Thus the gradient of the budget hyperplane is the price vector p Euler s Theorem Applied to a Demand System x (p; w) x (p; w) for all p; w and > 0 () Di erentiating equation () wrt and evaluating at = 1, p = p and w = w, from equation () we obtain p [D p x (p; w) D w (p; w)] = 0 w
ECON01 - Vector Differentiation and multiplying out D p x (p; w) p + D w (p; w) w = 0 () To see this, let us focus on the demand for commodity 1 From () we have:- x 1 (p 1 ; p ; : : : ; p L ; w) x 1 (p; w) (8) When changes, each price changes and income changes in the LHS So we should expect (L + 1) partial derivatives appearing in our LHS expression for the e ect on the demand for commodity 1 from a change in Notice that the rate at which each price p` changes as changes is p n (ie (p`) = p`) and the rate at which the demand for commodity 1 changes as p` changes is x p` 1 (p; w) So the e ect on the quantity demanded of commodity 1 of a change in via its e ect on the price p` is x p` 1 (p; w) p` Similarly the e ect on the quantity demanded of commodity 1 from a change in via its e ect on wealth is x w 1 (p; w) w So di erentiating the LHS of equation (8) yields `=1 p` x 1 (p; w) p` + w x 1 (p; w) w and as does not appear on the RHS of equation (8), the derivative of the RHS wrt is simply 0 Stacking the L equations, one for each commodity, we obtain (), the result in matrix form Exercise 1 Using the de nitions for D p x (p; w) and D w (p; w), multiply out the matrices in () and check that you indeed obtain L equations of the form:- k=1 p k x` (p; w) p k + w x` (p; w) w = 0 (9)
ECON01 - Vector Differentiation De ne "`k p x` (p; w) k p k x` (p; w) as the price elasticity of demand for commodity ` wrt price p k ; and "`w w x` (p; w) w x` (p; w) as the wealth elasticity of demand for commodity ` Dividing equation (9) by x` (p; w) we obtain:- "`k + "`w = 0 (10) k=1 Ie the sum of the price elasticities of demand for commodity ` is equal to minus its wealth elasticity Di erentiating Walras Law 1 Di erentiating with respect to wealth p T x (p; w) w (11) If we di erentiate (11) wrt w and evaluate at p = p and w = w we obtain D w p T x (p; w) = p T D w x (p; w) = 1 or p` w x` (p; w) = 1 (1) `=1 Equation (1) is known as the Engel Aggregation If we let m` p` w x` (p; w) denote the marginal propensity spend on commodity `, then the Engel aggregation may be interpreted as saying (loosely):
ECON01 - Vector Differentiation The sum of the marginal propensities to spend out of a dollar on all commodities equals a dollar Di erentiating with respect to prices If we di erentiate (11) wrt p and evaluate at p = p and w = w we obtain D p p T x (p; w) = p T D p x (p; w) + [x (p; w)] T = 0 (1) Equation (1) is known as the Cournot Aggregation If we multiply out the matrices in (1) we obtain L equations fo the form:- p k x k (p; w) + x` (p; w) = 0 (1) p` k=1 In words it says that the sum of the rate of change on expenditure of all commodities for an increase in the price p` is equal to minus the quantity of commodity ` currently demanded That is, if p` rises, the rate at which wealth would have to rise to enable the consumer to purchase the original consumption bundle is x` (p; w) In other words the purchasing power of the consumer falls at the rate x` (p; w) as the price of that commodity rises