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.
 A: 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.
A: 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}$.
A: 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. 


*

*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.


*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. 

A: 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
