A temperature gradient is a physical quantity that describes in which direction and at what rate the temperature changes the most rapidly around a particular location. The temperature gradient is a dimensional quantity expressed in units of degrees (on a particular temperature scale) per unit length. The SI unit is kelvin per meter (K/m).
where x, y and z are the coordinates of the location of interest, then the temperature gradient is the vector quantity defined as
On a global and annual basis, the dynamics of the atmosphere (and the oceans) can be understood as attempting to reduce the large difference of temperature between the poles and the equator by redistributing warm and cold air and water, known as Earth's heat engine.
Differences in air temperature between different locations are critical in weather forecasting and climate. The absorption of solar light at or near the planetary surface increases the temperature gradient and may result in convection (a major process of cloud formation, often associated with precipitation). Meteorological fronts are regions where the horizontal temperature gradient may reach relatively high values, as these are boundaries between air masses with rather distinct properties.
Clearly, the temperature gradient may change substantially in time, as a result of diurnal or seasonal heating and cooling for instance. This most likely happens during an inversion. For instance, during the day the temperature at ground level may be cold while it's warmer up in the atmosphere. As the day shifts over to night the temperature might drop rapidly while at other places on the land stay warmer or cooler at the same elevation. This happens on the West Coast of the United States sometimes due to geography.