Consider the problem of minimizing N-dimensional real-valued
cost function J(x)J(x), where x=(x1,x2,⋯,xN)tx=(x1,x2,⋯,xN)t,
subject to M<NM<N real-valued equality constraints
fm(x)=amfm(x)=am, m=1,⋯,Mm=1,⋯,M.
This may be converted into an unconstrained optimization
of dimension N+MN+M by introducing additional variables
λ=(λ1,⋯,λM)tλ=(λ1,⋯,λM)t known as Lagrange
multipliers.
The uncontrained cost function is
J
u
(
x
,
λ
)
=
J
(
x
)
+
∑
m
λ
m
f
m
(
x
)
-
a
m
,
J
u
(
x
,
λ
)
=
J
(
x
)
+
∑
m
λ
m
f
m
(
x
)
-
a
m
,
(13)
and necessary conditions for its minimization are
∂
∂
x
J
u
(
x
,
λ
)
=
0
⇔
∂
∂
x
J
(
x
)
+
∑
m
λ
m
∂
∂
x
f
m
(
x
)
=
0
∂
∂
λ
J
u
(
x
,
λ
)
=
0
⇔
f
m
(
x
)
=
a
m
for
m
=
1
,
⋯
,
M
.
∂
∂
x
J
u
(
x
,
λ
)
=
0
⇔
∂
∂
x
J
(
x
)
+
∑
m
λ
m
∂
∂
x
f
m
(
x
)
=
0
∂
∂
λ
J
u
(
x
,
λ
)
=
0
⇔
f
m
(
x
)
=
a
m
for
m
=
1
,
⋯
,
M
.
(14)
The typical procedure used to solve for optimal x is the following:
-
Equations for xn, n=1,⋯,Nn=1,⋯,N, in terms of {λm}{λm}
are obtained from Equation 14 (upper equation).
-
These N equations are used in Equation 14
(lower equation) to solve for the M optimal λm.
-
The optimal {λm}{λm} are plugged back into the N
equations for xn, yielding optimal {xn}{xn}.