gives True if expr is a Quantity with valid arguments, and False otherwise.


  • QuantityQ[expr] returns False unless expr is a Quantity expression with valid arguments (i.e. has a canonical unit).


open allclose all

Basic Examples  (1)

QuantityQ tests whether an object is a Quantity with valid arguments:

Applications  (1)

QuantityQ can be used in pattern tests for functions:

Properties & Relations  (3)

QuantityQ returns False for any expression whose head is not Quantity:

In particular, QuantityArray, QuantityVariable, and QuantityDistribution are not QuantityQ objects:

QuantityQ returns False for Quantity expressions with invalid arguments:

QuantityQ returns True only for Quantity expressions with valid arguments:

Introduced in 2012