Back

Gradient

Recall that the covector dfdf acting on the vector v\boldsymbol{v} is the directional derivative of ff in the direction of vv:

df(v)=∇vf,df(\boldsymbol{v}) = \nabla_{\boldsymbol{v}}f,

and to calculate the directional derivative, we take the dot product of the gradient ∇f\nabla f and v\boldsymbol{v}:

df(v)=∇vf=∇f⋅v,df(\boldsymbol{v}) = \nabla_{\boldsymbol{v}}f = \nabla f \cdot \boldsymbol{v},

so dfdf is the dot product of the gradient of ff with a vector:

df=∇f⋅_.df = \nabla f \cdot \_.

Recall that we can pair vector v\boldsymbol{v} with a covector:

v↔v⋅_,\boldsymbol{v} \leftrightarrow \boldsymbol{v} \cdot \_,

we can pair the gradient ∇f\nabla f with its covector:

∇f↔∇f⋅_,∇f↔df. \begin{align*} \nabla f &\leftrightarrow \nabla f \cdot \_, \\ \nabla f &\leftrightarrow df. \end{align*}

To calculate the dot product ∇f⋅_\nabla f \cdot \_, we use the metric tensor:

df=∇f⋅_=g(∇f,_)=gαβϵαϵβ[(∇f)γeγ]=gαβ(∇f)γϵαϵβ(eγ)=gαβ(∇f)βϵα. \begin{align*} df = \nabla f \cdot \_ &= g(\nabla f, \_) \\ &= g_{\alpha \beta} \epsilon^{\alpha} \epsilon^{\beta} [(\nabla f)^{\gamma} \boldsymbol{e}_{\gamma}] \\ &= g_{\alpha \beta} (\nabla f)^{\gamma} \epsilon^{\alpha} \epsilon^{\beta} (\boldsymbol{e}_{\gamma}) \\ &= g_{\alpha \beta} (\nabla f)^{\beta} \epsilon^{\alpha}. \end{align*}

Recall, the covector can also be written as follows:

df=∂f∂xαdxα=∂f∂xαϵα=gαβ(∇f)βϵα, \begin{align*} df &= \frac{\partial f}{\partial x^{\alpha}} dx^{\alpha} \\ &= \frac{\partial f}{\partial x^{\alpha}} \epsilon^{\alpha} \\ &= g_{\alpha \beta} (\nabla f)^{\beta} \epsilon^{\alpha}, \end{align*}

implying:

∂f∂xα=gαβ(∇f)β,gαγ∂f∂xα=gαβgαγ(∇f)β=δβγ(∇f)β=(∇f)γ. \begin{align*} \frac{\partial f}{\partial x^{\alpha}} &= g_{\alpha \beta} (\nabla f)^{\beta}, \\ g^{\alpha \gamma} \frac{\partial f}{\partial x^{\alpha}} &= g_{\alpha \beta} g^{\alpha \gamma} (\nabla f)^{\beta} \\ &= \delta_{\beta}^{\gamma} (\nabla f)^{\beta} \\ &= (\nabla f)^{\gamma}. \\ \end{align*}

The gradient may be written as linear combination of its components:

∇f=(∇f)μeμ=gνμ∂f∂xνeμ.\nabla f = (\nabla f)^{\mu} \boldsymbol{e_{\mu}} = g^{\nu \mu} \frac{\partial f}{\partial x^{\nu}} \boldsymbol{e_{\mu}}.

Consider the 2D Cartesian coordinates where the metric tensor gμν=δμνg_{\mu \nu} = \delta_{\mu \nu} and gμν=δμνg^{\mu \nu} = \delta^{\mu \nu}:

∇f=gνμ∂f∂xνeμ=δνμ∂f∂xνeμ=∂f∂xex+∂f∂yey. \begin{align*} \nabla f &= g^{\nu \mu} \frac{\partial f}{\partial x^{\nu}} \boldsymbol{e_{\mu}} \\ &= \delta^{\nu \mu} \frac{\partial f}{\partial x^{\nu}} \boldsymbol{e_{\mu}} \\ &= \frac{\partial f}{\partial x} \boldsymbol{e_x} + \frac{\partial f}{\partial y} \boldsymbol{e_y}. \end{align*}

But for polar coordinates, the metric tensor is:

gμν=[100r2],gμν=[1001r2], \begin{align*} g_{\mu \nu} &= \begin{bmatrix} 1 & 0 \\ 0 & r^2 \end{bmatrix}, \\ g^{\mu \nu} &= \begin{bmatrix} 1 & 0 \\ 0 & \frac{1}{r^2} \end{bmatrix}, \end{align*}

then the gradient is equal to:

∇f=gνμ∂f∂xνeμ=∂f∂rer+1r2∂f∂θeθ. \begin{align*} \nabla f &= g^{\nu \mu} \frac{\partial f}{\partial x^{\nu}} \boldsymbol{e_{\mu}} \\ &= \frac{\partial f}{\partial r} \boldsymbol{e_r} + \frac{1}{r^2} \frac{\partial f}{\partial \theta} \boldsymbol{e_{\theta}}. \end{align*}