Generally, if the price of something goes down, we buy more of it. This is down to two effects:
 Income effect: because it’s less expensive, we have more purchasing power because it is a smaller drain on our personal finances.
 Substitution effect: because it offers more utility per unit of money, other alternatives become less attractive.
What Eugen Slutsky managed to do was find an equation that decomposes this effect based on Hicksian and Marshallian demand curves.
Graphically:
Mathematically, it is based on the derivatives of Marshallian and Hickisan demands:
The left hand side of the equation is the total effect that is, the derivative of x (quantity) respect p (price). It shows us how much the total quantity of x that we consume varies when we change price. The next part is the substitution effect how much the variation is due to us finding similar options. It is obtained from the derivative of the Hicksian demand with regards price. The right hand side is the income effect, how much changes in our purchasing power affect the amount we consume of a certain good. It is the derivative of the Marshallian demand with regards wealth (multiplied by the quantity).
Whether the SE and the IE are positive or negative when prices rise depends on the type of good:
TE 
SE 
IE 

+ 
Substitute goods 
Substitute goods 
Inferior goods 
– 
Complementary goods 
Complementary goods 
Normal goods 
It is not always possible to tell what the total effect will be if we are talking about inferior complementary goods, for example, the SE and the IE pull in opposite directions. The TE will depend on which effect is stronger.
Video – Income and substitution effects: