Arithmetic/Number Operations/Subtraction



Subtraction is one of the four basic operations of arithmetic. The operation is usually shown by the minus symbol (-). This is the act of taking a number and taking away a certain amount of it. Think of it as the opposite of addition, an operation where a number is combined with another to form a resulting sum. For example, the following equation:
 * $$5 - 1 = 4$$

This means, "Taking away one from five gives us four", or put more simply, "Five minus one equals four." In this example, the 5 is the subtrahend, the number being subtracted; the 1 is the minuend, the number it is subtracted from; and the 4 is the difference, the result of the subtraction.

Non-Commutativity
Unlike addition, the order in which two numbers are subtracted does matter. In other words, unless the subtrahend and minuend are equal to each other, they are distinct elements when subtracting and cannot be switched order wise. For example, the two equations end up with different results.
 * $$ 5 - 2 = 3 $$
 * $$ 2 - 5 = -3 $$

Here is another example using numbers with decimals.
 * $$ 4.3 - 1.2 = 3.1 $$
 * $$ 1.2 - 4.3 = -3.1 $$

Notice how the difference of the original expression is negative of the difference of the flipped expression. This is a specific type of non-commutativity known as anticommutativity. For any numbers $$x$$ and $$y$$,
 * $$ x - y = -(y - x) $$

Non-Associativity
Unlike addition, when subtracting multiple numbers, the order in which you subtract the numbers matters. Subtracting numbers in different orders may, and likely will, result in different differences. For example, the two equations will not end up with the same result if the order of which you subtract is different, even if the expression itself is the same.


 * $$(1 - 2) - 3 = -1 - 3 = -4$$
 * $$1 - (2 - 3) = 1 - (-1) = 1 + 1 = 2$$