* Errors fixed Many errors fixed and tried to clarify many points (grammar/exposition) * fix: removed colon in title key value
4.7 KiB
title
title |
---|
Basic Number Properties - Associative, Commutative, and Distributive |
Basic Number Properties: Associative, Commutative, and Distributive
Among other things everyday numbers possess, these are 3 basic properties.
These properties play an important role in more advanced mathematics. Textbooks generally don't discuss them in detail until this point because all number systems used through high school have these properties.
When studying advanced mathematics, the importance of these properties becomes clear, e.g., in abstract algebra the importance and effect of each of these properties is studied.
Associativity
If an operation (e.g. +, -, ×, /) is associative it means the result will remain the same regardless of the order of operands. In other words, using parentheses to group the operations has no effect.
For example, with addition (3 + 4) + 5 = 3 + (4 + 5) 12 = 12
Note:
When working with real numbers
- Addition and multiplication are associative. In other words, for any real numbers
a, b
andc
we have
(a + b) + c = a + (b + c)
(a*b)*c = a*(b*c)
and so we do not need parentheses, writing a + b + c
and a*b*c
is unambiguous.
- Subtraction and division are not. For simple examples,
(1 - 1) - 1 = -1 whereas 1 - (1 - 1) = 1.
(1/2)/3 = 1/6 whereas 1/(2/3) = 3/2
Commutativity
If an operation (e.g. +, -, ×, /) is commutative it means the result will remain the same regardless of the order in which the operands are evaluated.
For example, consider addition again 3 + 4 = 4 + 3 7 = 7
Note:
When working with real numbers
- Addition and multiplication are commutative. Again, if we have real numbers
a
andb
, then
a + b = b + a,
a*b = b*a
which is why we can work from left to right when evaluating an expression (following the order of operations!).
- Subtraction and division almost never commutative as, for example
1 - 0 = 1 whereas 0 - 1 = -1
0/1 = 0 whereas 1/0 is not defined!
Distributivity
Distributivity is not a property a single operation possesses, but instead a property that one operation has over another. For example, with real numbers, multiplication distributes over addition because for any real a, b
and c
we have
a*(b + c) = a*b + a*c,
(b + c)*a = b*a + c*a.
(Since multiplication is commutative the two expressions above are the same, but in general an operation being distributive over another requires checking both, e.g., see division below.) For example,
3 × (4 + 5) = 3 × 9 = 27, 3 × 4 + 3 × 5 = 12 + 15 = 27
Note
- Multiplication is distributive over addtion and subtraction, but division is neither. Indeed, we see
(a + b)/c = a/c + b/c,
but a/(b + c)
is almost never equal to a/b + a/c
. For example, consider b = -c
non-zero. Then a/b + a/c
is a number, while a/(b + c)
is not defined!
Additional notes
To get a taste of why studying objects with these properties may be more valuable than they appear in the simple examples above, consider the following:
- The greatest common divisor (and least common multiple) functions are associatve and commutative, e.g.,
gcd(gcd(a, b), c) = gcd(a, gcd(b, c)),
gcd(a, b) = gcd(b, a)
- Matrix multiplication is both associative and distributive (over matrix addition), but not commutative.
- Addition and multiplication (as above) for the natural numbers, integers, real numbers, complex numbers, and (set of all) polynomials (with integer, real and complex coefficients) are associative, commutative and distributive as discussed above.
- Cryptography and information security studies uses objects with similar addition and multiplication to those above its the associativity, commutativity and distributivity (as well as other properties) that gives the structure needed to allow modern crytographic algorithms to work.
- The quaternions are not commutative with respect to multiplication.
- In the (modern) cryptography example above, you can put a remarkable operation on points of elliptic curves to "add" them, and it is both associative and commutative.