Gradient


The gradient f\nabla f of a differentiable scalar function ff is the vector field whose values describe the direction and magnitude of fastest increase at any given point in ff's domain. In a generic coordinate system with Basis vectors (x1,x2,,xn)(x_{1},x_{2},\ldots,x_{n}), the gradient can be written as the column vector whose components are the partial derivatives in that component:

f=(fx1fx2fxn)\nabla f=\begin{pmatrix} \frac{ \partial f }{ \partial x_{1} } \\ \frac{ \partial f }{ \partial x_{2} } \\ \vdots \\ \frac{ \partial f }{ \partial x_{n} } \\ \end{pmatrix}

This is related to the total differential dfdf, as they are transpose (and thus dual) to each other:

df=(f)Tdf=(\nabla f)^{T}

In braket notation, they are the ket and bra of the same vector:

f=xf,df=xf\nabla f=\ket{\partial_{x} f},\quad df=\bra{\partial_{x}f}

Useful results

Given a generic position vector r=rr^\mathbf{r}=r\hat{\mathbf{r}}, the following useful results hold:

r=r^,rn=nrn1r^,(1r)=r^r2,(1rn)=nr^rn+1\nabla r=\hat{\mathbf{r}},\quad \nabla r^{n}=nr^{n-1}\hat{\mathbf{r}},\quad \nabla\left( \frac{1}{r} \right)=- \frac{\hat{\mathbf{r}}}{r^{2}},\quad \nabla\left( \frac{1}{r^{n}} \right)=- \frac{n\hat{\mathbf{r}}}{r^{n+1}}

In curvilinear coordinates

The most generic form of the gradient is given in curvilinear coordinates. Consider a three-dimensional system with coordinates uu, vv and ww. If you move an object from point (u,v,w)(u,v,w) to point (u+du,v+dv,w+dw)(u+du,v+dv,w+dw) in an infinitesimal motion, a scalar function t(u,v,w)t(u,v,w) changes by an amount

dt=tdr=(t)uf du+(t)vg dv+(t)wh dwdt=\nabla t\cdot d\mathbf{r}=(\nabla t)_{u}f\ du+(\nabla t)_{v}g\ dv+(\nabla t)_{w}h\ dw

so long as we define

(t)u1ftu,(t)v1gtv,(t)w1htw(\nabla t)_{u}\equiv \frac{1}{f}\frac{ \partial t }{ \partial u } ,\quad (\nabla t)_{v}\equiv \frac{1}{g}\frac{ \partial t }{ \partial v } ,\quad(\nabla t)_{w}\equiv \frac{1}{h}\frac{ \partial t }{ \partial w }

where ff, gg and hh are functions of position that are specific to a given coordinate system (see Curvilinear coordinates functions). The gradient of tt then is

t1ftuu^+1gtvv^+1htww^\nabla t\equiv \frac{1}{f}\frac{ \partial t }{ \partial u } \mathbf{\hat{u}}+ \frac{1}{g}\frac{ \partial t }{ \partial v } \mathbf{\hat{v}}+ \frac{1}{h}\frac{ \partial t }{ \partial w } \mathbf{\hat{w}}

As a bonus, using dt=tdrdt=\nabla t\cdot d\mathbf{r}, we can state

t(b)t(a)=abdt=abtdrt(b)-t(a)=\int_{a}^{b}dt=\int_{a}^{b}\nabla t\cdot d\mathbf{r}

which is the gradient theorem.