In lower-level elementary mathematics and when using signed integers in programming languages, subtracting a number from a number with lower value is undefined.
Subtraction in different fieldsEdit
- Integer subtraction: a - b is equivalent to a + -b, where -b is the additive inverse of b.
- Example: 9 - 8 = 1
- Real number and complex number subtraction:
- Example: 8.2 - (5 + 2i) = 3.2 - 2i
- Matrix subtraction: A - B = A + -B
- Generally, subtraction is not commutative nor associative.
- 3 - 6 ≠ 6 - 3
- But keep in mind that 6-3=3 and 3-6=negative3, so switching the subtahend with the minuend gives the inverse difference.
In real life.Edit
Subtraction is used in real life like addition like in computing change, calculating the amount remaining from a bank account, and many others.
This can be done in the same way as addition.