A scalar field is a function that assigns a number to every position in space. Temperature, pressure, density, molar concentration, charge density and potential energy are scalar fields. Similarly, a vector field is a function that assigns a vector to every position in space. Electric fields and magnetic fields are vector fields. Imagine a scalar field \$ \ phi (x, y, z) \$. The gradient of this scalar field is defined as

\$\$ \ nabla \ phi = \ frac {\ partial \ phi} {\ partial x} \ hat {x} + \ frac {\ partial \ phi} {\ partial y} \ hat {y} + \ frac {\ partial \ phi} {\ partial z} \ hat {z}. \$\$

The gradient of a scalar field is a vector field. If the scalar field is a topographic map showing the elevation at each point, the gradient at each point will point in the direction with the greatest slope. If the scalar field is the pressure, the minus gradient points in the direction the wind is blowing. If the scalar field is temperature, minus the gradient points in the direction in which the heat is moving. If the scalar field is the potential energy, minus the gradient is the force.

example 1

The potential energy of gravity is

\$\$ E_ {pot} = - \ frac {Gm_1m_2} {r}, \$\$ \$\$ E_ {pot} = - \ frac {Gm_1m_2} {\ sqrt {x ^ 2 + y ^ 2 + z ^ 2}}, \$\$ \$\$ - \ nabla E_ {pot} = - \ frac {Gm_1m_2} {\ left (x ^ 2 + y ^ 2 + z ^ 2 \ right) ^ {3/2}} \ left (x \ hat { x} + y \ hat {y} + z \ hat {z} \ right). \$\$

The power is

\$\$ - \ nabla E_ {pot} = \ vec {F} = - \ frac {Gm_1m_2} {r ^ 2} \ hat {r}. \$\$

Example 2

The potential coulomb energy is

\$\$ E_ {pot} = \ frac {q_1q_2} {4 \ pi \ epsilon_0 r}, \$\$ \$\$ E_ {pot} = \ frac {q_1q_2} {4 \ pi \ epsilon_0 \ sqrt {x ^ 2 + y ^ 2 + z ^ 2}}, \$\$ \$\$ - \ nabla E_ {pot} = \ frac {q_1q_2} {4 \ pi \ epsilon_0 \ left (x ^ 2 + y ^ 2 + z ^ 2 \ right) ^ { 3/2}} \ left (x \ hat {x} + y \ hat {y} + z \ hat {z} \ right). \$\$

The power is

\$\$ - \ nabla E_ {pot} = \ vec {F} = \ frac {q_1q_2} {4 \ pi \ epsilon_0r ^ 2} \ hat {r}. \$\$

Example 3

The potential energy stored in a linear spring is

\$\$ E_ {pot} = \ frac {kx ^ 2} {2}. \$\$

The power is

\$\$ - \ nabla E_ {pot} = \ vec {F} = -kx. \$\$