Scalar potential

Scalar potential, simply stated, describes the situation where the difference in the potential energies of an object in two different positions depends only on the positions, not upon the path taken by the object in traveling from one position to the other. It is a scalar field in three-space: a directionless value (scalar) that depends only on its location. A familiar example is potential energy due to gravity.
A "scalar potential" is a fundamental concept in vector analysis and physics (the adjective "scalar" is frequently omitted if there is no danger of confusion with "vector potential"). The scalar potential is an example of a scalar field. Given a vector field F, the scalar potential "P" is defined such that: 
where ∇"P" is the gradient of "P" and the second part of the equation is minus the gradient for a function of the Cartesian coordinates "x", "y", "z". In some cases, mathematicians may use a positive sign in front of the gradient to define the potential. Because of this definition of "P" in terms of the gradient, the direction of F at any point is the direction of the steepest decrease of "P" at that point, its magnitude is the rate of that decrease per unit length.
In order for F to be described in terms of a scalar potential only, any of the following equivalent statements have to be true:
The first of these conditions represents the fundamental theorem of the gradient and is true for any vector field that is a gradient of a differentiable single valued scalar field "P". The second condition is a requirement of F so that it can be expressed as the gradient of a scalar function. The third condition re-expresses the second condition in terms of the curl of F using the fundamental theorem of the curl. A vector field F that satisfies these conditions is said to be irrotational (conservative).
Scalar potentials play a prominent role in many areas of physics and engineering. The gravity potential is the scalar potential associated with the gravity per unit mass, i.e., the acceleration due to the field, as a function of position. The gravity potential is the gravitational potential energy per unit mass. In electrostatics the electric potential is the scalar potential associated with the electric field, i.e., with the electrostatic force per unit charge. The electric potential is in this case the electrostatic potential energy per unit charge. In fluid dynamics, irrotational lamellar fields have a scalar potential only in the special case when it is a Laplacian field. Certain aspects of the nuclear force can be described by a Yukawa potential. The potential play a prominent role in the Lagrangian and Hamiltonian formulations of classical mechanics. Further, the scalar potential is the fundamental quantity in quantum mechanics.
Not every vector field has a scalar potential. Those that do are called conservative, corresponding to the notion of conservative force in physics. Examples of non-conservative forces include frictional forces, magnetic forces, and in fluid mechanics a solenoidal field velocity field. By the Helmholtz decomposition theorem however, all vector fields can be describable in terms of a scalar potential and corresponding vector potential. In electrodynamics, the electromagnetic scalar and vector potentials are known together as the electromagnetic four-potential.
Integrability conditions.
If F is a conservative vector field (also called "irrotational", "curl-free", or "potential"), and its components have continuous partial derivatives, the potential of F with respect to a reference point formula_5 is defined in terms of the line integral:
where "C" is a parametrized path from formula_5 to formula_8
The fact that the line integral depends on the path "C" only through its terminal points formula_5 and formula_11 is, in essence, the path independence property of a conservative vector field. The fundamental theorem of line integrals implies that if "V" is defined in this way, then formula_12 so that "V" is a scalar potential of the conservative vector field F. Scalar potential is not determined by the vector field alone: indeed, the gradient of a function is unaffected if a constant is added to it. If "V" is defined in terms of the line integral, the ambiguity of "V" reflects the freedom in the choice of the reference point formula_13
Altitude as gravitational potential energy.
An example is the (nearly) uniform gravitational field near the Earth's surface. It has a potential energy
where "U" is the gravitational potential energy and "h" is the height above the surface. This means that gravitational potential energy on a contour map is proportional to altitude. On a contour map, the two-dimensional negative gradient of the altitude is a two-dimensional 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 three-dimensional 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 perpendicular to the hill's surface. The component of gravity that remains to move the ball is parallel to the surface:
where "θ" is the angle of inclination, and the component of "FS" perpendicular to gravity is
This force "FP", parallel to the ground, is 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 
so that
However, on a contour map, the gradient is inversely proportional to Δ"x", which is not similar to force "FP": altitude on a contour map is not exactly a two-dimensional 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 is permeated by a uniform buoyant force that cancels out the gravitational force: that is how the fluid maintains its equilibrium. This buoyant force is the negative gradient of pressure:
Since buoyant force points upwards, in the direction opposite to gravity, then pressure in the fluid increases 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 parallel to the surface, which can be characterized as the plane of zero pressure.
If the liquid has a vertical vortex (whose axis of rotation is perpendicular to the surface), then the vortex causes a depression in the pressure field. The surface of the liquid inside the vortex is pulled downwards as are any surfaces of equal pressure, which still remain parallel to the liquids surface. The effect is strongest inside the vortex and decreases rapidly with the distance from the vortex axis. 
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:
Scalar potential in Euclidean space.
In 3-dimensional Euclidean space formula_21, the scalar potential of an irrotational vector field E is given by
where formula_23 is an infinitesimal volume element with respect to . Then
This holds provided 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.
Written another way, let
be the Newtonian potential. This is the fundamental solution of the Laplace equation, meaning that the Laplacian of is equal to the negative of the Dirac delta function:
Then the scalar potential is the divergence of the convolution of E with :
Indeed, convolution of an irrotational vector field with a rotationally invariant potential is also irrotational. For an irrotational vector field G, it can be shown that 
Hence
as required.
More generally, the formula
holds in "n"-dimensional Euclidean space () with the Newtonian potential given then by
where is the volume of the unit "n"-ball. The proof is identical. Alternatively, integration by parts (or, more rigorously, the properties of convolution) gives