# Lagrange multipliers with vectors and matrices

1. Sep 22, 2011

### IniquiTrance

My textbook is using Lagrange multipliers in a way I'm not familiar with.

F(w,λ)=wCwT-λ(wuT-1)

Why is the first order necessary condition?:

2wC-λu=0

Is it because:
$\nabla$F=2wC-λu

Why does $\nabla$F equal this?

Many thanks!

Edit: C is a covariance matrix

2. Sep 24, 2011

### Simon_Tyler

The easiest way to think about these things is to use http://en.wikipedia.org/wiki/Einstein_notation" [Broken].

F = wmCmnwn-λ(wmum-1)

where repeated indices are summed over their range.

Then using ∂wiwj = δij, where δij is the http://en.wikipedia.org/wiki/Kronecker_delta" [Broken]

We can calculate ∇F:

(∇F)i = ∂wiF = δimCmnwn+wmCmnδin-λ(δimum-0) = Cinwn+wmCmi-λui = 2wmCmi-λui = (2wC - λu)i

where we have used the fact that C and δ are symmetric matrices.

This calculation can also be done symbolically, but I find it easier (and often make less errors with transposes etc) using index notation. It also generalises to more complicated situations where you have covariant and contravariant indices, and different classes of indices (such as holomorphic and antiholomorphic in complex cases), http://en.wikipedia.org/wiki/DeWitt_notation" [Broken].

Last edited by a moderator: May 5, 2017