Principles of Economics/Budget Compensation
Increase in price of good 1
In this case an increase in the price of good 1 (along x axis) shifts the budget curve (black) inward. One can no longer obtain as high an indifference curve (blue) as before; the new indifference curve is closer to the origin and entails a lower utility than the original.
We can draw a compensated budget, compensating one for the increase in the price of a good by increasing their money overall. However, such a double change will lead to a shift in the way the consumer allocates resources between the two goods. The compensated budget curve (which looks like a line), pink in the graph, has the same slope as the new budget curve but has an optimal point on the original indifference curve (just like the original budget). This new compensated budget allows a consumer to attain exactly the same level of utility despite the fact that the price of a good has increased.
Income and substitution effects
The key position of the compensated budget is the position of resource (money) apportionment that a consumer would make, here labeled with the purple point. The compensated budget offers effectively the same income as the original budget (because it is compensated and the same utility as before is reachable). Therefore, any change in the allotment of what goods a consumer wants to buy, going from the original point to the compensated point, must come entirely from the substitution effect.
Because any shift from original to new budget must result from the combined effect of substitution and income effect, the remainder of the shift is attributable to the income effect. Alternatively, the shift from the purple point to the left blue point (final budget optimal point) involves no change in resource apportionment ratios because the new and compensated budget curves have the same slope (a unit of good 1 is worth the same multiple as much as a unit of good 2). Hence we come to the same conclusion.
If the final blue point is to the left of the purple point, the two effects are acting in harmony and the good along the x axis is considered a normal good.
For this consumer, the indifference curves look significantly different. The compensatory budget is still placed in the same location. The main difference is that now the new optimal allocation with the new budget - the lower blue point - is to the right of the purple point.
Contradicting effects part 2
The purple substitution effect does not change because the first blue point and purple point remain in the same positions. However, the blue income effect now goes counter to the substitution effect (though it is still smaller than the substitution effect). In other words, the two effects are acting in opposite directions.
If the final blue point is to the right of the purple point but to the left of the initial blue point, the two effects are acting in opposite directions, the substitution effect is stronger, and the good along the x axis is considered an inferior good.
If the final blue point is to the right of the initial blue point, the two effects are acting in opposite directions, the income effect is stronger, and the good along the x axis is considered a giffen good. A giffen good is one where a consumer buys more of it when the price increases - very, very rare but possible in certain very limited cases (often involving poverty).