<blockquote>
<p>Is there a reason for the different notations.</p>
</blockquote>
<p>Generally for your example the correct notation would be  <span class="math-container">$L(x,λ,θ)$</span>.</p>
<p><span class="math-container">$L(x,λ)$</span> could be used if you assume <span class="math-container">$\theta$</span> is held fixed at some variable and you want to examine how the solution changes. <span class="math-container">$L(x,θ)$</span> or <span class="math-container">$L(x)$</span> looks just like some sloppy/lazy notation. Perhaps there could be some reason for it in some situations where the context is provided, but in regard to problem you describe correct notation is  <span class="math-container">$L(x,λ,θ)$</span> since <span class="math-container">$x$</span>, <span class="math-container">$\lambda$</span> and <span class="math-container">$\theta$</span> are clearly variables.</p>
<blockquote>
<p>More generally, how do we know when to write a function explicitly as a function of its parameters and not just the choice variables.</p>
</blockquote>
<p>You do that when you want some explicit solution to a problem in terms of parameters. If you just want general solution regardless of parameters then you don't need to write it as a function of variables.</p>
<blockquote>
<p>In the Lagrangian is λ a choice variable or a parameter? (Surely it’s a variable as we can solve for the optimal level of λ) - in which case why is it some times common place to write L(x,θ)
, excluding the λ?</p>
</blockquote>
<p>Its neither. It is just a variable. A choice variable is a variable that can be set by agent in the model. <span class="math-container">$\lambda$</span> cannot be set by the agent so its not choice variable. However, it is not a parameter. <span class="math-container">$\lambda$</span> does not have fixed value and it can change.</p>

CC BY-SA 4.0
2023-02-07T22:34:30.337Z
Another great answer @1muflon1, all clear on this one. Thanks!
CormJack
CC BY-SA 4.0
2023-02-05T17:01:07.243Z
2023-02-05T17:01:07.243Z
1muflon1
<p>If you write <span class="math-container">$L(x,\theta,\lambda)$</span> this means that the unknowns of the lagrangian function that can be estimated are <span class="math-container">$x,\theta,\lambda$</span>. This implies that your first order conditions will be 3, i.e., partial derivative of the lagrangian w.r.t. each of the unknowns.</p>
<p>If you write <span class="math-container">$L(x,\lambda)$</span>, you are simply treating <span class="math-container">$\theta$</span> as exogenous.</p>
<p>Be careful, <span class="math-container">$\lambda$</span> is the lagrangian multiplier and has a specific interpretation: it tells you how the objective function evaluated at the optimum increases, when you marginally increase your constraint parameter, and your constraint parameter is <span class="math-container">$b$</span>. For a proper understanding about this point, I'd recommend you to study the kuhn tucker conditions which apply to your problem.</p>

CC BY-SA 4.0
2023-02-07T13:36:21.443Z
Hi @Tony, thanks again for commenting here, I actually have a whole separate post on the KKT conditions, I would love your thoughts on that as well. Is it common for variables that are exogenous to be left out of functions in general or just the Lagrangian? For example I've often see the lagrangian be written as a function of the constraint, even though we don't take the derivative with respect to the constraint.
CormJack
CC BY-SA 4.0
2023-02-07T13:39:49.887Z
Here is the separate post on KKT if you are interested, thanks! https://math.stackexchange.com/questions/4607590/necessary-and-sufficient-conditions-for-lagrange-optimisation
CormJack
CC BY-SA 4.0
2023-02-05T21:39:15.347Z
2023-02-05T21:39:15.347Z
Tony
<p>I understand the role of Lagrangian in constrained optimisation, and that we could conceptualise it as for example, a penalty function.</p>
<p>What I don’t understand is the notation, and perhaps any deeper intuition behind the notation. let’s say we have the problem:</p>
<p><span class="math-container">$F(x,θ) s.t. G(x,θ) ≤ b$</span></p>
<p>Why is the Lagrangian sometimes written in these different ways:</p>
<ul>
<li><span class="math-container">$L(x, λ)$</span> rather than <span class="math-container">$L(x, λ, θ)$</span></li>
<li>I believe sometimes I’ve even seen it just as <span class="math-container">$L(x, θ)$</span> or even <span class="math-container">$L(x)$</span></li>
</ul>
<p><strong>Questions</strong>:</p>
<ol>
<li>Is there a reason for the different notations.</li>
<li>More generally, how do we know when to write a function explicitly as a function of its parameters and not just the choice variables.</li>
<li>In the Lagrangian is λ a choice variable or a parameter? (Surely it’s a variable as we can solve for the optimal level of λ) - in which case why is it some times common place to write <span class="math-container">$L(x, θ)$</span>, excluding the λ?</li>
</ol>

<optimization><lagrangian>
What is the Lagrangian a function of?
CormJack
# What is the Lagrangian a function of?

(Asked by: username_0 on 2023-02-05)

I understand the role of Lagrangian in constrained optimisation, and that we could conceptualise it as for example, a penalty function.

What I don’t understand is the notation, and perhaps any deeper intuition behind the notation. let’s say we have the problem:

$F(x,θ) s.t. G(x,θ) ≤ b$

Why is the Lagrangian sometimes written in these different ways:

* $L(x, λ)$ rather than $L(x, λ, θ)$
* I believe sometimes I’ve even seen it just as $L(x, θ)$ or even $L(x)$

**Questions**:

1. Is there a reason for the different notations.
2. More generally, how do we know when to write a function explicitly as a function of its parameters and not just the choice variables.
3. In the Lagrangian is λ a choice variable or a parameter? (Surely it’s a variable as we can solve for the optimal level of λ) - in which case why is it some times common place to write $L(x, θ)$, excluding the λ?

**Tags:** optimization, lagrangian

---

## 2 answers

### Answer by username_1 on 2023-02-05. Score: 1 | Accepted answer

> Is there a reason for the different notations.

Generally for your example the correct notation would be $L(x,λ,θ)$.

$L(x,λ)$ could be used if you assume $\theta$ is held fixed at some variable and you want to examine how the solution changes. $L(x,θ)$ or $L(x)$ looks just like some sloppy/lazy notation. Perhaps there could be some reason for it in some situations where the context is provided, but in regard to problem you describe correct notation is $L(x,λ,θ)$ since $x$, $\lambda$ and $\theta$ are clearly variables.

> More generally, how do we know when to write a function explicitly as a function of its parameters and not just the choice variables.

You do that when you want some explicit solution to a problem in terms of parameters. If you just want general solution regardless of parameters then you don't need to write it as a function of variables.

> In the Lagrangian is λ a choice variable or a parameter? (Surely it’s a variable as we can solve for the optimal level of λ) - in which case why is it some times common place to write L(x,θ)
> , excluding the λ?

Its neither. It is just a variable. A choice variable is a variable that can be set by agent in the model. $\lambda$ cannot be set by the agent so its not choice variable. However, it is not a parameter. $\lambda$ does not have fixed value and it can change.

> **Comments:**
> **username_0**: Another great answer @1muflon1, all clear on this one. Thanks!  

---

### Answer by username_2 on 2023-02-05. Score: 2

If you write $L(x,\theta,\lambda)$ this means that the unknowns of the lagrangian function that can be estimated are $x,\theta,\lambda$. This implies that your first order conditions will be 3, i.e., partial derivative of the lagrangian w.r.t. each of the unknowns.

If you write $L(x,\lambda)$, you are simply treating $\theta$ as exogenous.

Be careful, $\lambda$ is the lagrangian multiplier and has a specific interpretation: it tells you how the objective function evaluated at the optimum increases, when you marginally increase your constraint parameter, and your constraint parameter is $b$. For a proper understanding about this point, I'd recommend you to study the kuhn tucker conditions which apply to your problem.

> **Comments:**
> **username_0**: Hi @Tony, thanks again for commenting here, I actually have a whole separate post on the KKT conditions, I would love your thoughts on that as well. Is it common for variables that are exogenous to be left out of functions in general or just the Lagrangian? For example I've often see the lagrangian be written as a function of the constraint, even though we don't take the derivative with respect to the constraint.  
> **username_0**: Here is the separate post on KKT if you are interested, thanks! https://math.stackexchange.com/questions/4607590/necessary-and-sufficient-conditions-for-lagrange-optimisation  

---

