2.3 Gradient

The derivative of function in inner-product space

Theorem 2.3.1 (Riesz representative theorem) Assuming L:Rm→R is a linear function, ⟨⋅,⋅⟩ is the inner product on Rm, then there exists a unique vL∈Rm such that L(h)=⟨h,vL⟩, for any h∈Rm.

Proof If L=0, then take vL=0, it is unique.
When L≠0, consider ker⁡L={h∈Rm|L(h)=0}⊊Rm. Take u1∈(ker⁡L)⊥ and ∥u1∥=1, then for h∈Rm, there exists a unique λ∈R such that

                        L (h)
L (h − λu1 ) = 0 ⇔ λ =  ------
                        L(u1)

Here h−λu1=h−L(h)L(u1)u1∈ker⁡L0=⟨h−λu1,u1⟩=⟨h,u1⟩−λ⟨u1,u1⟩⟨h,u1⟩=λ=L(h)L(u1)L(h)=⟨h,L(u1)u1⟩

Therefore, v1=L(u1)u1. The uniqueness is proved via contradiction. ◻

vL is called the gradient of L. Given f:Rm→R, the gradient of df(x0) is called the gradient of f at x0, marked as gradf(x0) or ∇f(x0), i.e.
df(x0 )(v ) = ⟨v, ∇f (x0)⟩

Example 2.3.1 Several examples for the gradient.

1.

A:Rm→Rm is linear, f(x)=⟨Ax,x⟩, seek ∇f(x0). f(x0+v)−f(x0)=⟨A(x0+v),(x0+v)⟩−⟨Ax0,x0⟩=⟨Ax0,v⟩+⟨Av,x0⟩⏟df(x0)(v)+⟨Av,v⟩df(x0)(v)=⟨Ax0,v⟩+⟨Av,x0⟩=⟨Ax0,v⟩+⟨v,ATx0⟩=⟨v,(A+AT)x0⟩∇f(x0)=(A+AT)x0

2.

det:Mn→R, define the inner product between matrices as

              T
⟨A, B ⟩ = tr(A  B ),  ∀A, B  ∈ ℳn

Therefore

ddet(A )(B) = trA ∗TB  = ⟨B, A∗⟩

meaning ∇det(A)=A∗.

Assuming v1,...,vm is a set of bases in Rm, let x=x1v1+...+xmvm, v=ξ1v1+...+ξmvm, then the form of ∇f(x0) under coordinate (x1,...,xm) could be expressed as ∇f(x0)=c1v1+...+cmvmdf(x0)(v)=⟨v,∇f(x0)⟩=⟨∑i=1mξivi,∑j=1mcjvj⟩=∑i,j=1nξi⟨vi,vj⟩cj=(ξ1⋯ξm)(⟨vi,vj⟩)i,j(c1⋮cm)df(x0)(v)=∑i=1m∂f∂xi(x0)ξi=(ξ1⋯ξm)(∂f∂x1(x0)⋮∂f∂xm(x0))

Therefore, (∂f∂x1(x0)⋮∂f∂xm(x0))=(⟨vi,vj⟩)i,j(c1⋮cm)∇f(x0)=(c1⋮cm)=(⟨vi,vj⟩)i,j−1(∂f∂x1(x0)⋮∂f∂xm(x0))∇=(⟨vi,vj⟩)i,j−1(∂∂x1⋮∂∂xm)

If v1,...,vm is a set of normalized (standard) orthogonal bases, then (⟨vi,vj⟩)i,j=I, we have

∇f (x0 ) =

Moreover,

∖left|∂f-(x0)∖right| = |df (x0)(v)| = |⟨v, ∇f (x0)⟩| ≤ ∥∇f (x0)∥∥v ∥
      ∂v

It takes = if and only if v,∇f(x0) are parallel. If we assume ∥v∥=1, the gradient could also be defined without inner product: ∥∇f(x0)∥=max∥v∥=1|∂f∂v(x0)|=|∂f∂v∗(x0)|∇f(x0)=∥∇f(x0)∥v∗

Although this so-called gradient could be defined based on any kind of norm, yet without the backup of inner product, it does not have good properties.