# Why are divergence and curl related to dot and cross product?

I've been reading Griffith's intro to electrodynamics and I've been a bit confused about his explanation of divergence and curl. I don't understand how divergence is the dot product of a gradient acting on a vector function and curl is the cross product of gradient acting on a vector function. Does it relate to the fact that one uses sine while the other uses cosine? Just to clarify, I understand the concept of divergence and curl from a purely conceptual standpoint, it's just this mathematical definition that I can't wrap my head around.

First of all let's define dot product and cross product between two 3-vectors $$\mathbf{a} = \begin{pmatrix} a_1 \\ a_2 \\ a_3 \end{pmatrix} \qquad \text{and} \qquad \mathbf{b} = \begin{pmatrix} b_1 \\ b_2 \\ b_3 \end{pmatrix}$$

dot product: $$\mathbf{a}\cdot\mathbf{b} = \sum_i a_i b_i = a_1 b_1 + a_2 b_2+ a_3b_3$$

cross product: $$\mathbf{a}\times\mathbf{b} = \begin{pmatrix} a_2 b_3 - a_3 b_2 \\a_3 b_1 - a_1 b_3 \\a_1 b_2 - a_2 b_1 \end{pmatrix}$$

Note that these definitions do not involve geometric quantities like the angle between the two vectors; indeed, it is the angle that is defined in terms of the dot product (for the records, $\cos \theta := \mathbf{a\cdot b}/ \sqrt{\mathbf{(a\cdot a)(b\cdot b)}}$).

Then you have the definition of divergence and curl acting on a function $\mathbf{f}(\mathbf{x}) \equiv \begin{pmatrix}f_1(\mathbf{x}), f_2(\mathbf{x}), f_3(\mathbf{x})\end{pmatrix}$ ($\mathbf{x} = (x_1,x_2,x_3)$; you can call $x_1=x$, $x_2=y$ and $x_3=z$ but my choice allow a compact notation):

divergence: $$\mathrm{div}\, \mathbf{f} := \frac{\partial }{\partial x_1} f_1+\frac{\partial }{\partial x_2} f_2+\frac{\partial }{\partial x_3} f_3 = \sum_i \frac{\partial }{\partial x_i}f_i \equiv \sum_i {\partial_i}f_i$$ where $\partial_i \equiv \partial / \partial x_i$.

curl: $$\mathrm{curl} \,\mathbf{f} := \begin{pmatrix} \partial_2 f_3 - {\partial_3 f_2} \\ \partial_3 f_1 - \partial_1 f_3 \\ \partial_1 f_2 - \partial_2 F_1\end{pmatrix}$$

Now you can see that if you introduce the quantity $$\nabla = \begin{pmatrix} \partial_1 \\ \partial_2 \\ \partial_3 \end{pmatrix}$$ you can write the operations of divergence and curl as if $\nabla$ was a vector! Indeed if you apply the definition of dot and cross product you can easily find out that $$\nabla \cdot \mathbf{f} = \mathrm{div}\, \mathbf{f} \qquad \text{and} \qquad \nabla \times \mathbf{f} = \mathrm{curl}\, \mathbf{f}$$ You can find out that many identities holding for 3-vectors still hold id one of them is $\nabla$.

But note that this "trick" of thinking to $\nabla$ as a 3-vector is formal and not all identities holding for usual 3-vectors keep working.

• So are you saying that, in hindsight, one can make the connection that since finding divergence requires taking the partial derivative of each component of a vector, it is basically the same as taking the dot product between each component of that vector? Dec 28, 2016 at 18:12
• What I am saying is that if you forget that $\nabla$ is a differential operator and you just think to it as a vector, you get the correct expression for divergence and curl, as I showed in the answer. I would not consider it more than a formal correspondence that is sometimes useful to remember some identities during calculations. For instance, it is true that $\mathrm{div} \, \mathrm{curl}\, \mathbf{f} = 0$; if you write in terms of $\nabla$ you get $\nabla \cdot \nabla \times \mathbf{f}$, it looks like the usual identity $\mathbf{a}\cdot \mathbf{a}\times\mathbf{b}=0$ valid for vectors.
– user139175
Dec 28, 2016 at 18:25
• So from a conceptual standpoint, the divergence must be a dot product because we're trying to find the capacity of each point of a vector function being a "sink" or "faucet" (since dot product requires multiplying each component by the magnitude of the same component of the other vector)? Also, the reason I'm still confused about curl is because I don't get why the cross product is necessary. How would one realize that finding the amount a vector curls around a point requires subtracting each multiplied component with itself? I guess I'm having trouble connecting the visuals with the math Dec 28, 2016 at 18:36
• Take for instance the divergence $\mathrm{div}\,\mathbf{f}:=\sum_i\partial_if_i$; this is the definition of div. Now, without having any relation with this, you have the dot product between two vectors $\mathbf{a}\cdot\mathbf{b}=\sum_ia_ib_i$. Look at the RHS of these two equations: you have the sum over terms formed by couples of objects: $f_i \leftrightarrow b_i$ and $\partial_i\leftrightarrow a_i$. Now you see that if you introduce "the vector of partial derivatives", that is $\nabla=(\partial_1,\partial_2,\partial_3)$, you can (formally) identify div with $\nabla \cdot \mathbf{f}$ .
– user139175
Dec 28, 2016 at 18:47
• An analogous argument holds for curl, but the expression (written in my answer) are not suitable for a comment.
– user139175
Dec 28, 2016 at 18:50

The somewhat cavalier way that operators are used and notated in physics (especially once you reach QM) has always bothered me a bit, so I can definitely relate. First, let's define some terms.

We define the gradient operator $\vec{\nabla}$ as a vector of partial derivatives along each coordinate. Here, we'll assume Cartesian as it's easiest to work with (Griffiths provides the forms for cylindrical and spherical coordinates in the front cover):

$$\vec{\nabla}=\hat{x}\frac{\partial}{\partial x}+\hat{y}\frac{\partial}{\partial y}+\hat{z}\frac{\partial}{\partial z}$$

This can be applied to a scalar function $f$ to obtain $\vec{\nabla}f=\frac{\partial f}{\partial x}\hat{x}+\frac{\partial f}{\partial y}\hat{y}+\frac{\partial f}{\partial z}\hat{z}$.

The divergence of a vector function $\vec{v}=v_x\hat{x}+v_y\hat{y}+v_z\hat{z}$ can be given by div $\vec{v} = \frac{\partial v_x}{\partial x}+\frac{\partial v_y}{\partial y}+\frac{\partial v_z}{\partial z}$. If we try to form the "dot product" of $\vec{\nabla}$ and $\vec{v}$, we multiply the magnitude of each component with the magnitude of the same component of the other vector, and then add. In doing this, we apply the derivative operators that are the components of $\vec{\nabla}$, so we get something that's identical to div $\vec{v}$. For this reason, even though the reasoning is still a bit fast and loose from a mathematician's point of view, we can reasonably write:

div $\vec{v}=\vec{\nabla}\cdot \vec{v}$.

A similar argument to the above yields:

curl $\vec{v}=\vec{\nabla}\times\vec{v}$.

The mechanism of the divergence as a dot product has been explained well by other answers. I will introduce some quite informal but intuitive observations that can convince you as to why the curl is a cross product.

1. The right hand rule for cross products follows naturally into the curl. Recall that the right hand rule tells you what direction the vector generated by a cross product will point in. This is necessary because the cross product gives us a vector orthogonal to both of the original vectors, but there is an ambiguity as there is more than one vector that satisfies orthogonality. Now consider the following vector field:

Curl the fingers in your right hand and you will notice that your thumb points in the direction that all the vectors in the plot of the aforenoted field's curl does:

You've just taken the cross product of the del operator with the vector field, and the resulting plot of the curl is consistent with the right hand rule.

1. The torque exerted on a tiny stick pinned down at its center in a vector field (picture winds, or moving water) is proportional to the curl of the vector field at that point. This makes since both from intuition and from the fact that torque is defined as the force crossed with the distance from the pivot that the force was applied to.

I love this question and was very curious about it, so I built on a 3blue1brown video to answer it with the video below. I’d argue one doesn’t fully understand/appreciate divergence, curl or Maxwell’s equations unless they get this. Here’s the nutshell version:

This connection is difficult to conceptualize because the del operator, $$\nabla ,$$ is not a typical vector. Like a parasite or virus, it is meaningless alone, and needs a ‘host’ to ‘operate’ on. While you can’t think of it as a real vector, you can treat it like one and use the standard processes for dot and cross products. This yields the equations for the divergence and curl as shown below, which simply boil down to finding 4 components: $$\frac{\partial P}{\partial x}, \frac{\partial Q}{\partial y}, \frac{\partial Q}{\partial x},$$ and $$\frac{\partial P}{\partial y}$$.

If your $$\frac{\partial P}{\partial x}$$and $$\frac{\partial Q}{\partial y}$$ are positive, this means the $$x$$ and $$y$$ components of your vectors are getting larger when you move in the $$x$$ and $$y$$ direction, respectively, which corresponds to positive divergence. If your $$\frac{\partial Q}{\partial x}$$and $$\frac{\partial P}{\partial y}$$ are positive and negative, respectively, this means the $$y$$ and $$-x$$ components of your vectors are getting larger when you move in the $$x$$ and $$y$$ direction, respectively, which corresponds to counterclockwise rotation, or positive curl.

The vector field illustrated below has a larger positive $$\frac{\Delta P}{\Delta x}$$ value than it’s negative $$\frac{\Delta Q}{\Delta y}$$value, corresponding to a slightly positive divergence. It also has a positive $$\frac{\Delta Q}{\Delta x},$$and negative $$\frac{\Delta P}{\Delta y}$$, corresponding to a positive (counterclockwise) curl.

I attempt to explain this more clearly in the video if you’d like to check it out, and let me know if you’d like to discuss further! https://youtu.be/k7WyPNWerN0