Totally differentiating with respect to pj yields as the following: . Making use of the fact that by Shephard's lemma and that at optimum, where is the indirect utility function, one can substitute and rewrite the derivation above as the Slutsky equation. Example A Cobb-Douglas utility function (see Cobb-Douglas production function) with two goods and income generates Marshallian demand for goods 1 and 2 of and Rearrange the Slutsky equation to put the Hicksian derivative on the left-hand-side yields the substitution effect: Going back to the original Slutsky equation shows how the substitution and income effects add up to give the total effect of the price rise on quantity demanded: Thus, of the total decline of in quantity demanded when rises, 21/70 is from the substitution effect and 49/70 from the income effect. Good 1 is the good this consumer spends most of his income on (), which is why the income effect is so large. One can check that the answer from the Slutsky equation is the same as from directly differentiating the Hicksian demand function, which here is where is utility. The derivative is so since the Cobb-Douglas indirect utility function is and when the consumer uses the specified demand functions, the derivative is: which is indeed the Slutsky equation's answer. The Slutsky equation also can be applied to compute the cross-price substitution effect. One might think it was zero here because when rises, the Marshallian quantity demanded of good 1, is unaffected (), but that is wrong. Again rearranging the Slutsky equation, the cross-price substitution effect is: This says that when rises, there is a substitution effect of towards good 1. At the same time, the rise in has a negative income effect on good 1's demand, an opposite effect of the exact same size as the substitution effect, so the net effect is zero. This is a special property of the Cobb-Douglas function. Changes in Multiple Prices at Once: The Slutsky Matrix The same equation can be rewritten in matrix form to allow multiple price changes at once: where Dp is the derivative operator with respect to price and Dw is the derivative operator with respect to wealth. The matrix is known as the Slutsky matrix, and given sufficient smoothness conditions on the utility function, it is symmetric, negative semidefinite, and the Hessian of the expenditure function. When there are two goods, the Slutsky equation in