scalar potential
Sometimes a complicated vector field is secretly just the slope of a simple landscape. A scalar potential is that landscape: a single scalar field phi whose gradient reproduces the whole vector field. Instead of tracking three component functions and how they vary, you carry one function of position, and the field is recovered by reading off its steepest-descent (or ascent) direction at every point.
Concretely, a vector field F has a scalar potential phi when F = grad phi (physicists often use the convention F = -grad phi, so that force points toward lower potential energy). Only conservative fields admit a potential, and the potential is unique up to an additive constant — shifting phi by a number leaves grad phi unchanged, which is why only differences of potential, never the absolute value, are physically meaningful. You find phi by integrating: if F = (P, Q), then phi = integral of P dx (treating y as constant) plus a correction function of y fixed by matching partial phi/partial y to Q.
Scalar potentials are everywhere in physics because they replace a vector unknown by a single scalar unknown. Electrostatic potential (voltage) is the scalar potential of the electric field; gravitational potential is the scalar potential of the gravitational field. Solving for the potential and then differentiating is far easier than solving for the field directly, and it converts the field equations into a single scalar PDE — Laplace's equation nabla^2 phi = 0 in empty space, Poisson's equation nabla^2 phi = -rho/epsilon_0 where there is charge.
For F = (y, x), guess phi by integrating P = y in x: phi = x y + g(y). Then partial phi/partial y = x + g'(y) must equal Q = x, so g'(y) = 0 and phi = x y (up to a constant), confirming F = grad(x y).
Integrate one component, then fix the leftover function by matching the other — the standard recipe for recovering a potential.
Only conservative (irrotational, on a simply connected region) fields have a scalar potential; a field with nonzero curl, like the magnetic field, has no scalar potential at all and instead needs a vector potential A with B = curl A. The potential is defined only up to an added constant, so absolute potential values carry no meaning — only differences do.