skip to content
← Scientific Spaces English

Solving Equality-Constrained Optimization Problems via Perturbation Analysis

For unconstrained smooth functions, the standard method for finding extrema is naturally to take derivatives (gradients) and set them to zero. But what about extremum problems with equality constraints? Many readers are likely familiar with them as well: the standard method is the method of Lagrange multipliers. However, Lagrange multipliers often feel like a purely algebraic trick, lacking the intuitive feel of perturbation analysis found in unconstrained optimization.

In this article, we will give it a try: what results do we obtain if we carry through the perturbation mindset of unconstrained extrema into constrained optimization?

Stationary Point Condition #

First, let us review why a zero gradient is the necessary condition (stationary point condition) for an unconstrained extremum. Consider the objective function , where , and we want to find 's minimizer. We expand around to first order:

If is already a minimum, then for any perturbation , it must always hold that , which means , but is a linear function of ; for it to always be non-negative, the only choice is

. The same discussion holds for a maximum, so this is the common stationary point condition for both maxima and minima. When the stationary point condition holds, the next leading term of the approximation expansion is

By the same principle, for to always hold, we must have hold identically, which means the Hessian matrix is positive semidefinite. This is a necessary condition for a minimum; conversely, the necessary condition for a maximum is that is negative semidefinite.

Of course, this discussion is not a rigorous mathematical proof, but rather a heuristic derivation.

Equality Constraints #

Now let us see what changes occur in the perturbation process once equality constraints are introduced. Consider

where , representing equality constraints. Take any point satisfying , namely , and again expand the perturbation to first order to obtain

Similarly, being a minimum still requires that holds for every allowed perturbation. The difference is that it no longer has to hold for an arbitrary perturbation ; instead, it need only hold whenever , for every such . Taking a first-order approximation of yields

Notice that is a system of linear equations in , and we can use the "pseudoinverse" to write its general solution:

where is the pseudoinverse of , denotes an arbitrary unconstrained perturbation vector, and when is invertible, . From this, it can be seen that is a symmetric matrix. Substituting the above equation into and, by the arbitrariness of , we obtain the stationary point condition

where is the projected gradient of on the manifold ; it is the orthogonal projection of the Euclidean gradient onto the tangent space, also known as the Riemannian gradient in the language of Riemannian geometry.

Lagrange #

Now let us compare it with the method of Lagrange multipliers. The method of Lagrange multipliers introduces undetermined coefficients , modifying the objective function to

and then turns to seeking the stationary points of the unconstrained objective . Setting the gradients on both sides directly to zero yields

Notice that for the pseudoinverse, holds, so Equation can also be rewritten as . If we denote by , it becomes completely identical to the equation above; that is, from Equation we can derive the exact same condition as the method of Lagrange multipliers.

Conversely, can Equation be derived from the method of Lagrange multipliers? Naturally, it can. Assume and that the rank of is . Then viewing as an equation in , it is an overdetermined system; if a solution exists, it can only be , which upon substitution back into the equation yields Equation .

This demonstrates that the conditions given by the two approaches are completely mathematically equivalent. Of course, the formulation using Lagrange multipliers looks somewhat cleaner, but I feel that the perturbation idea is conceptually more consistent with the unconstrained case, so I prefer this perspective.

Moreover, the simplicity of the method of Lagrange multipliers is merely formal; truly understanding it is no easier than taking the perturbation perspective. Readers can entirely regard the progression from the perturbation idea to the projected gradient as one way of deriving the method of Lagrange multipliers.

Two Examples #

We deepen our understanding through the following two examples.

Spherical Constraint #

For the first example, consider the simple spherical extremum problem

It is easy to compute , so . Since is a unit vector, , and thus the stationary point condition is

The final expression is precisely the projection of the gradient onto the tangent space of the sphere.

Orthogonality Constraint #

Another example is an optimization problem on the Stiefel manifold

If one merely wants to find the stationary point condition, using the method of Lagrange multipliers would be considerably faster; nonetheless, here we will still derive the projected gradient in its entirety. The difficulty here lies in the fact that itself is a matrix, so will be a higher-order matrix, which carries a heavier cognitive burden.

To address this, we adopt a linear operator perspective. Taking the first-order approximation of yields , which, according to our earlier derivation, should equal , and we directly define the linear operator

Next, we need to derive , which is understood via (analogous to ), and are both known to us, so we have

From this, we can read off . According to , we also require and :

If is a symmetric matrix, then , so , while is precisely symmetric, so we only need this special case. Putting everything together yields

Let ; its projected gradient on the Stiefel manifold is

where is the symmetrization operator. Setting it to zero and multiplying both sides on the left by yields , which means that the stationary point condition is that itself is a symmetric matrix!

Second-Order Conditions #

Under equality-constrained optimization, then, is there a method for determining minima/maxima similar to whether is positive/negative definite? Naturally there is, and it has an ingenious derivation. Just as in the method of Lagrange multipliers, we define

For any stationary point , we automatically have , so for any , we have , and expanding to second order gives

Here, . Due to the arbitrariness of , we can directly choose , making the first-order term zero, so that

Now only the second-order term remains, so only requires first-order approximation accuracy, meaning that is sufficient; substituting this yields

By the arbitrariness of , we know that a necessary condition for to be a minimum is that is positive semidefinite. Similarly, for a maximum, this matrix must be negative semidefinite.

Of course, whether in unconstrained or constrained optimization, determining maxima/minima via the positive or negative definiteness of the Hessian matrix usually only has theoretical value. In practice, one typically filters out all locations satisfying the stationary point condition and then analyzes them case by case.

Summary #

This article applies the perturbation analysis idea from unconstrained extrema to equality-constrained optimization and derives the projected gradient on the tangent space; the stationary point condition for an extremum is simply setting the corresponding projected gradient to zero. Finally, we also prove that it gives the same conclusions as the method of Lagrange multipliers.