Skip to main content
Mathematics LibreTexts

13.2: Fundamentals of Vector Calculus

  • Page ID
    7844
  • \( \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}}\)

    In order to develop continuous field models, you need to know some basic mathematical concepts developed and used in vector calculus. A minimalistic quick review of those concepts is given in the following.

    Definition: Contour

    A contour is a set of spatial positions \(x\) that satisfy

    \[f(x) = C\label{(13.2)} \]

    for a scalar field \(f\), where \(C\) is a constant (see an example in Figure \(\PageIndex{1}\)). Contours are also called level curves or surfaces.

    imageedit_1_5818118706.png
    Figure \(\PageIndex{1}\): Contour \(f(x,y) = 1/2\) (blue solid circle) of a spatial function \(f(x,y) = e^{−(x^{2}+y^{2})}\).
    Definition: Gradient

    A gradient of a scalar field \(f\) is a vector locally defined as

    \[∇f = \begin{pmatrix} \dfrac{\partial{f}}{\partial{x_{1}}} \\ \dfrac{\partial{f}}{\partial{x_{2}}} \\ \vdots \\ \dfrac{\partial{f}}{\partial{x_{n}}} \end{pmatrix} \label{(13.3)} \]

    Here, \(n\) is the number of dimensions of the space.

    The symbol \(∇\) is called “del” or “nabla,” which can be considered the following “vector” of differential operators:

    \[\nabla =\begin{pmatrix} \dfrac{\partial}{\partial{x_{1}}} \\\dfrac{\partial}{\partial{x_{2}}}\\ \vdots \\ \dfrac{\partial}{\partial{x_{n}}} \end{pmatrix}\label{(13.4)} \]

    A gradient of \(f\) at position \(x\) is a vector pointing toward the direction of the steepest ascending slope of \(f\) at \(x\). The length of the vector represents how steep the slope is. A vector field of gradient \(∇f\) defined over a scalar field \(f\) is often called a gradient field (See an example in Figure \(\PageIndex{2}\)). The gradient is always perpendicular to the contour that goes through \(x\) (unless the gradient is a zero vector; compare Figs. 13.2.1 and 13.2.2).

    imageedit_7_7194911625.png
    Figure \(\PageIndex{2}\): Gradient field of a spatial function \(f(x,y) = e^{−(x^{2}+y^{2)}}\).
    Definition: Divergence

    A divergence of a vector field \(v\) is a scalar field defined as

    \[\nabla \cdot v = \left( \begin{array} { c } { \frac { \partial } { \partial x _ { 1 } } } \\ { \frac { \partial ^ { 1 } } { \partial x _ { 2 } } } \\ { \frac { \vdots } { \partial x _ { n } } } \end{array} \right) ^ { T } \left( \begin{array} { c } { v _ { 1 } } \\ { v _ { 2 } } \\ { \vdots } \\ { v _ { n } } \end{array} \right) = \frac { \partial v _ { 1 } } { \partial x _ { 1 } } + \frac { \partial v _ { 2 } } { \partial x _ { 2 } } + \ldots + \frac { \partial v _ { n } } { \partial x _ { n } }. \label{(13.5)} \]

    Note the tiny dot between \(∇\) and \(v\), which indicates that this is an “inner product” of them. Don’t confuse this divergence with the gradient discussed above!

    The physical meaning of divergence is not so straightforward to understand, but anyway, it literally quantifies how much the vector field \(v\) is “diverging” from the location \(x\). Let’s go through an example for a 2-D space. Assume that \(v\) is representing flows of some “stuff” moving around in a 2-D space. The stuff is made of a large number of particles (like a gas made of molecules), and the flow \(v = (v_x,v_y)\) means how many particles are going through a cross-section of the space per area per unit of time. In this 2-D example, a cross-section means a line segment in the space, and the total area of the section is just the length of the line segment.

    imageedit_11_9077529590.png
    Figure \(\PageIndex{3}\): Explanation of the physical meaning of divergence in a 2-D space.

    Then, consider a temporal change of the number of particles, say \(N\), within a very small spatial area around (\(x\),\(y\)) Figure \(\PageIndex{3}\). The temporal change of \(N\) can be calculated by counting how many particles are coming into/going out of the area through each edge per unit of time, as

    \[\frac{\partial{N}}{\partial{t}} =2hv_{x}(x-h,y) +2hv_{y}(x, y-h) -2hv_{x} (x+h,y) -2hv_{y}(x, y+h), \label{(13.6)} \]

    where \(h\) is the distance from (\(x\),\(y\)) to each edge, and therefore the length of each edge is \(2h\).

    Actually, Figure \(\PageIndex{3}\) may be a bit misleading; the particles can go in and out through any edge in both directions. But we use the \(+\) sign for \(v_{x}(x−h,y)\) and \(v_{y}(x,y−h)\) and the \(−\) sign for \(v_{x}(x + h,y)\) and \(v_{y}(x,y + h)\) in Eq. (\ref{(13.6)}), because the velocities are measured using the coordinate system where the rightward and upward directions are considered positive.

    Since \(N\) depends on the size of the area, we can divide it by the area (\((2h)^{2}\) in this case) to calculate the change in terms of the concentration of the particles, \(c = N/(2h)^{2}\), which won’t depend on \(h\):

    \[ \begin{align} \frac{\partial{c}}{\partial{t}} &= \frac{2hv_{x}(x-h, y) + 2hv_{y}(x, y-h) -2hv_{x}(x+h, y) -2hv_{y}(x, y+h)}{(2h)^{2}} \label{(13.7)} \\[4pt] &=\frac{v_{x} (x-h,y) +v_{y} (x, y-h) -v_{x}(x+h, y) -v_{y}(x, y+h)}{2h} \label{(13.8)} \end{align} \]

    If we make the size of the area really small \((h → 0)\), this becomes the following:

    \[ \begin{align} \frac{\partial{c}}{\partial{t}} &=\lim_{h \rightarrow{0}} \frac{v_{x}(x-h, y) +v_{y}(x, y-h) -v_{x}(x+h, y) -v_{x}(x+h, y) -v_{y}(x, y+h)}{2h}\label{(13.9)} \\[4pt] &=\lim_{h\rightarrow{0}} \begin{Bmatrix}(-\frac{ v_{x}(x+h, y)-v_{x}(x-h, y)}{2h}) +(-\frac{v_{y} (x, y+h) -v_{y} (x, y -h)}{2h}) \end{Bmatrix} \label{(13.10)} \\[4pt] &= -\frac{\partial{v_{x}}}{\partial{x}} -\frac{\partial{v_{y}}}{\partial{y}} \label{(13.11)} \\[4pt] &=−∇ \cdot{v}\label{(13.12)} \end{align} \]

    In natural words, this means that the temporal change of a concentration of the stuff is given by a negative divergence of the vector field \(v\) that describes its movement. If the divergence is positive, that means that the stuff is escaping from the local area. If the divergence is negative, the stuff is flowing into the local area. The mathematical derivation above confirms this intuitive understanding of divergence

    Exercise \(\PageIndex{1}\)

    Confirm that the interpretation of divergence above also applies to 3-D cases.

    Definition: Laplacian

    A Laplacian of a scalar field \(f\) is a scalar field defined as

    \[∇^{2}f =∇ \cdot{∇f} ={\begin{pmatrix} \frac{\partial}{\partial{x_{1}}} \\ \frac{\partial}{\partial{x_{2}}} \\ \vdots \\ \frac{\partial}{\partial{x_{n}}} \end{pmatrix}}^{T} \begin{pmatrix} \frac{\partial}{\partial{x_{1}}} \\ \frac{\partial}{\partial{x_{2}}} \\ \vdots \\ \frac{\partial}{\partial{x_{n}}} \end{pmatrix} f = \frac{\partial^{2}{f}} {\partial{x^{2}_{1}}} +\frac{\partial^{2}{f}}{\partial{x^{2}_{2}}} +...+ \frac{\partial^{2}{f}} {\partial{x^{2}_{n}}}. \label{(13.13)} \]

    imageedit_14_4589479159.png
    Figure \(\PageIndex{4}\): Laplacian (i.e., divergence of a gradient field) of a spatial function \(f(x,y) = e^{−(x^{2}+y^{2})}\). Compare this figure with Fig. 13.1.

    Sometimes the Laplacian operator is denoted by a right side up triangle \(∆\) instead of \(∇^2\). This is so confusing, I know, but blame the people who invented this notation. In this textbook, we use \(∇^2\) instead of \(∆\) to denote Laplacians, because \(∇^2\) is more intuitive to show it is a second-order differential operator, and also because \(∆\) is already used to represent small quantities (e.g., \(∆x\)).

    The gradient field of \(f\) shows a diverging pattern where the scalar field \(f\) is concave like a dip or a valley, or a converging pattern where \(f\) is convex like a hump or a ridge. Therefore, the Laplacian of \(f\), which is the divergence of the gradient field of\(f\), has a positive value where \(f\) is concave, or a negative value where \(f\) is convex. This is similar to the second-order derivative of a mathematical function; a concave function has a positive second-order derivative while a convex function has a negative one. The Laplacian is a generalization of the same concept, applicable to functions defined over a multidimensional domain.

    Exercise \(\PageIndex{2}\)

    Which of the following surface plots correctly illustrates the shape of a scalar field \(f(x,y) = xy(x−1)\)?

    imageedit_18_6354109302.png

    Exercise \(\PageIndex{3}\)

    Which of the following vector field plots correctly illustrates the flows given by a vector field \(v(x,y) = (−xy,x−y)\)?

    imageedit_22_2948705449.png

    Exercise \(\PageIndex{4}\)

    Calculate the gradient field and the Laplacian of each of the following:

    1. \(f(x, y) =x^{2} +xy\)
    2. \(f(x,y) =e^{x+y}\)
    3. \(f(x, y, z) =\frac{x+y}{z}\)
    Exercise \(\PageIndex{5}\)

    Explain where in the \(x-y\) space the surface defined by \(f(x,y) = 3x^{2} −xy^{3}\) switches between concave and convex.

    Exercise \(\PageIndex{6}\)

    So far, the gradient is defined only for a scalar field, but it is natural to define a gradient for a vector field too. Propose a meaningful definition of \(∇v\) and discuss its physical meaning.


    This page titled 13.2: Fundamentals of Vector Calculus is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Hiroki Sayama (OpenSUNY) via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.