# Temperature Conversion

Converting temperatures is an example of a unit conversion that cannot be done using scalars.  Unlike most units, temperature measurements in the most common units (Fahrenheit, Celsius, Kelvin) are not simple ratios of each other:

• Converting between Fahrenheit and Celsius or Kelvin requires scaling (multiplication or division) and shifting (addition or subtraction).
• Converting between Celsius and Kelvin requires shifting.

Whenever units are not simple ratios of each other, conversions must be stated differently!

An easy way to spot these classes of units is to ask if a measurement of "0" in one unit would be "0" in the other unit.  In the case of temperatures, 0 degrees Fahrenheit is not 0 degrees Celsius is not 0 degrees Kelvin.  Those units do not "share zeros", so they must not be simple ratios of each other.  Therefore, temperature conversions cannot be handled normally...

To convert temperatures (or any other classes of units that do not share zeros), a hybrid method that combines features of the Standalone and Scalar methods must be used.  The hybrid method involves:

1. Creating a variable to hold the measurement (e.g. "temperature")
2. Always including units when referring to the measurement (e.g. "temperature measured in Celsius", or "temperature in units Fahrenheit")

Here's a complete example:

`> What's the temperature in units Celsius when the temperature measured in degrees Fahrenheit is 75?   Let 'T' stand for "TEMPERATURE"   Let 'C' stand for "CELSIUS"   (Find CT)   Let 'F' stand for "FAHRENHEIT"   So...             F T = 75Anything else?> No. I know that TEMPERATURE MEASURED IN FAHRENHEIT IS 32 PLUS NINE FIFTHS TEMPERATURE MEASURED IN CELSIUS   So...                        9 C T             F T = 32 + -----                          5     Hypothetically...       C = 1 * Automatic substitution of 'T' using FT=32+9CT/5...   Solving for T:                        9 C T             F T = 32 + -----                          5                       32                  T = -------                       9 C                   F - ---                        5    Substituting (32/(F-9C/5)) for 'T' in FT=75...          32 F                ------- = 75             9 C              F - ---                   5         Substitution leaves 32F/(F-9C/5)=75   Eliminate 'T'?  y/[n]: n * 'T' not eliminated.   Solving for F:          32 F                ------- = 75             9 C              F - ---                   5                         135 C               F = -----                    43         F = 3.13953488372093 (or 135 / 43, or 3 & 6 / 43)                     32                  T = -------                       9 C                   F - ---                        5        T = 23.8888888888889 (or 215 / 9, or 23 & 8 / 9) * No more automatic substitutions found.   23.8888888888889 (or 215 / 9, or 23 & 8 / 9) is THE TEMPERATURE IN UNITS CELSIUS.`
Luckily, temperature is the only everyday measurement that must be handled this way!  There are very few units that do not share zeros, so this hybrid method is rarely required.