Scalar potential
From Academic Kids

A scalar potential is, mathematically, a scalar field whose negative gradient is a given vector field. If the scalar potential is denoted by the Greek letter φ and the vector field it generates as v, then
 <math> \mathbf{v} =  \nabla \phi \qquad \qquad (1) <math>.
The vector field can be a velocity field or a force field. Equation (1) therefore means a movement or acceleration towards the direction in which there will be a decrease of potential.
Physically, the scalar potential is similar or identical to potential energy. Any conservative force field can be represented as the negative gradient of some scalar potential.
Any lamellar field can be represented as having a scalar potential, but a solenoidal field generally does not have a scalar potential (except the degenerate case when it is Laplacian).
Altitude as gravitational potential
An example is the (nearly) uniform gravitational field near the Earth's surface. It has a potential
 <math> U = m g h <math>
where U is the gravitational potential and h is the height above the surface. This means that gravitational potential on a contour map is proportional to altitude. On a contour map, the twodimensional negative gradient of the altitude is a twodimensional vector field, whose vectors are always perpendicular to the contours and also perpendicular to the direction of gravity. But on the hilly region represented by the contour map, the threedimensional negative gradient of U always points straight downwards in the direction of gravity; F. However, a ball rolling down a hill cannot move directly downwards due to the normal force of the hill's surface which cancels out the component of gravity which is perpendicular to the hill's surface. The component of gravity which remains to move the ball is parallel to the surface:
 <math> F_S =  m g \ \sin \theta <math>
where θ is the angle of inclination, and the component of F_{S} perpendicular to gravity is
 <math> F_P =  m g \ \sin \theta \ \cos \theta =  {1 \over 2} m g \sin 2 \theta <math>
This force F_{P}, parallel to the ground, will be greatest when θ is 45 degrees.
Let Δh be the uniform interval of altitude between contours on the contour map, and let Δx be the distance between two contours. Then
 <math> \theta = \arctan {\Delta h \over \Delta x} <math>
so that
 <math> F_P =  m g { \Delta x \Delta h \over \Delta x^2 + \Delta h^2 } <math>.
However, on a contour map, the gradient will be inversely proportional to Δx, which is not similar to force F_{P}: altitude on a contour map is not exactly a twodimensional potential field. The magnitudes of forces are different, but the directions of the forces are the same on a contour map as well as on the hilly region of the Earth's surface represented by the contour map.
Pressure as buoyant potential
In fluid mechanics, a fluid in equilibrium but in the presence of a uniform gravitational field will be permeated by a uniform buoyant force which will cancel out the gravitational force: that is how the fluid maintains its equilibrium. This buoyant force is the negative gradient of pressure:
 <math> \mathbf{f_B} =  \nabla p <math>.
Since buoyant force points upwards, in the direction opposite to gravity, then pressure in the fluid will increase downwards. Pressure in a static body of water increases proportionally to the depth below the surface of the water. The surfaces of constant pressure are planes which are parallel to the ground. The surface of the water can be characterized as a plane with zero pressure.
If the liquid has a vertical vortex (whose axis of rotation is perpendicular to the ground), then the vortex will cause a depression in the pressure field. The surfaces of constant pressure will be parallel to the ground far away from the vortex, but near and inside the vortex the surfaces of constant pressure will be pulled downwards, closer to the ground. This will also happen to the surface of zero pressure: therefore, inside the vortex, the top surface of the liquid is pulled downwards into a depression, or even into a tube (a solenoid).
The buoyant force due to a fluid on a solid object immersed and surrounded by that fluid can be obtained by integrating the negative pressure gradient along the surface of the object:
 <math> F_B =  \oint_S \nabla p \cdot \, d\mathbf{S}. <math>
A moving airplane wing makes the air pressure above it decrease relative to the air pressure below it. This creates enough buoyant force to counteract gravity.
Calculating the scalar potential
Given a vector field E, its scalar potential can be calculated to be
 <math> \phi(\mathbf{R_0}) = {1 \over 4 \pi} \int_\tau {\nabla \cdot \mathbf{E}(\tau) \over \ \mathbf{R}(\tau)  \mathbf{R_0} \} \, d\tau <math>
where τ is volume. Then, if E is irrotational,
 <math> \mathbf{E} = \nabla \phi =  {1 \over 4 \pi} \nabla \int_\tau {\nabla \cdot \mathbf{E}(\tau) \over \ \mathbf{R}(\tau)  \mathbf{R_0} \} \, d\tau <math>.
This formula is known to be correct if E is continuous and vanishes asymptotically to zero towards infinity, decaying faster than 1/r and if the divergence of E likewise vanishes towards infinity, decaying faster than 1/r^{2}.
See also: electric potential, vector potential, fundamental theorem of vector analysis.