I have seen places where duality in optimization, such as in Linear Programming (Primal LP vs dual LP), is not really explained, but some "recipes" are given to write down a dual LP program, if given a primal LP program. But then somewhere else (both are wikipedia articles actually), a link with Lagrange multipliers is made. And now things are starting to make more sense in my brain. The dual variables are nothing but Lagrange multipliers!
But still, I would like to find a reference, preferably that I could find online for free, which is a concise explanation of duality from that Lagrange multipliers point of view.
On one hand, it seems like a not very deep fact, such a duality, yet, I am having issues understanding really how it works. Are primal LP programs and their dual LP programs nothing but analogues of Lagrangian and Hamiltonian formulations, and is duality essentially nothing but a Legendre transform? If true, then I would like to see it explained this way, if possible.
Edit: according to the article The concept of duality in convex analysis, and the characterization of the Legendre transform, by Shiri Artstein-Avidan and Vitali Milman, it does look like my intuition is basically correct.
Edit 2: I found the following helpful: some notes by David Knowles at Stanford on Lagrangian Duality.