Temperature Units
Temperature versus Temperature Difference | Subtracting Temperatures |
Kelvin | Multiplying Temperatures |
Converting Temperatures | Dividing Temperatures |
Adding Temperatures |
Handling of temperatures requires special care because temperatures are typically expressed in scales, like Celsius or Fahrenheit, with an arbitrary choice of zero. Differences of temperatures are standard quantities with a well-defined zero value. Therefore, a distinction between temperatures and temperature differences is needed. The Wolfram Language quantity framework distinguishes "DegreesCelsius" as a unit of temperature from "DegreesCelsiusDifference" as a unit of temperature difference. Both have unit dimensions of "TemperatureUnit".
Temperature units represent the hotness of matter and are measured using a thermometer that uses a scale such as Fahrenheit, Celsius or Kelvin. Common instances of temperature may be measuring ambient temperature, the body temperature of a patient or the boiling point of a substance. Temperature scales have a zero value that may or may not correspond to absolute zero.
Temperature differences represent the relative distance between temperatures, also measured using a temperature scale. Temperature differences are typically used to indicate a change in temperature, or the difference between two temperatures, and thus do not typically directly reference absolute zero.
Temperatures expressed in Kelvin are equivalent to differences with respect to absolute zero, and therefore there is no need to separate units of temperature and temperature difference in Kelvin.
Find the temperature difference between the critical-point temperature for water and carbon dioxide:
Temperatures may be freely converted from one scale to another, such as converting from Fahrenheit to Celsius or Kelvins using UnitConvert:
Exceptionally, temperatures may be converted into temperature differences, being interpreted as temperature differences from absolute zero.
A warning message will be emitted when a temperature in degrees Celsius or Fahrenheit is converted into a temperature difference:
That computation is equivalent to first converting to Kelvins and then converting into a temperature difference:
Another way to understand conversion of temperatures into temperature differences is as a difference with absolute zero:
For arithmetic operations like addition, the distinction between temperature and temperature difference units impacts the resulting quantity arithmetic. Temperature difference units may be added to a temperature to produce a temperature, temperature difference units may be added to produce a temperature difference or temperatures may be added to produce a temperature.
When adding two temperature quantities, the result will be the sum of the values including the difference from absolute zero. The result of summing two temperatures is equivalent to converting those temperatures to Kelvin and then summing, with results canonically given in Kelvin:
Temperature differences represent the distance between two temperatures, and thus the result of subtracting one temperature from another is a temperature difference. Temperature differences may also be subtracted from a temperature to produce another temperature. Subtracting a temperature from a temperature difference will also produce a temperature, one that is equivalent to the inverted sign of that temperature difference subtracted from the temperature.
Multiplication of temperatures is equivalent to adding temperatures and is canonically given in Kelvin. Because some temperature scales' zero values do not represent absolute zero, multiplication by a negative number will not migrate the sign into the temperature quantity.
Division by temperature units will produce a quantity equivalent to the temperature converted to Kelvin before division, with results canonically given in Kelvin. Division of one temperature by another will result in a numeric ratio given by the value of both temperatures in Kelvin.