Equi-marginal Principle

Hi the textbook i am studding from simply states that 'the rule for rational consumer behaviour is know as the equi-marginal principle. This states that a consumer will get the highest utility from a given level of in come when the ratio of the marginal utilities is equal to the ratio of prices'. I was hoping someone could maybe give me a bit more intuition behind this. Maybe it is self-explanatory... maybe not.

• Think about arbitrage. There's always a gain by allocating less on a consumption good of lower marginal utility and more on consumption good of higher marginal utility with the same small enough amount of resource concerned. – Metta World Peace May 1 '15 at 11:21

Suppose there are two goods $X$ and $Y$. A consumer has lots of $Y$ and very little $X$, and as a result his marginal utility of $Y$ is a lot lower than the marginal utility of $X$ (it helps here to think about a convex utility function such as $U=XY$). We could make him better off if we could convert some of those $Y$'s into $X$s (again, this follows from the convexity of utility, a standard assumption. Intuitively, people want more of everything but still prefer balanced consumption bundles to extremes). The question then becomes, "how many $X$s can we buy for each unit of $Y$ we give up?" The answer is that each $Y$ can buy $\frac{P_X}{P_Y}$ units of $X$.Thus, we convert $X$ into $Y$ until the slopes of the marginal utilities equals the price ratio, at which point additional conversion would result in a larger loss from less $Y$ than gain from more $X$.
A more general way of looking at this is through calculus. For a constrained function that is continuously differentiable, the slopes at any interior maxima and minima must be parallel to the slope of the constraint. In this case, the function is the utility function, $\frac{P_X}{P_Y}$ is the slope of the constraint.