# This Quantum World/Appendix/Fields
### Fields

As you will remember, a function is a machine that accepts a number and returns a number. A field is a function that accepts the three coordinates of a point or the four coordinates of a spacetime point and returns a scalar, a vector, or a tensor (either of the spatial variety or of the 4-dimensional spacetime variety).

#### Gradient

Imagine a curve ${\mathcal {C}}$ in 3-dimensional space. If we label the points of this curve by some parameter $\lambda ,$ then ${\mathcal {C}}$ can be represented by a 3-vector function $\mathbf {r} (\lambda ).$ We are interested in how much the value of a scalar field $f(x,y,z)$ changes as we go from a point $\mathbf {r} (\lambda )$ of ${\mathcal {C}}$ to the point $\mathbf {r} (\lambda +d\lambda )$ of ${\mathcal {C}}.$ By how much $f$ changes will depend on how much the coordinates $(x,y,z)$ of $\mathbf {r}$ change, which are themselves functions of $\lambda .$ The changes in the coordinates are evidently given by
    $(^{*})\quad dx={\frac {dx}{d\lambda }}\,d\lambda ,\quad dy={\frac {dy}{d\lambda }}\,d\lambda ,\quad dz={\frac {dz}{d\lambda }}\,d\lambda ,$
while the change in $f$ is a compound of three changes, one due to the change in $x,$ one due to the change in $y,$ and one due to the change in $z$:
    $(^{*}^{*})\quad df={\frac {df}{dx}}\,dx+{\frac {df}{dy}}\,dy+{\frac {df}{dz}}\,dz.$
The first term tells us by how much $f$ changes as we go from $(x,y,z)$ to $(x{+}dx,y,z),$ the second tells us by how much $f$ changes as we go from $(x,y,z)$ to $(x,y{+}dy,z),$ and the third tells us by how much $f$ changes as we go from $(x,y,z)$ to $(x,y,z{+}dz).$
Shouldn't we add the changes in $f$ that occur as we go first from $(x,y,z)$ to $(x{+}dx,y,z),$ then from $(x{+}dx,y,z)$ to $(x{+}dx,y{+}dy,z),$ and then from $(x{+}dx,y{+}dy,z)$ to $(x{+}dx,y{+}dy,z{+}dz)$? Let's calculate.
    ${\frac {\partial f(x{+}dx,y,z)}{\partial y}}={\frac {\partial \left[f(x,y,z)+{\frac {\partial f}{\partial x}}dx\right]}{\partial y}}={\frac {\partial f(x,y,z)}{\partial y}}+{\frac {\partial ^{2}f}{\partial y\,\partial x}}\,dx.$
If we take the limit $dx\rightarrow 0$ (as we mean to whenever we use $dx$), the last term vanishes. Hence we may as well use ${\frac {\partial f(x,y,z)}{\partial y}}$ in place of ${\frac {\partial f(x{+}dx,y,z)}{\partial y}}.$ Plugging (*) into (**), we obtain
    $df=\left({\frac {\partial f}{\partial x}}{\frac {dx}{d\lambda }}+{\frac {\partial f}{\partial y}}{\frac {dy}{d\lambda }}+{\frac {\partial f}{\partial z}}{\frac {dz}{d\lambda }}\right)d\lambda .$
Think of the expression in brackets as the dot product of two vectors:
* the gradient ${\frac {\partial f}{\partial \mathbf {r} }}$ of the scalar field $f,$ which is a vector field with components ${\frac {\partial f}{\partial x}},{\frac {\partial f}{\partial y}},{\frac {\partial f}{\partial z}},$
* the vector ${\frac {d\mathbf {r} }{d\lambda }},$ which is tangent on ${\mathcal {C}}.$
If we think of $\lambda$ as the time at which an object moving along ${\mathcal {C}}$ is at $\mathbf {r} (\lambda ),$ then the magnitude of ${\frac {d\mathbf {r} }{d\lambda }}$ is this object's speed.
${\frac {\partial }{\partial \mathbf {r} }}$ is a differential operator that accepts a function $f(\mathbf {r} )$ and returns its gradient ${\frac {\partial f}{\partial \mathbf {r} }}.$
The gradient of $f$ is another input-output device: pop in $d\mathbf {r} ,$ and get the difference
    ${\frac {\partial f}{\partial \mathbf {r} }}\cdot d\mathbf {r} =df=f(\mathbf {r} +d\mathbf {r} )-f(\mathbf {r} ).$
The differential operator ${\frac {\partial }{\partial \mathbf {r} }}$ is also used in conjunction with the dot and cross products.

#### Curl

The curl of a vector field $\mathbf {A}$ is defined by
    ${\hbox{curl}}\,\mathbf {A} ={\frac {\partial }{\partial \mathbf {r} }}\times \mathbf {A} =\left({\frac {\partial A_{z}}{\partial y}}-{\frac {\partial A_{y}}{\partial z}}\right)\mathbf {\hat {x}} +\left({\frac {\partial A_{x}}{\partial z}}-{\frac {\partial A_{z}}{\partial x}}\right)\mathbf {\hat {y}} +\left({\frac {\partial A_{y}}{\partial x}}-{\frac {\partial A_{x}}{\partial y}}\right)\mathbf {\hat {z}} .$
To see what this definition is good for, let us calculate the integral $\oint \mathbf {A} \cdot d\mathbf {r}$ over a closed curve ${\mathcal {C}}.$ (An integral over a curve is called a line integral, and if the curve is closed it is called a loop integral.) This integral is called the circulation of $\mathbf {A}$ along ${\mathcal {C}}$ (or around the surface enclosed by ${\mathcal {C}}$). Let's start with the boundary of an infinitesimal rectangle with corners $A=(0,0,0),$ $B=(0,dy,0),$ $C=(0,dy,dz),$ and $D=(0,0,dz).$
The contributions from the four sides are, respectively,
* ${\overline {AB}}:\quad A_{y}(0,dy/2,0)\,dy,$
* ${\overline {BC}}:\quad A_{z}(0,dy,dz/2)\,dz=\left[A_{z}(0,0,dz/2)+{\frac {\partial A_{z}}{\partial y}}dy\right]dz,$
* ${\overline {CD}}:\quad -A_{y}(0,dy/2,dz)\,dy=-\left[A_{y}(0,dy/2,0)+{\frac {\partial A_{y}}{\partial z}}dz\right]dy,$
* ${\overline {DA}}:\quad -A_{z}(0,0,dz/2)\,dz.$
These add up to
    $(^{*}^{*}^{*})\quad \left[{\frac {\partial A_{z}}{\partial y}}-{\frac {\partial A_{y}}{\partial z}}\right]dy\,dz=({\hbox{curl}}\,\mathbf {A} )_{x}\,dy\,dz.$
Let us represent this infinitesimal rectangle of area $dy\,dz$ (lying in the $y$-$z$ plane) by a vector $d\mathbf {\Sigma }$ whose magnitude equals $d\Sigma =dy\,dz,$ and which is perpendicular to the rectangle. (There are two possible directions. The right-hand rule illustrated on the right indicates how the direction of $d\mathbf {\Sigma }$ is related to the direction of circulation.) This allows us to write (***) as a scalar (product) ${\hbox{curl}}\,\mathbf {A} \cdot d\mathbf {\Sigma } .$ Being a scalar, it it is invariant under rotations either of the coordinate axes or of the infinitesimal rectangle. Hence if we cover a surface $\Sigma$ with infinitesimal rectangles and add up their circulations, we get $\int _{\Sigma }{\hbox{curl}}\,\mathbf {A} \cdot d\mathbf {\Sigma } .$
Observe that the common sides of all neighboring rectangles are integrated over twice in opposite directions. Their contributions cancel out and only the contributions from the boundary $\partial \Sigma$ of $\Sigma$ survive.
The bottom line: $\oint _{\partial \Sigma }\mathbf {A} \cdot d\mathbf {r} =\int _{\Sigma }{\hbox{curl}}\,\mathbf {A} \cdot d\mathbf {\Sigma } .$
This is Stokes' theorem. Note that the left-hand side depends solely on the boundary $\partial \Sigma$ of $\Sigma .$ So, therefore, does the right-hand side. The value of the surface integral of the curl of a vector field depends solely on the values of the vector field at the boundary of the surface integrated over.
If the vector field $\mathbf {A}$ is the gradient of a scalar field $f,$ and if ${\mathcal {C}}$ is a curve from $\mathbf {A}$ to $\mathbf {b} ,$ then
    $\int _{\mathcal {C}}\mathbf {A} \cdot d\mathbf {r} =\int _{\mathcal {C}}df=f(\mathbf {b} )-f(\mathbf {A} ).$
The line integral of a gradient thus is the same for all curves having identical end points. If $\mathbf {b} =\mathbf {A}$ then ${\mathcal {C}}$ is a loop and $\int _{\mathcal {C}}\mathbf {A} \cdot d\mathbf {r}$ vanishes. By Stokes' theorem it follows that the curl of a gradient vanishes identically:
    $\int _{\Sigma }\left({\hbox{curl}}\,{\frac {\partial f}{\partial \mathbf {r} }}\right)\cdot d\mathbf {\Sigma } =\oint _{\partial \Sigma }{\frac {\partial f}{\partial \mathbf {r} }}\cdot d\mathbf {r} =0.$

#### Divergence

The divergence of a vector field $\mathbf {A}$ is defined by
    ${\hbox{div}}\,\mathbf {A} ={\frac {\partial }{\partial \mathbf {r} }}\cdot \mathbf {A} ={\frac {\partial A_{x}}{\partial x}}+{\frac {\partial A_{y}}{\partial y}}+{\frac {\partial A_{z}}{\partial z}}.$
To see what this definition is good for, consider an infinitesimal volume element $d^{3}r$ with sides $dx,dy,dz.$ Let us calculate the net (outward) flux of a vector field $\mathbf {A}$ through the surface of $d^{3}r.$ There are three pairs of opposite sides. The net flux through the surfaces perpendicular to the $x$ axis is
    $A_{x}(x+dx,y,z)\,dy\,dz-A_{x}(x,y,z)\,dy\,dz={\frac {\partial A_{x}}{\partial x}}\,dx\,dy\,dz.$
It is obvious what the net flux through the remaining surfaces will be. The net flux of $\mathbf {A}$ out of $d^{3}r$ thus equals
    $\left[{\frac {\partial A_{x}}{\partial x}}+{\frac {\partial A_{y}}{\partial y}}+{\frac {\partial A_{z}}{\partial z}}\right]\,dx\,dy\,dz={\hbox{div}}\,\mathbf {A} \,d^{3}r.$
If we fill up a region $R$ with infinitesimal parallelepipeds and add up their net outward fluxes, we get $\int _{R}{\hbox{div}}\,\mathbf {A} \,d^{3}r.$ Observe that the common sides of all neighboring parallelepipeds are integrated over twice with opposite signs — the flux out of one equals the flux into the other. Hence their contributions cancel out and only the contributions from the surface $\partial R$ of $R$ survive. The bottom line:
    $\int _{\partial R}\mathbf {A} \cdot d\mathbf {\Sigma } =\int _{R}{\hbox{div}}\,\mathbf {A} \,d^{3}r.$
This is Gauss' law. Note that the left-hand side depends solely on the boundary $\partial R$ of $R.$ So, therefore, does the right-hand side. The value of the volume integral of the divergence of a vector field depends solely on the values of the vector field at the boundary of the region integrated over.
If $\Sigma$ is a closed surface — and thus the boundary $\partial R$ or a region of space $R$ — then $\Sigma$ itself has no boundary (symbolically, $\partial \Sigma =0$). Combining Stokes' theorem with Gauss' law we have that
    $\oint _{\partial \partial R}\mathbf {A} \cdot d\mathbf {r} =\int _{\partial R}{\hbox{curl}}\,\mathbf {A} \cdot d\mathbf {\Sigma } =\int _{R}{\hbox{div curl}}\,\mathbf {A} \,d^{3}r.$
The left-hand side is an integral over the boundary of a boundary. But a boundary has no boundary! The boundary of a boundary is zero: $\partial \partial =0.$ It follows, in particular, that the right-hand side is zero. Thus not only the curl of a gradient but also the divergence of a curl vanishes identically:
    ${\frac {\partial }{\partial \mathbf {r} }}\times {\frac {\partial f}{\partial \mathbf {r} }}=0,\qquad {\frac {\partial }{\partial \mathbf {r} }}\cdot {\frac {\partial }{\partial \mathbf {r} }}\times \mathbf {A} =0.$

#### Some useful identities

    $d\mathbf {r} \times \left({\frac {\partial }{\partial \mathbf {r} }}\times \mathbf {A} \right){\frac {\partial }{\partial \mathbf {r} }}(\mathbf {A} \cdot d\mathbf {r} )-\left(d\mathbf {r} \cdot {\frac {\partial }{\partial \mathbf {r} }}\right)\mathbf {A}$
    ${\frac {\partial }{\partial \mathbf {r} }}\times \left({\frac {\partial }{\partial \mathbf {r} }}\times \mathbf {A} \right)={\frac {\partial }{\partial \mathbf {r} }}\left({\frac {\partial }{\partial \mathbf {r} }}\cdot \mathbf {A} \right)-\left({\frac {\partial }{\partial \mathbf {r} }}\cdot {\frac {\partial }{\partial \mathbf {r} }}\right)\mathbf {A} .$