Game Development Reference
In-Depth Information
them together. How you associate them depends on the type of operations you
perform with them. The associative property applies to addition and multi-
plication. Consider these equations:
a þðb þ cÞ¼ða þ bÞþc
3 þð 5 þ 7 Þ¼ð 3 þ 5 Þþ 7
3 þð 12 Þ¼ð 8 Þþ 7
15 ¼ 15
When you add 3 to the sum of 5 and 7, you obtain the same result as when you
add the sum of 3 and 5 to 7. The difference is in the order of operations. The
associative property allows you to alter the way that you group items in an
expression as you reduce or solve the expression.
Distributive Property
Distribution allows you to reorganize the terms of an expression so that you can
more easily work with them. This property applies to addition and multi-
plication. Consider the following equations:
bða cÞ¼bðaÞbðcÞ
5 ð 8 3 Þ¼ 5 ð 8 Þ 5 ð 3 Þ
5 ð 5 Þ¼ 40 15
25 ¼ 25
In this instance, you can solve the problem in two different ways. What the
distributive property enables is for you to distribute the multiplication activity so
that you multiply 8 by 5 and then 3 by 5. Alternatively, you could just as easily
subtract 3 from 8 and multiply the result by 5.
Now consider the following expression:
3 ðx þ 2 Þ
In this expression, note that you may not just add 2 to x because you do not know
the value of x. However, you may distribute the 3. Here is how you would apply
Search WWH ::




Custom Search