returns True if lhs and rhs are identical.


  • lhs==rhs is used to represent a symbolic equation, to be manipulated using functions like Solve.
  • lhs==rhs returns True if lhs and rhs are ordinary identical expressions.
  • lhs==rhs returns False if lhs and rhs are determined to be unequal by comparisons between numbers or other raw data, such as strings.
  • Approximate numbers with machine precision or higher are considered equal if they differ in at most their last seven binary digits (roughly their last two decimal digits).
  • For numbers below machine precision, the required tolerance is reduced in proportion to the precision of the numbers.
  • 2==2. gives True.
  • e1==e2==e3 gives True if all the ei are equal.
  • Equal[e] gives True.
  • For exact numeric quantities, Equal internally uses numerical approximations to establish inequality. This process can be affected by the setting of the global variable $MaxExtraPrecision.
  • Equal remains unevaluated when lhs or rhs contains objects such as Indeterminate and Overflow.
  • In StandardForm and InputForm, lhs==rhs can be input as lhs\[Equal]rhs or lhsrhs.
  • It can also be input as \[LongEqual] or lhsrhs.
  • In TraditionalForm, lhs==rhs is output as lhsrhs.


open allclose all

Basic Examples  (2)

Test equality:

Click for copyable input

Represent an equation:

Click for copyable input
Click for copyable input

Scope  (12)

Properties & Relations  (6)

Possible Issues  (5)

See Also

SameQ  Unequal  EqualTo  Equivalent  KroneckerDelta  PossibleZeroQ  Order  Element  Reduce  Simplify  BinaryDistance  TwoWayRule


Introduced in 1988
| Updated in 2007