<p>The Lagrange multiplier provides the &quot;shadow price&quot; of the constraint.</p>
<p>In the case where the Lagrangian takes the form:
<span class="math-container">$$
L = f(x,y) - \lambda(g(x,y) - c),
$$</span>
then <span class="math-container">$\lambda$</span> measures the marginal change in the optimal value when <span class="math-container">$c$</span> increases by 1 unit. Note that we can rewrite:
<span class="math-container">$$
L = f(x,y) - \lambda g(x,y) + \lambda c.
$$</span></p>
<p>In the case where the Lagrangian takes the form:
<span class="math-container">$$
L = f(x,y) + \lambda(g(x,y) - c),
$$</span>
The Lagrange multiplier simply switches sign. In this case <span class="math-container">$\lambda$</span> is the negative of the shadow price. Note that we can now rewrite:
<span class="math-container">$$
L = f(x,y) + \lambda g(x,y) - \lambda c.
$$</span>
When I write down the Lagrangian, I simply make sure <span class="math-container">$\lambda$</span> is multiplied by <span class="math-container">$c$</span> (and not <span class="math-container">$-c$</span>).</p>
<p>Note that in problems with equality constraints, shadow prices might be positive or negative depending on whether increasing <span class="math-container">$c$</span> increases or decreased the optimal value of the optimization problem. As such, there is no ex-ante restriction on its sign (safe from intuition). If you have inequality constraints (and Kuhn-Tucker conditions) the signs of the Lagrange multipliers are usually determined.</p>

CC BY-SA 4.0
2024-04-29T11:01:08.707Z
Dear tdm, c can increase not only in 1 unit
marco tognoli
CC BY-SA 4.0
2024-04-29T11:19:31.760Z
If Lagrange Theorem holds we have $\Delta f = \lambda _1 \cdot \epsilon _1+ \lambda _2 \cdot \epsilon _2+ \cdots + \lambda _m \cdot \epsilon _m$ so $\Delta f=\lambda _1+ \lambda _2 + \dots + \lambda _m $ whenever $\epsilon _j = 1$ with $\epsilon _j = \Delta c_j$
marco tognoli
CC BY-SA 4.0
2024-04-29T06:01:57.493Z
2024-04-29T06:01:57.493Z
tdm
<p>Let
<span class="math-container">$\mathbf x \in \mathbb{R^n} \quad \mathbf x= (x_1 , x_2 , \cdots , x_n ) $</span>
<span class="math-container">$A$</span>, <span class="math-container">$B$</span>  <span class="math-container">$m$</span>x<span class="math-container">$n$</span> matrix, <span class="math-container">$\mathbf b \in \mathbb{R^m}$</span>, <span class="math-container">$\mathbf c \in \mathbb{R^m}$</span>.
Let indicate with <span class="math-container">$&lt; . , . &gt;$</span> the <em>dot product</em> and with <span class="math-container">$\lambda= (\lambda_1 , \lambda_2 , \cdots , \lambda_m ) $</span>, <span class="math-container">$\eta= (\eta_1 , \eta_2 , \cdots , \eta_m ) $</span>  the <em>Lagrange multipliers</em>.</p>
<p><strong>First case: min</strong></p>
<p><span class="math-container">$\min_{x\in \mathit{ \Omega }} f(\mathbf x) $</span></p>
<p><span class="math-container">$ \Omega$</span> defined by</p>
<p><span class="math-container">$ \left\{ \begin{array}{l}
\begin{matrix} A \cdot \mathbf x \ge \mathbf b \end{matrix} \\
\begin{matrix} B \cdot \mathbf x \le \mathbf c \end{matrix} \\
\mathbf x \ge \mathbf 0 \\
\end{array} \right.$</span></p>
<p><em>Lagrangian function</em>
<span class="math-container">$\mathcal{L}(\mathbf x, \lambda, \eta)= f(\mathbf x) - &lt; \lambda, A \cdot \mathbf x - \mathbf b &gt; +  &lt; \eta , B \cdot \mathbf x - \mathbf c &gt;$</span></p>
<p><strong>Second case: max</strong></p>
<p><span class="math-container">$\max_{x\in \mathit{ \Omega }} f(\mathbf x) $</span></p>
<p><span class="math-container">$ \Omega$</span> defined by</p>
<p><span class="math-container">$ \left\{ \begin{array}{l}
\begin{matrix} A \cdot \mathbf x \le \mathbf b \end{matrix} \\
\begin{matrix} B \cdot \mathbf x \ge \mathbf c \end{matrix} \\
\mathbf x \ge \mathbf 0 \\
\end{array} \right.$</span></p>
<p><em>Lagrangian function</em>
<span class="math-container">$\mathcal{L}(\mathbf x, \lambda, \eta)= f(\mathbf x) - &lt; \lambda, A \cdot \mathbf x - \mathbf b &gt; +  &lt; \eta , B \cdot \mathbf x - \mathbf c &gt;$</span></p>
<p><em>Example</em></p>
<p><span class="math-container">$\max_{x\in \mathit{ \Omega }} f(\mathbf x) $</span>; <span class="math-container">$ \Omega$</span> defined by: <span class="math-container">$&lt;\mathbf a_1^t,\mathbf x&gt;=b_1$</span></p>
<p><em>Lagrangian function</em>:</p>
<p><span class="math-container">$\mathcal{L}(\mathbf x, \lambda_1)= f(\mathbf x)+&lt; \lambda_1, b_1 - \mathbf a^t_1 \cdot \mathbf x &gt;$</span></p>

CC BY-SA 4.0
2024-04-29T06:04:16.007Z
2024-04-29T06:04:16.007Z
marco tognoli
<p>It seems that in many applications there may be some economic interpretation for the Lagrange multiplier and thus it might be beneficial to ensure it's value takes on a specific sign.</p>
<p>If the above is intended, then clearly the choice of sign for the multiplier in the Lagrangian should correspond to a choice of subtracting either the LHS or RHS in the constraint.</p>
<p>As an example, say we have an agent <span class="math-container">$i$</span> with quasilinear utility over two goods, <span class="math-container">$(c_1, c_2)$</span> who solves
<span class="math-container">\begin{align*}
&amp;\max_{c_{i1}, c_{i2}} u_i(c_{i1}) + \beta c_{i2} \\
&amp;\text{s.t.} \\
p_1c_{i1} + c_{i2} = &amp;a_i
\end{align*}</span></p>
<p>The typically constructed Lagrangian would then be
<span class="math-container">\begin{align*}
\mathcal{L} = u_i(c_{i1}) + \beta c_{i2} + \lambda_i(a_i - p_1 c_{i1} - c_{i2})
\end{align*}</span></p>
<p>Now we could also write this as
<span class="math-container">\begin{align*}
\mathcal{L} = u_i(c_{i1}) + \beta c_{i2} - \lambda_i(p_1 c_{i1} + c_{i2} - a_i)
\end{align*}</span></p>
<p>and the signs in our first order conditions would be unchanged, that is
<span class="math-container">\begin{align*}
c_{i1}:&amp; u_{i, c}(c_{i1}) = \lambda_i p_1 \\
c_{i2}:&amp; \beta = \lambda_i
\end{align*}</span></p>
<p>Now say we chose one of the following constructions
<span class="math-container">\begin{align*}
\mathcal{L} = u_i(c_{i1}) + \beta c_{i2} - \lambda_i(a_i - p_1 c_{i1} - c_{i2}) \\
\mathcal{L} = u_i(c_{i1}) + \beta c_{i2} + \lambda_i(p_1 c_{i1} + c_{i2} - a_i)
\end{align*}</span></p>
<p>which gives us first order conditions
<span class="math-container">\begin{align*}
c_{i1}:&amp; u_{i, c}(c_{i1}) = -\lambda_i p_1 \\
c_{i2}:&amp; \beta = -\lambda_i
\end{align*}</span></p>
<p>It seems the only difference here would be that <span class="math-container">$\lambda_i$</span> would take a negative value, given <span class="math-container">$\beta$</span> should be positive.</p>
<p>I guess my question is: how should we think about both our choice of signs for the Lagrange multiplier (i.e. whether we add or subtract the multiplier) in tandem with our construction of the constraint (i.e. whether we subtract the LHS or RHS from both sides of the constraint equation)? In the context of budget constraints I've seen the multiplier defined as a &quot;shadow price&quot;, which to me would imply we desire a positive value for <span class="math-container">$\lambda_i$</span>. So then how do we ensure this will play out when we initially construct the Lagrangian? Is it something like:</p>
<p>&quot;If <span class="math-container">$f(x, y)$</span> is our objective function and <span class="math-container">$g(x, y) = c$</span> is our constraint, then the Lagrangian is either of form <span class="math-container">$\mathcal{L} = f(x, y) - \lambda(g(x, y) - c)$</span> or <span class="math-container">$\mathcal{L} = f(x, y) + \lambda(c - g(x, y))$</span>&quot; and that's it?</p>

CC BY-SA 4.0
2024-04-29T10:59:51.437Z
Dear hilard28, that Is all!
marco tognoli
<macroeconomics><mathematical-economics><utility><optimization><lagrangian>
Intuition of sign used for Lagrange multiplier and corresponding constraint function in constrained optimization
hillard28
# Intuition of sign used for Lagrange multiplier and corresponding constraint function in constrained optimization

(Asked by: username_0 on 2024-04-28)

It seems that in many applications there may be some economic interpretation for the Lagrange multiplier and thus it might be beneficial to ensure it's value takes on a specific sign.

If the above is intended, then clearly the choice of sign for the multiplier in the Lagrangian should correspond to a choice of subtracting either the LHS or RHS in the constraint.

As an example, say we have an agent $i$ with quasilinear utility over two goods, $(c\_1, c\_2)$ who solves
\begin{align\*}
&\max\_{c\_{i1}, c\_{i2}} u\_i(c\_{i1}) + \beta c\_{i2} \\
&\text{s.t.} \\
p\_1c\_{i1} + c\_{i2} = &a\_i
\end{align\*}

The typically constructed Lagrangian would then be
\begin{align\*}
\mathcal{L} = u\_i(c\_{i1}) + \beta c\_{i2} + \lambda\_i(a\_i - p\_1 c\_{i1} - c\_{i2})
\end{align\*}

Now we could also write this as
\begin{align\*}
\mathcal{L} = u\_i(c\_{i1}) + \beta c\_{i2} - \lambda\_i(p\_1 c\_{i1} + c\_{i2} - a\_i)
\end{align\*}

and the signs in our first order conditions would be unchanged, that is
\begin{align\*}
c\_{i1}:& u\_{i, c}(c\_{i1}) = \lambda\_i p\_1 \\
c\_{i2}:& \beta = \lambda\_i
\end{align\*}

Now say we chose one of the following constructions
\begin{align\*}
\mathcal{L} = u\_i(c\_{i1}) + \beta c\_{i2} - \lambda\_i(a\_i - p\_1 c\_{i1} - c\_{i2}) \\
\mathcal{L} = u\_i(c\_{i1}) + \beta c\_{i2} + \lambda\_i(p\_1 c\_{i1} + c\_{i2} - a\_i)
\end{align\*}

which gives us first order conditions
\begin{align\*}
c\_{i1}:& u\_{i, c}(c\_{i1}) = -\lambda\_i p\_1 \\
c\_{i2}:& \beta = -\lambda\_i
\end{align\*}

It seems the only difference here would be that $\lambda\_i$ would take a negative value, given $\beta$ should be positive.

I guess my question is: how should we think about both our choice of signs for the Lagrange multiplier (i.e. whether we add or subtract the multiplier) in tandem with our construction of the constraint (i.e. whether we subtract the LHS or RHS from both sides of the constraint equation)? In the context of budget constraints I've seen the multiplier defined as a "shadow price", which to me would imply we desire a positive value for $\lambda\_i$. So then how do we ensure this will play out when we initially construct the Lagrangian? Is it something like:

"If $f(x, y)$ is our objective function and $g(x, y) = c$ is our constraint, then the Lagrangian is either of form $\mathcal{L} = f(x, y) - \lambda(g(x, y) - c)$ or $\mathcal{L} = f(x, y) + \lambda(c - g(x, y))$" and that's it?

**Tags:** macroeconomics, mathematical-economics, utility, optimization, lagrangian
> **Comments:**
> **username_1**: Dear hilard28, that Is all!  

---

## 2 answers

### Answer by username_2 on 2024-04-29. Score: 1 | Accepted answer

The Lagrange multiplier provides the "shadow price" of the constraint.

In the case where the Lagrangian takes the form:
$$
L = f(x,y) - \lambda(g(x,y) - c),
$$
then $\lambda$ measures the marginal change in the optimal value when $c$ increases by 1 unit. Note that we can rewrite:
$$
L = f(x,y) - \lambda g(x,y) + \lambda c.
$$

In the case where the Lagrangian takes the form:
$$
L = f(x,y) + \lambda(g(x,y) - c),
$$
The Lagrange multiplier simply switches sign. In this case $\lambda$ is the negative of the shadow price. Note that we can now rewrite:
$$
L = f(x,y) + \lambda g(x,y) - \lambda c.
$$
When I write down the Lagrangian, I simply make sure $\lambda$ is multiplied by $c$ (and not $-c$).

Note that in problems with equality constraints, shadow prices might be positive or negative depending on whether increasing $c$ increases or decreased the optimal value of the optimization problem. As such, there is no ex-ante restriction on its sign (safe from intuition). If you have inequality constraints (and Kuhn-Tucker conditions) the signs of the Lagrange multipliers are usually determined.

> **Comments:**
> **username_1**: Dear tdm, c can increase not only in 1 unit  
> **username_1**: If Lagrange Theorem holds we have $\Delta f = \lambda _1 \cdot \epsilon _1+ \lambda _2 \cdot \epsilon _2+ \cdots + \lambda _m \cdot \epsilon _m$ so $\Delta f=\lambda _1+ \lambda _2 + \dots + \lambda _m $ whenever $\epsilon _j = 1$ with $\epsilon _j = \Delta c_j$  

---

### Answer by username_1 on 2024-04-29. Score: 1

Let
$\mathbf x \in \mathbb{R^n} \quad \mathbf x= (x\_1 , x\_2 , \cdots , x\_n ) $
$A$, $B$ $m$x$n$ matrix, $\mathbf b \in \mathbb{R^m}$, $\mathbf c \in \mathbb{R^m}$.
Let indicate with $< . , . >$ the *dot product* and with $\lambda= (\lambda\_1 , \lambda\_2 , \cdots , \lambda\_m ) $, $\eta= (\eta\_1 , \eta\_2 , \cdots , \eta\_m ) $ the *Lagrange multipliers*.

**First case: min**

$\min\_{x\in \mathit{ \Omega }} f(\mathbf x) $

$ \Omega$ defined by

$ \left\{ \begin{array}{l}
\begin{matrix} A \cdot \mathbf x \ge \mathbf b \end{matrix} \\
\begin{matrix} B \cdot \mathbf x \le \mathbf c \end{matrix} \\
\mathbf x \ge \mathbf 0 \\
\end{array} \right.$

*Lagrangian function*
$\mathcal{L}(\mathbf x, \lambda, \eta)= f(\mathbf x) - < \lambda, A \cdot \mathbf x - \mathbf b > + < \eta , B \cdot \mathbf x - \mathbf c >$

**Second case: max**

$\max\_{x\in \mathit{ \Omega }} f(\mathbf x) $

$ \Omega$ defined by

$ \left\{ \begin{array}{l}
\begin{matrix} A \cdot \mathbf x \le \mathbf b \end{matrix} \\
\begin{matrix} B \cdot \mathbf x \ge \mathbf c \end{matrix} \\
\mathbf x \ge \mathbf 0 \\
\end{array} \right.$

*Lagrangian function*
$\mathcal{L}(\mathbf x, \lambda, \eta)= f(\mathbf x) - < \lambda, A \cdot \mathbf x - \mathbf b > + < \eta , B \cdot \mathbf x - \mathbf c >$

*Example*

$\max\_{x\in \mathit{ \Omega }} f(\mathbf x) $; $ \Omega$ defined by: $<\mathbf a\_1^t,\mathbf x>=b\_1$

*Lagrangian function*:

$\mathcal{L}(\mathbf x, \lambda\_1)= f(\mathbf x)+< \lambda\_1, b\_1 - \mathbf a^t\_1 \cdot \mathbf x >$


---

