# Marginal rate of substitution

In economics, the marginal rate of substitution (MRS) is the rate at which a consumer can give up some amount of one good in exchange for another good while maintaining the same level of utility. At equilibrium consumption levels (assuming no externalities), marginal rates of substitution are identical. The marginal rate of substitution is one of the three factors from marginal productivity, the others being marginal rates of transformation and marginal productivity of a factor.

## As the slope of indifference curve

Under the standard assumption of neoclassical economics that goods and services are continuously divisible, the marginal rates of substitution will be the same regardless of the direction of exchange, and will correspond to the slope of an indifference curve (more precisely, to the slope multiplied by −1) passing through the consumption bundle in question, at that point: mathematically, it is the implicit derivative. MRS of X for Y is the amount of Y which a consumer can exchange for one unit of X locally. The MRS is different at each point along the indifference curve thus it is important to keep locus in the definition. Further on this assumption, or otherwise on the assumption that utility is quantified, the marginal rate of substitution of good or service X for good or service Y (MRS$_{xy}$) is also equivalent to the marginal utility of X over the marginal utility of Y. Formally,
    $MRS_{xy}=-m_{\mathrm {indif} }=-(dy/dx)\,$
    $MRS_{xy}=MU_{x}/MU_{y}\,$
It is important to note that when comparing bundles of goods X and Y that give a constant utility (points along an indifference curve), the marginal utility of X is measured in terms of units of Y that is being given up.
For example, if the MRS$_{xy}$ = 2, the consumer will give up 2 units of Y to obtain 1 additional unit of X.
As one moves down a (standardly convex) indifference curve, the marginal rate of substitution decreases (as measured by the absolute value of the slope of the indifference curve, which decreases). This is known as the law of diminishing marginal rate of substitution.
Since the indifference curve is convex with respect to the origin and we have defined the MRS as the negative slope of the indifference curve,
    $\ MRS_{xy}\geq 0$

## Simple mathematical analysis

Assume the consumer utility function is defined by $U(x,y)$, where U is consumer utility, x and y are goods. Then the marginal rate of substitution can be computed via partial differentiation, as follows.
Also, note that:
    $\ MU_{x}=\partial U/\partial x$
    $\ MU_{y}=\partial U/\partial y$
where $\ MU_{x}$ is the marginal utility with respect to good x and $\ MU_{y}$ is the marginal utility with respect to good y.
By taking the total differential of the utility function equation, we obtain the following results:
    $\ dU=(\partial U/\partial x)dx+(\partial U/\partial y)dy$, or substituting from above,
    $\ dU=MU_{x}dx+MU_{y}dy$, or, without loss of generality, the total derivative of the utility function with respect to good x,
    ${\frac {dU}{dx}}=MU_{x}{\frac {dx}{dx}}+MU_{y}{\frac {dy}{dx}}$, that is,
    ${\frac {dU}{dx}}=MU_{x}+MU_{y}{\frac {dy}{dx}}$.
Through any point on the indifference curve, dU/dx = 0, because U = c, where c is a constant. It follows from the above equation that:
       $0=MU_{x}+MU_{y}{\frac {dy}{dx}}$, or rearranging
    $-{\frac {dy}{dx}}={\frac {MU_{x}}{MU_{y}}}$
The marginal rate of substitution is defined as the absolute value of the slope of the indifference curve at whichever commodity bundle quantities are of interest. That turns out to equal the ratio of the marginal utilities:
    $\ MRS_{xy}=MU_{x}/MU_{y}\,$.
When consumers maximize utility with respect to a budget constraint, the indifference curve is tangent to the budget line, therefore, with m representing slope:
    $\ m_{\mathrm {indif} }=m_{\mathrm {budget} }$
    $\ -(MRS_{xy})=-(P_{x}/P_{y})$
    $\ MRS_{xy}=P_{x}/P_{y}$
Therefore, when the consumer is choosing his utility maximized market basket on his budget line,
    $\ MU_{x}/MU_{y}=P_{x}/P_{y}$
    $\ MU_{x}/P_{x}=MU_{y}/P_{y}$
This important result tells us that utility is maximized when the consumer's budget is allocated so that the marginal utility per unit of money spent is equal for each good. If this equality did not hold, the consumer could increase his/her utility by cutting spending on the good with lower marginal utility per unit of money and increase spending on the other good. To decrease the marginal rate of substitution, the consumer must buy more of the good for which he/she wishes the marginal utility to fall for (due to the law of diminishing marginal utility).

## Diminishing Marginal rate of Substitution

An important principle of economic theory is that marginal rate of substitution of X for Y diminishes as more and more of good X is substituted for good Y. In other words, as the consumer has more and more of good X, he is prepared to forego less and less of good Y.
It means that as the consumer's stock of X increases and his stock of Y decreases, he is willing to forego less and less of Y for a given increment in X. In other words, the marginal rate of substitution of X for Y falls as the consumer has more of X and less of Y. That the marginal rate of substitution of X for Y diminishes can also be known from drawing tangents at different points on an indifference curve.

## Using MRS to determine Convexity

When analyzing the utility function of consumer's in terms of determining if they are convex or not. For the horizon of two goods we can apply a quick derivative test (take the derivative of MRS) to determine if our consumer's preferences are convex. If the derivative of MRS is negative the utility curve would be concave down meaning that it has a maximum and then decreases on either side of the maximum. This utility curve may have an appearance similar to that of a lower case n. If the derivative of MRS is equal to 0 the utility curve would be linear, the slope would stay constant throughout the utility curve. If the derivative of MRS is positive the utility curve would be convex up meaning that it has a minimum and then increases on either side of the minimum. This utility curve may have an appearance similar to that of a u. These statements are shown mathematically below.
    $\ {\frac {dMRS_{xy}}{dx}}<0{\text{ Non Convexity of Utility Function}}$
    $\ {\frac {dMRS_{xy}}{dx}}=0{\text{ Weak Convexity of Utility Function}}$
    $\ {\frac {dMRS_{xy}}{dx}}>0{\text{ Strict Convexity of Utility Function}}$
For more than two variables, the use of the Hessian matrix is required.