Slutsky equation

The Slutsky equation (or Slutsky identity) in economics, named after Eugen Slutsky, relates changes in Marshallian (uncompensated) demand to changes in Hicksian (compensated) demand, which is known as such since it compensates to maintain a fixed level of utility. 
There are two parts of the Slutsky equation, namely the substitution effect, and income effect. 
In general, the substitution effect can be negative for consumers as it can limit choices. He designed this formula to explore a consumer's response as the price changes. When the price increases, the budget set moves inward, which also causes the quantity demanded to decrease. In contrast, when the price decreases, the budget set moves outward, which leads to an increase in the quantity demanded. The substitution effect is due to the effect of the relative price change while the income effect is due to the effect of income being freed up. The equation demonstrates that the change in the demand for a good, caused by a price change, is the result of two effects:
The Slutsky equation decomposes the change in demand for good "i" in response to a change in the price of good "j":
where formula_2 is the Hicksian demand and formula_3 is the Marshallian demand, at the vector of price levels formula_4, wealth level (or, alternatively, income level) formula_5, and fixed utility level formula_6 given by maximizing utility at the original price and income, formally given by the indirect utility function formula_7. The right-hand side of the equation is equal to the change in demand for good "i" holding utility fixed at "u" minus the quantity of good "j" demanded, multiplied by the change in demand for good "i" when wealth changes.
The first term on the right-hand side represents the substitution effect, and the second term represents the income effect. Note that since utility is not observable, the substitution effect is not directly observable, but it can be calculated by reference to the other two terms in the Slutsky equation, which are observable. This process is sometimes known as the Hicks decomposition of a demand change.
The equation can be rewritten in terms of elasticity:
where εp is the (uncompensated) price elasticity, εph is the compensated price elasticity, εw,i the income elasticity of good i, and bj the budget share of good j.
Overall, in simple words, the Slutsky equation states the total change in demand comprises of an income effect and a substitution effect and both effects collectively must equal the total change in demand. 
The equation above is helpful as it represents the fluctuation in demand are indicative of different types of good. The substitution effect will always turn out negative as indifference curves are always downward sloping. However, the same does not apply to income effect as it depends on how consumption of a good changes with income. 
The income effect on a normal goods is negative, and if the price decreases, consequently purchasing power or income goes up. The reverse holds when price increases and purchasing power or income decreases, as a result of, so does demand.
Generally, not all goods are "normal". While in an economic sense, some are inferior. However, that does not equate quality-wise that they are poor rather that it sets a negative income profile - as income increases, consumers consumption of the good decreases.
For example, consumers who are running low of money for food purchase instant noodles, however, the product is not generally held as something people would normally consume on a daily basis. This is due to the constrains in terms of money; as wealth increases, consumption decreases. In this case, the substitution effect is negative, but the income effect is also negative.
In any case the substitution effect or income effect are positive or negative when prices increase depends on the type of goods:
However, whether the total effect will always be negative is impossible to tell if inferior complementary goods are mentioned. For instance, the substitution effect and the income effect pull in opposite directions. The total effect will depend on which effect is ultimately stronger. 
Derivation.
While there are several ways to derive the Slutsky equation, the following method is likely the simplest. Begin by noting the identity formula_10 where formula_11 is the expenditure function, and "u" is the utility obtained by maximizing utility given p and "w". Totally differentiating with respect to "pj" yields as the following:
Making use of the fact that formula_13 by Shephard's lemma and that at optimum,
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 formula_5 generates Marshallian demand for goods 1 and 2 of formula_17 and formula_18
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 formula_21 in quantity demanded when formula_22 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 (formula_23), 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 formula_25 is utility. The derivative is
so since the Cobb-Douglas indirect utility function is formula_27 and formula_28 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 formula_30 rises, the Marshallian quantity demanded of good 1, formula_31 is unaffected (formula_32), but that is wrong. Again rearranging the Slutsky equation, the cross-price substitution effect is: 
This says that when formula_30 rises, there is a substitution effect of formula_35 towards good 1. At the same time, the rise in formula_30 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 formula_38 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 matrix form is: 
Although strictly speaking the Slutsky equation only applies to infinitesimal changes in prices, it is standardly used a linear approximation for finite changes. If the prices of the two goods change by formula_40 and formula_41, the effect on the demands for the two goods are:
Multiplying out the matrices, the effect on good 1, for example, would be 
The first term is the substitution effect. The second term is the income effect, composed of the consumer's response to income loss times the size of the income loss from each price's increase.
Giffen goods.
A Giffen good is a product that is in greater demand when the price increases, which are also special cases of inferior goods. In the extreme case of income inferiority, the size of income effect overpowered the size of the substitution effect, leading to a positive overall change in demand responding to an increase in the price. Slutsky's decomposition of the change in demand into a pure substitution effect and income effect explains why the law of demand doesn't hold for Giffen goods.
References.
Varian, H. R. (2020). Intermediate microeconomics : a modern approach (Ninth edition.). W.W. Norton & Company.