MATHEMATICA TUTORIAL

# Unit Discovery

Mathematica's units system includes thousands of different quantities, including units, physical constants, and IndependentUnit expressions. Supported units include all those specified by NIST Special Publication 811.

Many quantities have multiple common names, which can make them difficult to find in a long list of possible units. Mathematica's built-in unit interpretation system allows you to specify units and physical constants using natural language input.

Use free-form linguistic inline input to make a Quantity expression.
 Out[1]//InputForm=
The electric constant is also commonly referred to as "vacuum permittivity" or "permittivity of free space".
 Out[2]=

You can use both WolframAlpha and Quantity to discover different units and physical constants using their various common names and abbreviations.

### Wolfram|Alpha Integration

One method of unit discovery in Mathematica is the WolframAlpha function and the related free-form input methods it provides.

Use the WolframAlpha function with format to get the expression as output.
 Out[3]//InputForm=
The >> assumptions button allows you to disambiguate inputs that could have multiple interpretations.
Use free-form linguistics inline to convert 0.9 times the speed of light into meters per second.
 Out[5]=
Get metabolic information about snorkeling as a Quantity expression from Wolfram|Alpha.
 Out[7]//TableForm=
 Out[8]=

### Quantity

Quantity will also automatically try and interpret unrecognized units. Once a unit has been interpreted, it will be cached so that subsequent evaluations will use the same result.

Interpret the unit and magnitude associated with Earth's gravity.
 Out[9]=
Use the cached result to convert Earth's gravity to its SI base units.
 Out[10]=

Unit interpretation requires internet connectivity, and can entail additional evaluation time. If speed is a concern, it is advisable to use the canonical unit specification, which can be found using InputForm.

 Out[11]=
 Out[12]//InputForm=
ClearSystemCache can be used to purge any cached Quantity expressions.
 Out[14]=

## Related TutorialsRelated Tutorials

New to Mathematica? Find your learning path »
Have a question? Ask support »