Engineering Math Practice

Vector Fields

Assign a vector to every point in space — and the special case where that vector field is a gradient.

The idea. A scalar function assigns a number to each point. A vector field assigns a vector to each point — a little arrow at every location. Think of the wind at every point in a room, or the pull of gravity at every point in space, or — your world — the electric field around a charge: an arrow at each point showing which way and how hard a test charge would be pushed.

Ready to put it into practice?

Start practicing

Each component (P, Q) is itself an ordinary scalar function of position — the field is just two scalar functions bundled to give a direction and magnitude at every point.

F(x,y)=P(x,y), Q(x,y)=P(x,y)i+Q(x,y)j\mathbf{F}(x,y) = \langle P(x,y),\ Q(x,y) \rangle = P(x,y)\,\mathbf{i} + Q(x,y)\,\mathbf{j}

2D vector field

  • P(x,y),Q(x,y)P(x,y), Q(x,y)The field's components — ordinary scalar functions of position.
  • i,j\mathbf{i}, \mathbf{j}Standard unit vectors along the x- and y-axes.

Same idea, one dimension up:

F(x,y,z)=P, Q, R=Pi+Qj+Rk\mathbf{F}(x,y,z) = \langle P,\ Q,\ R \rangle = P\,\mathbf{i} + Q\,\mathbf{j} + R\,\mathbf{k}

3D vector field

Gradient fields — the connection back to partial derivatives.

The gradient of a scalar function is itself a vector field:

f=fx, fy, fz\nabla f = \left\langle \dfrac{\partial f}{\partial x},\ \dfrac{\partial f}{\partial y},\ \dfrac{\partial f}{\partial z} \right\rangle

Gradient of a scalar function

  • f\nabla fThe gradient — a vector field built from a scalar function's partial derivatives.

A field that's the gradient of some scalar f is called conservative, and f is its potential function. This matters enormously in the next section (path independence, the fundamental theorem for line integrals) — flag it now, because "is this field conservative?" becomes the central question. In your world: the electric field is the gradient of electric potential (voltage). Voltage is the potential function; the E-field is its gradient. That's not an analogy, it's literally this math.

It's a "vector of derivative operations." Apply it three ways: to a scalar it gives the gradient; dotted with a field it gives divergence; crossed with a field it gives curl. Curl and divergence are just ∇ used two different ways.

=x, y, z\nabla = \left\langle \dfrac{\partial}{\partial x},\ \dfrac{\partial}{\partial y},\ \dfrac{\partial}{\partial z} \right\rangle

The del operator

  • \nablaDel operator — a vector of partial-derivative operations, not a number or a function by itself.

Worked example

f(x,y)=x2y+y3,F=2xy, x2+3y2f(x,y) = x^2y + y^3, \qquad \mathbf{F} = \langle 2xy,\ x^2 + 3y^2 \rangle
  1. fx=2xy,fy=x2+3y2\dfrac{\partial f}{\partial x} = 2xy, \qquad \dfrac{\partial f}{\partial y} = x^2 + 3y^2

    Compute the gradient — one partial derivative per variable.

  2. f=2xy, x2+3y2\nabla f = \langle 2xy,\ x^2 + 3y^2 \rangle

    Assemble the gradient field.

  3. f=F\nabla f = \mathbf{F}

    Compare to F: identical. So F = ∇f, which means F is conservative and f = x²y + y³ is its potential function.

Answer:

f(x,y)=x2y+y3f(x,y) = x^2y + y^3

How to solve one of these

  1. 1.

    Read the field. Identify PP, QQ (and RR in 3D) — the component functions.

  2. 2.

    To build a gradient field, take partials of the scalar f. One partial derivative per variable: f/x\partial f/\partial x, f/y\partial f/\partial y (and f/z\partial f/\partial z in 3D).

  3. 3.

    To check if a field is conservative (2D), test whether ∂P/∂y = ∂Q/∂x. If they're unequal, no potential exists. This is the quick screen — the next section formalizes it.

  4. 4.

    To recover a potential from a conservative field, integrate. Integrate PP with respect to xx, then fix up the constant using QQ.

f=fx, fy, fz\nabla f = \left\langle \dfrac{\partial f}{\partial x},\ \dfrac{\partial f}{\partial y},\ \dfrac{\partial f}{\partial z} \right\rangle

The gradient turns a scalar function into a vector field — one partial derivative per direction, bundled into an arrow at each point.

Ready to put it into practice?

Start practicing