Why Put the Derivatives in a Matrix?
A vector field in three-dimensional space assigns a vector to each point. Its divergence and curl are built from the field’s first partial derivatives, but the component formulas can be easier to understand when those derivatives are arranged systematically.
The matrix of first derivatives is called the Jacobian matrix. Once the rows and columns are fixed, two familiar quantities are visible in it: divergence is the sum of the diagonal entries, while curl is obtained from particular signed differences of off-diagonal entries. This is a way to organize the Cartesian formulas, not a new definition of divergence or curl.
Definition of the Jacobian Matrix
Let \(U\) be an open subset of \(\mathbb{R}^3\), and let \(\mathbf{F}:U\to\mathbb{R}^3\) have component functions \(P,Q,R\), so that \(\mathbf{F}(x,y,z)=(P(x,y,z),Q(x,y,z),R(x,y,z))\). If the component functions are differentiable at a point, their first partial derivatives form the Jacobian matrix there:
Here, for example, \(P_y\) means \(\frac{\partial P}{\partial y}\), evaluated at the point in question. If the first partial derivatives are continuous on \(U\), then \(\mathbf{F}\) is differentiable there and this matrix is defined throughout \(U\).
The row-and-column arrangement reflects how the field changes under a small change in position. If the position changes by a small vector \(\mathbf{h}=(h_1,h_2,h_3)\), then the first-order change in the field is given by multiplying the Jacobian by \(\mathbf{h}\): the \(i\)th component of that product is the sum of the changes in the \(i\)th field component due to changes in each input coordinate.
This is the matrix form of the derivative’s linear approximation. It explains why the Jacobian is a natural place to collect all the first partial derivatives.
Divergence and Curl in the Jacobian
For \(\mathbf{F}=(P,Q,R)\), divergence is the sum of the derivative of each component with respect to its corresponding coordinate. In the Jacobian, those three derivatives lie on the main diagonal. The curl uses pairs of cross-partial entries, with their order determined by the standard Cartesian curl formula.
Here \(J_{ij}\) denotes the entry in row \(i\), column \(j\) of \(\mathbf{J}_{\mathbf{F}}\), and the trace is the sum of the diagonal entries. These identities apply wherever the component functions have the required first partial derivatives.
Why These Matrix Formulas Hold
The result follows directly from the component definitions. The divergence formula adds \(P_x\), \(Q_y\), and \(R_z\). By the row-and-column convention, these are precisely entries \(J_{11}\), \(J_{22}\), and \(J_{33}\). Their sum is the trace.
For curl, the three-dimensional Cartesian definition is \(\nabla\times\mathbf{F}=(R_y-Q_z,\;P_z-R_x,\;Q_x-P_y)\). In the Jacobian, \(R_y\) is \(J_{32}\), while \(Q_z\) is \(J_{23}\); the other two components are read in the same way. Thus the curl components are exactly the three displayed differences. This also explains why reversing the order within a difference changes the sign.
There is a useful matrix interpretation of those differences. Subtracting the transpose cancels the diagonal entries and compares each off-diagonal entry with its reflected partner. Writing \(\mathbf{c}=\nabla\times\mathbf{F}\), the result is:
For instance, the entry in row 3, column 2 on the left is \((J_{32}-J_{23})/2=c_1/2\), matching the corresponding entry on the right. The other entries follow from the other two curl differences and the fact that transposing reverses their signs. So the curl is encoded by the antisymmetric part of the Jacobian, while divergence comes from its diagonal.
Worked Example: A Polynomial Vector Field
Worked Example: A Polynomial Vector Field
Let \(\mathbf{F}(x,y,z)=(x^2y+z,\;xy^2,\;yz^2)\). Find its Jacobian, divergence, and curl at \((1,2,-1)\).
First compute each row of partial derivatives. For \(P=x^2y+z\), the derivatives are \(P_x=2xy\), \(P_y=x^2\), and \(P_z=1\). At \((1,2,-1)\), these are \(2(1)(2)=4\), \(1^2=1\), and \(1\). For \(Q=xy^2\), they are \(Q_x=y^2=2^2=4\), \(Q_y=2xy=2(1)(2)=4\), and \(Q_z=0\). For \(R=yz^2\), they are \(R_x=0\), \(R_y=z^2=(-1)^2=1\), and \(R_z=2yz=2(2)(-1)=-4\). Thus:
The divergence is the trace, \(4+4+(-4)=4\). The curl components are \(J_{32}-J_{23}=1-0=1\), \(J_{13}-J_{31}=1-0=1\), and \(J_{21}-J_{12}=4-1=3\). Therefore:
Check by using the component formulas directly: \(R_y-Q_z=1-0=1\), \(P_z-R_x=1-0=1\), and \(Q_x-P_y=4-1=3\). The direct curl agrees with the matrix calculation, and \(P_x+Q_y+R_z=4+4-4=4\) confirms the divergence.
Worked Example: A Linear Field
Worked Example: A Linear Field
Consider \(\mathbf{F}(x,y,z)=(2x-y+3z+1,\;4x+5z-2,\;-2x+y+6z+4)\). Find its Jacobian, divergence, and curl.
The first component has derivatives \(P_x=2\), \(P_y=-1\), \(P_z=3\). The second has \(Q_x=4\), \(Q_y=0\), \(Q_z=5\). The third has \(R_x=-2\), \(R_y=1\), \(R_z=6\). These are constant, so the Jacobian is the same at every point:
The trace gives \(\nabla\cdot\mathbf{F}=2+0+6=8\). The curl is \((R_y-Q_z,\;P_z-R_x,\;Q_x-P_y)=(1-5,\;3-(-2),\;4-(-1))=(-4,5,5)\). Thus the divergence and curl are constant throughout space.
Check directly: \(R_y-Q_z=1-5=-4\), \(P_z-R_x=3+2=5\), and \(Q_x-P_y=4+1=5\). The diagonal sum remains \(2+0+6=8\), confirming the matrix results.
Worked Example: The Two-Dimensional Version
Worked Example: The Two-Dimensional Version
For a planar field \(\mathbf{G}(x,y)=(P(x,y),Q(x,y))\), its Jacobian has two rows and two columns. The two-dimensional divergence is \(P_x+Q_y\), and the scalar curl convention is \(Q_x-P_y\). Let \(\mathbf{G}(x,y)=(x^2+3y,\;2x-y^2)\), and evaluate both quantities at \((1,-1)\).
The derivatives of \(P\) are \(P_x=2x\) and \(P_y=3\). At the point, they are \(2(1)=2\) and \(3\). The derivatives of \(Q\) are \(Q_x=2\) and \(Q_y=-2y\); at \(y=-1\), these are \(2\) and \(-2(-1)=2\). Therefore:
The divergence is the diagonal sum \(2+2=4\). The scalar curl is the lower-left entry minus the upper-right entry: \(2-3=-1\). Directly, \(P_x+Q_y=2+2=4\) and \(Q_x-P_y=2-3=-1\), which checks both values.
A Sign Pitfall: Reversing the Curl Differences
A common error is to take the right entries from the Jacobian but subtract them in the wrong order. For example, in the linear-field example, the first curl component is incorrectly computed as \(Q_z-R_y=5-1=4\). This reverses the required difference and gives the wrong sign.
The diagonal entries and the curl differences have different roles: divergence adds the diagonal, whereas curl compares off-diagonal entries in a specified order. The Jacobian is an efficient organizer, but it does not remove the need to preserve that order.
Why the Matrix View Is Useful
Writing the derivatives as a matrix makes it easier to see which information is used by each quantity. The trace needs only the three diagonal entries; the curl needs only the three pairs of off-diagonal entries. This can simplify checking a calculation and help reveal which derivatives determine a result.
The matrix also gives a compact description of the field’s first-order change near a point. Its diagonal entries describe how each field component changes as the matching coordinate changes, while its off-diagonal entries describe changes involving different input and output components. Divergence and curl extract specific combinations of this local derivative information. They do not, however, contain every entry of the Jacobian, so knowing divergence and curl alone does not generally determine the full matrix.
Check Your Understanding
Answer these questions using the row-and-column convention stated above.
- For a three-dimensional vector field, which three Jacobian entries add to give divergence?
- Write the curl in terms of \(J_{ij}\) for the stated Jacobian convention.
- For a planar field, which matrix entries give the scalar curl \(Q_x-P_y\)?
- Why does reversing the order of one off-diagonal difference change the curl component’s sign?
- Can divergence and curl alone determine every entry of a vector field’s Jacobian? Explain briefly.