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=fv,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:

vv_,\boldsymbol{v} \leftrightarrow \boldsymbol{v} \cdot \_,

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

ff_,fdf. \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=fxαdxα=fxαϵα=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:

fxα=gαβ(f)β,gαγfxα=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νμfxν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νμfxνeμ=δνμfxνeμ=fxex+fyey. \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νμfxνeμ=frer+1r2fθ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*}