The - Command


Command Summary

Returns the difference of two numbers.

Command Syntax

value1 - value2

Menu Location

Press the [-] key to paste -.

Calculator Compatibility

This command works on all calculators.

Token Size

1 byte

The - operator subtracts two numbers, variables, or expressions. Order of operations dictates that it's calculated after * and /, and at the same time as +.

The - operator can also be used on lists and matrices. For the most part, it behaves in the intuitive way, distributing the operation over each element. However, subtracting a number from a matrix (or a matrix from a number) behaves differently: the number is only subtracted along the main diagonal of the matrix. For "normal" subtraction that applies to every element of the matrix, see .-.

           [-99  2]
           [3  -96]

Related Commands

  • + (add)
  • * (multiply)
  • / (divide)

See Also

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License