Skip to main content
Physics LibreTexts

19.8: Appendix - Vector Differential Calculus

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    This appendix reviews vector differential calculus which is used extensively in both classical mechanics and electromagnetism.

    Scalar differential operators

    Scalar field

    Differential operators like time \(\left( \frac{d}{dt} \right)\) do not change the rotational properties of scalars or proper vectors. A scalar operator \(\frac{d}{ds}\) acting on a scalar field \(\phi (xyz)\), in a rotated coordinated frame \(\phi^{\prime} (x^{\prime} y^{\prime} z^{\prime} )\) is unchanged.

    \[\frac{d\phi^{\prime}}{ds} = \frac{d\phi}{ds} \label{G.1}\]

    Vector field

    Similarly for a proper vector field

    \[\frac{dA^{\prime}_i}{ ds} = \sum_j \lambda_{ij} \frac{dA_j}{ds} \label{G.2}\]

    That is, differentiation of scalar or vector fields with respect to a scalar operator does not change the rotational behavior. In particular, the scalar differentials of vectors continue to obey the rules of ordinary proper vectors. The scalar operator \(\frac{\partial}{ \partial t}\) is used for calculation of velocity or acceleration.

    Vector differential operators in cartesian coordinates

    Vector differential operators, such as the gradient operator, are important in physics. The action of vector operators differ along different orthogonal axes.

    Scalar field

    Consider a continuous, single-valued scalar function \(\phi (x_i, x_j, x_k)\). Since

    \[\phi^{\prime} = \phi \label{G.3}\]

    then the partial differential with respect to one component \(x_i\) of the vector \(\mathbf{x}^{\prime}\) gives

    \[\frac{\partial \phi^{\prime}}{ \partial x^{\prime}_i} = \sum_j \frac{\partial \phi}{ \partial x_j} \frac{\partial x_j}{\partial x^{\prime}_i} \label{G.4}\]

    The inverse rotation gives that

    \[x_j= \sum_k \lambda_{kj}x^{\prime}_k \label{G.5}\]


    \[\frac{\partial x_j}{\partial x^{\prime}_i } = \sum_k \lambda_{kj} \frac{\partial x^{\prime}_k }{\partial x^{\prime}_i } = \sum_k \lambda_{kj} \delta_{ik} = \lambda_{ij} \label{G.6}\]


    \[\frac{\partial \phi^{\prime}}{ \partial x^{\prime}_i} = \sum_j \lambda_{ij}\frac{ \partial \phi}{ \partial x_j} \label{G.7}\]

    That is the vector derivative acting of a scalar field transforms like a proper vector.

    Define the gradient, or \(\boldsymbol{\nabla}\) operator, as

    \[\boldsymbol{\nabla} \equiv \sum_i \widehat{\mathbf{e}_i} \frac{\partial}{ \partial x_i} \label{G.8}\]

    where \(\widehat{\mathbf{e}_i}\) is the unit vector along the \(x_i\) axis. In cartesian coordinates, the del vector operator is,

    \[\boldsymbol{\nabla} \equiv \widehat{\mathbf{i}} \frac{\partial}{ \partial x} + \widehat{\mathbf{j}} \frac{\partial}{ \partial y} + \widehat{\mathbf{k}} \frac{\partial }{ \partial z} \label{G.9}\]

    The gradient was applied to the gravitational and electrostatic potential to derive the corresponding field. For example, for electrostatics it was shown that the gradient of the scalar electrostatic potential field \(V\) can be written in cartesian coordinates as

    \[\mathbf{E} = −\boldsymbol{\nabla}V \label{G.10}\]

    Note that the gradient of a scalar field produces a vector field. You are familiar with this if you are a skier in that the gravitational force pulls you down the line of steepest descent for the ski slope.

    Vector field

    Another possible operation for the del operator is the scalar product with a vector. Using the definition of a scalar product in cartesian coordinates gives

    \[\boldsymbol{\nabla} \cdot \mathbf{A}=\widehat{\mathbf{i}} \cdot \widehat{\mathbf{i}} \frac{\partial A_{x}}{\partial x}+\widehat{\mathbf{j}} \cdot \widehat{\mathbf{j}} \frac{\partial A_{y}}{\partial y}+\widehat{\mathbf{k}} \cdot \widehat{\mathbf{k}} \frac{\partial A_{z}}{\partial z}=\frac{\partial A_{x}}{\partial x}+\frac{\partial A_{y}}{\partial y}+\frac{\partial A_{z}}{\partial z} \label{G.11}\]

    This scalar derivative of a vector field is called the divergence. Note that the scalar product produces a scalar field which is invariant to rotation of the coordinate axes.

    The vector product of the del operator with another vector, is called the curl which is used extensively in physics. It can be written in the determinant form

    \[\boldsymbol{\nabla} \times \mathbf{A} = \begin{vmatrix} \widehat{\mathbf{i}} & \widehat{\mathbf{j}} & \widehat{\mathbf{k}} \\ \frac{\partial}{ \partial x} & \frac{\partial}{ \partial y} & \frac{\partial}{ \partial z} \\ A_x & A_y & A_z \end{vmatrix} \label{G.12}\]

    By contrast to the scalar product, both the gradient of a scalar field, and the vector product, are vector fields for which the components along the coordinate axes transform in a specific manner, such as to keep the length of the vector constant, as the coordinate frame is rotated. The gradient, scalar and vector products with the \(\boldsymbol{\nabla}\) operator are the first order derivatives of fields that occur most frequently in physics.

    Second derivatives of fields also are used. Let us consider some possible combinations of the product of two del operators.

    1) \(\boldsymbol{\nabla} \cdot (\boldsymbol{\nabla}V ) = \nabla^2V\)

    The scalar product of two del operators is a scalar under rotation. Evaluating the scalar product in cartesian coordinates gives

    \[\left( \widehat{\mathbf{i}} \frac{\partial}{ \partial x} + \widehat{\mathbf{j}} \frac{\partial}{ \partial y} + \widehat{\mathbf{k}} \frac{\partial}{ \partial z} \right) \cdot \left( \widehat{\mathbf{i}} \frac{\partial V}{ \partial x} + \widehat{\mathbf{j}} \frac{\partial V}{ \partial y} + \widehat{\mathbf{k}} \frac{\partial V}{ \partial z} \right) = \frac{\partial^2 V}{ \partial x^2} + \frac{\partial^2V}{ \partial y^2} + \frac{\partial^2V}{ \partial z^2} \label{G.13}\]

    This also can be obtained without confusion by writing this product as;

    \[\boldsymbol{\nabla} \cdot (\boldsymbol{\nabla}V ) = \boldsymbol{\nabla} \cdot \boldsymbol{\nabla}V = (\boldsymbol{\nabla} \cdot \boldsymbol{\nabla}) V \label{G.14}\]

    where the scalar product of the del operator is a scalar, called the Laplacian \(\nabla^2\), given by

    \[\boldsymbol{\nabla} \cdot \boldsymbol{\nabla} = \nabla^2 \equiv \frac{\partial^2}{ \partial x^2} + \frac{\partial^2}{ \partial y^2} + \frac{\partial^2}{ \partial z^2} \label{G.15}\]

    The Laplacian operator is encountered frequently in physics.

    2) \(\boldsymbol{\nabla}\times (\boldsymbol{\nabla}V )=0\)

    Note that the vector product of two identical vectors

    \[\mathbf{A} \times \mathbf{A} = 0 \label{G.16}\]


    \[\boldsymbol{\nabla}\times (\boldsymbol{\nabla}V )=0 \label{G.17}\]

    This can be confirmed by evaluating the separate components along each axis.

    3) \(\boldsymbol{\nabla} \cdot (\boldsymbol{\nabla} \times \mathbf{A})=0\)

    This is zero because the cross-product is perpendicular to \(\boldsymbol{\nabla} \times \mathbf{A}\) and thus the dot product is zero.

    4) \(\boldsymbol{\nabla}\times (\boldsymbol{\nabla} \times \mathbf{A}) = \boldsymbol{\nabla} \cdot (\boldsymbol{\nabla} \cdot \mathbf{A}) − \nabla^2\mathbf{A}\)

    The identity

    \[\mathbf{A} \times (\mathbf{B} \times \mathbf{C}) = \mathbf{B} (\mathbf{A} \cdot \mathbf{C}) − (\mathbf{A} \cdot \mathbf{B}) \mathbf{C} \label{G.18}\]

    can be used to give

    \[\boldsymbol{\nabla}\times (\boldsymbol{\nabla} \times \mathbf{A}) = \boldsymbol{\nabla} \cdot (\boldsymbol{\nabla} \cdot \mathbf{A}) − \nabla^2\mathbf{A} \label{G.19}\]

    since \(\boldsymbol{\nabla} \cdot \boldsymbol{\nabla} = \nabla^2\).

    There are pitfalls in the discussion of second derivatives in that it is assumed that both del operators operate on the same variable, otherwise the results are different.

    Vector differential operators in curvilinear coordinates

    As discussed in Appendix \(19.3\) there are many situations where the symmetries make it more convenient to use orthogonal curvilinear coordinate systems rather than cartesian coordinates. Thus it is necessary to extend vector derivatives from cartesian to curvilinear coordinates. Table \(19.3.1\) can be used for expressing vector derivatives in curvilinear coordinate systems.


    The gradient in curvilinear coordinates is

    \[\boldsymbol{\nabla}f = \frac{1}{h_1} \frac{\partial f}{ \partial q_1} \mathbf{\hat{q}}_1 + \frac{1}{h_2} \frac{\partial f}{ \partial q_2} \mathbf{\hat{q}}_2 + \frac{1}{h_3} \frac{\partial f}{ \partial q_3} \mathbf{\hat{q}}_3 \label{G.20}\]

    where the coefficients \(h_i\) are listed in table \(19.3.1\). For cylindrical coordinates this becomes

    \[\boldsymbol{\nabla}f = \frac{\partial f}{ \partial \rho} \boldsymbol{\hat{\rho}} + \frac{1}{ \rho} \frac{\partial f}{ \partial \varphi } \boldsymbol{\hat{\varphi}} + \frac{\partial f}{ \partial z} \mathbf{\hat{z}} \label{G.21}\]

    In spherical coordinates

    \[\boldsymbol{\nabla}f = \frac{\partial f}{ \partial r} \mathbf{\hat{r}} + \frac{1}{ r} \frac{\partial f}{ \partial \theta} \boldsymbol{\hat{\theta}} + \frac{1}{ r \sin \theta} \frac{\partial f}{ \partial \varphi} \boldsymbol{\hat{\varphi}} \label{G.22}\]


    The divergence can be expressed as

    \[\boldsymbol{\nabla} \cdot \mathbf{A} = \frac{1}{h_1h_2h_3} \left[ \frac{\partial}{ \partial q_1} (A_1h_2h_3) + \frac{\partial}{ \partial q_2 } (A_2h_3h_1) + \frac{\partial}{ \partial q_3} (A_3h_1h_2) \right] \label{G.23}\]

    In cylindrical coordinates the divergence is

    \[\boldsymbol{\nabla} \cdot \mathbf{A} = \frac{1}{\rho} \frac{\partial}{ \partial \rho} (\rho A_{\rho}) + \frac{1}{\rho} \frac{\partial A_{\varphi}}{ \partial \varphi} + \frac{\partial A_z}{ \partial z} = \frac{A_{\rho}}{ \rho} + \frac{\partial A_{\rho}}{ \partial \rho} + \frac{1}{\rho} \frac{\partial A_{\varphi}}{ \partial \varphi} + \frac{\partial A_z}{ \partial z} \label{G.24}\]

    In spherical coordinates the divergence is

    \[\boldsymbol{\nabla} \cdot \mathbf{A} = \frac{1}{ r^2 \sin \theta} \left[ \frac{\partial}{ \partial r} \left( A_r r^2 \sin \theta \right) + \frac{\partial}{ \partial \theta} (A_{\theta} r \sin \theta ) + \frac{\partial}{ \partial \varphi} (A_{\varphi} r) \right] \label{G.25}\]


    \[\boldsymbol{\nabla} \times \mathbf{A}= \frac{1}{h_{1} h_{2} h_{3}} \begin{vmatrix} h_{1} \mathbf{\hat{q}}_{1} & h_{2} \mathbf{\hat{q}}_{2} & h_{3} \mathbf{\hat{q}}_{3} \\
    \frac{\partial}{\partial q_{1}} & \frac{\partial}{\partial q_{2}} & \frac{\partial}{\partial q_{3}} \\ h_{1} A_{1} & h_{2} A_{2} & h_{3} A_{3} \end{vmatrix} \label{G.26}\]

    In cylindrical coordinates the curl is

    \[\boldsymbol{\nabla} \times \mathbf{A}=\frac{1}{\rho} \begin{vmatrix}
    \boldsymbol{\hat{\rho}} & \rho \boldsymbol{\hat{\varphi}} & \mathbf{\hat{z}} \\
    \frac{\partial}{\partial \rho} & \frac{\partial}{\partial \varphi} & \frac{\partial}{\partial z} \\
    A_{\rho} & \rho A_{\varphi} & A_{z} \end{vmatrix} \label{G.27}\]

    In spherical coordinates the curl is

    \[\boldsymbol{\nabla} \times \mathbf{A}=\frac{1}{r^{2} \sin \theta}\begin{vmatrix}
    \mathbf{\hat{r}} & r \boldsymbol{\hat{\theta}} & r \sin \theta \boldsymbol{\hat{\varphi}} \\
    \frac{\partial}{\partial r} & \frac{\partial}{\partial \theta} & \frac{\partial}{\partial \varphi} \\
    A_{r} & r \rho A_{\theta} & r \sin \theta A_{\varphi} \end{vmatrix} \label{G.28}\]


    Taking the divergence of the gradient of a scalar gives

    \[\nabla^2f = \boldsymbol{\nabla} \cdot \boldsymbol{\nabla}f = \frac{1}{h_1h_2h_3} \left[ \frac{\partial}{ \partial q_1} \left(\frac{h_2h_3 }{h_1} \frac{\partial f}{ \partial q_1} \right) + \frac{\partial}{ \partial q_2} \left(\frac{h_3h_1}{h_2} \frac{\partial f}{ \partial q_2} \right) + \frac{\partial}{ \partial q_3} \left(\frac{h_1h_2 }{h_3} \frac{\partial f}{ \partial q_3} \right)\right] \label{G.29}\]

    The Laplacian of a scalar function \(f\) in cylindrical coordinates is

    \[\nabla^2f = \frac{1}{\rho} \frac{\partial}{ \partial \rho} \left( \rho \frac{\partial f}{ \partial \rho} \right) + \frac{1}{ \rho^2} \frac{\partial^2f}{ \partial \varphi^2} + \frac{\partial^2f}{ \partial z^2} \label{G.30}\]

    The Laplacian of a scalar function \(f\) in spherical coordinates is

    \[\nabla^2f = \frac{1}{ r^2} \frac{\partial}{ \partial r} \left( r^2 \frac{\partial f}{ \partial r} \right) + \frac{1}{ r^2 \sin \theta} \frac{\partial}{ \partial \theta} \left( \sin \theta \frac{\partial f}{ \partial \theta} \right) + \frac{1}{ r^2 \sin \theta } \frac{ \partial^2f}{ \partial \varphi^2} \label{G.31}\]

    The gradient, divergence, curl and Laplacian are used extensively in curvilinear coordinate systems when dealing with vector fields in Newtonian mechanics, electromagnetism, and fluid flow.

    This page titled 19.8: Appendix - Vector Differential Calculus is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Douglas Cline via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.