16 CHAPTER 1. THE ARITHMETIC OF NUMBERS 1.2 Order of Operations The order in which we evaluate expressions can be ambiguous. Take, for example, the expression −4 + 2 · 8. If we perform the addition first, then we get −16 as a result (the question mark over the equal sign indicates that the result is questionable). ? −4 + 2 · 8 = −2 · 8 ? = −16. On the other hand, if we perform the multiplication first, then we get 12 as a result. ? −4 + 2 · 8 = −4 + 16 ? = 12. So, what are we to do? Of course, grouping symbols would remove the ambiguity. Grouping Symbols. Parentheses, brackets, and absolute value bars can be used to group parts of an expression. For example: 3 + 5(9 − 11) or − 2 − [−2 − 5(1 − 3)] or 6 − 3| − 3 − 4| In each case, the rule is “evaluate the expression inside the grouping symbols first.” If the grouping symbols are nested, evaluate the expression in the innermost pair of grouping symbols first. Thus, if the example above is grouped as follows, we are forced to evaluate the expression inside the parentheses first. (−4 + 2) · 8 = −2 · 8 = −16 Parentheses first: −4 + 2 = −2 Multiply: −2 · 8 = −16 Another way to avoid ambiguities in evaluating expressions is to establish an order in which operations should be performed. The following guidelines should always be strictly enforced when evaluating expressions. Rules Guiding Order of Operations. When evaluating expressions, proceed in the following order. 1. Evaluate expressions contained in grouping symbols first. If grouping symbols are nested, evaluate the expression in the innermost pair of grouping symbols first. 17 1.2. ORDER OF OPERATIONS 2. Evaluate all exponents that appear in the expression. 3. Perform all multiplications and divisions in the order that they appear in the expression, moving left to right. 4. Perform all additions and subtractions in the order that they appear in the expression, moving left to right. You Try It! EXAMPLE 1. Simplify: −3 − 4 · 8 Simplify: −4 + 2 · 8 Solution: Because of the established Rules Guiding Order of Operations, this expression is no longer ambiguous. There are no grouping symbols or exponents present, so we immediately go to rule three, evaluate all multiplications and divisions in the order that they appear, moving left to right. After that we invoke rule four, performing all additions and subtractions in the order that they appear, moving left to right. −3 − 4 · 8 = −3 − 32 Multiply first: 4 · 8 = 32 = −3 + (−32) Add the opposite. = −35 Add: −3 + (−32) = −35 Thus, −3 − 4 · 8 = −35. Answer: 12 Writing Mathematics. When simplifying expressions, observe the following rule to neatly arrange your work: One equal sign per line. This means that you should not arrange your work horizontally. −2 − 4 · (−8) = −2 − (−32) = −2 + 32 = 30 That’s three equal signs on a single line. Rather, arrange your work vertically, keeping equal signs aligned in a column. −2 − 4 · (−8) = −2 − (−32) = −2 + 32 = 30 18 CHAPTER 1. THE ARITHMETIC OF NUMBERS You Try It! Simplify: −24/(−3)(2) EXAMPLE 2. Simplify: 54/(−9)(2) Solution: There are no grouping symbols or exponents present, so we immediately go to rule three, evaluate all multiplications and divisions in the order that they appear, moving left to right. 54/(−9)(2) = −6(2) Divide first: 54/(−9) = −6 = −12 Answer: 16 Multiply: −6(2) = −12 Thus, 54/(−9)(2) = −12. Example 2 can be a source of confusion for many readers. Note that multiplication takes no preference over division, nor does division take preference over multiplication. Multiplications and divisions have the same level of preference and must be performed in the order that they occur, moving from left to right. If not, the wrong answer will be obtained. Warning! Here is what happens if you perform the multiplication in Example 2 before the division. 54/(−9)(2) = 54/(−18) = −3 Multiply: (−9)(2) = −18 Divide: 54/(−18) = −3 This is incorrect! Multiplications and divisions must be performed in the order that they occur, moving from left to right. You Try It! Simplify: −152 EXAMPLE 3. Simplify: (a) (−7)2 and (b) −72 Solution. Recall that for any integer a, we have (−1)a = −a. Because negating is equivalent to multiplying by −1, the Rules Guiding Order of Operations require that we address grouping symbols and exponents before negation. a) Because of the grouping symbols, we negate first, then square. That is, (−7)2 = (−7)(−7) = 49. b) There are no grouping symbols in this example. Thus, we must square first, then negate. That is, −72 = −(7 · 7) = −49. Answer: −225 Thus, (−7)2 = 49, but −72 = −49. Note: This example demonstrates that (−7)2 is different from −72 . 19 1.2. ORDER OF OPERATIONS Let’s try an example that has a mixture of exponents, multiplication, and subtraction. You Try It! EXAMPLE 4. Simplify: −3 − 2(−4)2 Simplify: −5 − 4(−2)3 Solution. The Rules Guiding Order of Operations require that we address exponents first, then multiplications, then subtractions. −3 − 2(−4)2 = −3 − 2(16) Exponent first: (−4)2 = 16 = −3 − 32 Multiply: 2(16) = 32 = −3 + (−32) = −35 Add the opposite. Add: −3 + (−32) = −35 Thus, −3 − 2(−4)2 = −35. Answer: 27 Grouping Symbols The Rules Guiding Order of Operations require that expressions inside grouping symbols (parentheses, brackets, or curly braces) be evaluated first. You Try It! EXAMPLE 5. Simplify: −2(3 − 4)2 + 5(1 − 2)3 Simplify: −2 − 3(−2 − 3)3 Solution. The Rules Guiding Order of Operations require that we first evaluate the expressions contained inside the grouping symbols. −2(3 − 4)2 + 5(1 − 2)3 = −2(3 + (−4))2 + 5(1 + (−2))3 2 3 = −2(−1) + 5(−1) Add the opposites. Parentheses first: 3 + (−4) = −1 and 1 + (−2) = −1. Evaluate the exponents next, perform the multiplications, then add. = −2(1) + 5(−1) = −2 + (−5) = −7 Thus, −2(3 − 4)2 + 5(1 − 2)3 = −7. Exponents: (−1)2 = 1 and (−1)3 = −1. Multiply: −2(1) = −2 and 5(−1) = −5. Add: −2 + (−5) = −7 Answer: 373 20 CHAPTER 1. THE ARITHMETIC OF NUMBERS Absolute Value Bars as Grouping Symbols Like parentheses and brackets, you must evaluate what is inside them first, then take the absolute value of the result. You Try It! Simplify: −| − 4 − 6| EXAMPLE 6. Simplify: −8 − |5 − 11| Solution. We must first evaluate what is inside the absolute value bars. −8 − |5 − 11| = −8 − |5 + (−11)| = −8 − | − 6| Add the opposite. Add: 5 + (−11) = −6. The number −6 is 6 units from zero on the number line. Hence, | − 6| = 6. Answer: −10 = −8 − 6 = −8 + (−6) Add: | − 6| = 6. Add the opposite. = −14 Add. Thus, −8 − |5 − 11| = −14. Nested Grouping Symbols When grouping symbols are nested, the Rules Guiding Order of Operations tell us to evaluate the innermost expressions first. You Try It! Simplify: −2 − 2[−2 − 2(−2 − 2)] EXAMPLE 7. Simplify: −3 − 4[−3 − 4(−3 − 4)] Solution. The Rules Guiding Order of Operations require that we first address the expression contained in the innermost grouping symbols. That is, we evaluate the expression contained inside the brackets first. −3 − 4[−3 − 4(−3 − 4)] = −3 − 4[−3 − 4(−3 + (−4))] Add the opposite. = −3 − 4[−3 − 4(−7)] Add: −3 + (−4) = −7 Next, we evaluate the expression contained inside the brackets. = −3 − 4[−3 − (−28)] = −3 − 4[−3 + 28] Multiply: 4(−7) = −28 Add the opposite. = −3 − 4[25] Add: −3 + 28 = 25 Now we multiply, then subtract. 21 1.2. ORDER OF OPERATIONS = −3 − 100 Multiply: 4{25} = 100 = −3 + (−100) = −103 Add the opposite. Add: −3 + (−100) = −103 Thus, −3 − 4[−3 − 4(−3 − 4)] = −103. Answer: −14 Evaluating Algebraic Expressions Variable. A variable is a symbol (usually a letter) that stands for an unknown value that may vary. Let’s add the definition of an algebraic expression. Algebraic Expression. When we combine numbers and variables in a valid way, using operations such as addition, subtraction, multiplication, division, exponentiation, the resulting combination of mathematical symbols is called an algebraic expression. Thus, 2a, x + 5, and y2, being formed by a combination of numbers, variables, and mathematical operators, are valid algebraic expressions. An algebraic expression must be well-formed. For example, 2 + −5x is not a valid expression because there is no term following the plus sign (it is not valid to write +− with nothing between these operators). Similarly, 2 + 3(2 is not well-formed because parentheses are not balanced. In this section we will evaluate algebraic expressions for given values of the variables contained in the expressions. Here are some simple tips to help you be successful. Tips for Evaluating Algebraic Expressions. 22 CHAPTER 1. THE ARITHMETIC OF NUMBERS 1. Replace all occurrences of variables in the expression with open parentheses. Leave room between the parentheses to substitute the given value of the variable. 2. Substitute the given values of variables in the open parentheses prepared in the first step. 3. Evaluate the resulting expression according to the Rules Guiding Order of Operations. You Try It! If x = −2 and y = −1, evaluate x3 − y 3 . EXAMPLE 8. Evaluate the expression x2 − 2xy + y 2 at x = −3 and y = 2. Solution. Following Tips for Evaluating Algebraic Expressions, first replace all occurrences of variables in the expression x2 − 2xy + y 2 with open parentheses. Next, substitute the given values of variables (−3 for x and 2 for y) in the open parentheses. x2 − 2xy + y 2 = ( )2 − 2( )( ) + ( )2 = (−3)2 − 2(−3)(2) + (2)2 Finally, follow the Rules Guiding Order of Operations to evaluate the resulting expression. x2 − 2xy + y 2 Original expression. 2 Replace variables with parentheses. 2 = (−3) − 2(−3)(2) + (2) Substitute −3 for x and 2 for y. = 9 − 2(−3)(2) + 4 = 9 − (−6)(2) + 4 Evaluate exponents first. Left to right, multiply: 2(−3) = −6 = 9 − (−12) + 4 Left to right, multiply: (−6)(2) = −12 = 9 + 12 + 4 = 25 Add the opposite. Add. =( 2 ) − 2( )( ) + ( ) 2 Answer: −7 Thus, if x = −3 and y = 2, then x2 − 2xy + y 2 = 25. Evaluating Fractions If a fraction bar is present, evaluate the numerator and denominator separately according to the Rules Guiding Order of Operations, then perform the division in the final step. 23 1.2. ORDER OF OPERATIONS You Try It! EXAMPLE 9. Evaluate the expression ad − bc a+b at a = 5, b = −3, c = 2, and d = −4. If a = −7, b = −3, c = −15, and d = −14, evaluate: a2 + b 2 c+d Solution. Following Tips for Evaluating Algebraic Expressions, first replace all occurrences of variables in the expression (ad − bc)/(a + b) with open parentheses. Next, substitute the given values of variables (5 for a, −3 for b, 2 for c, and −4 for d) in the open parentheses. ( )( ) − ( )( ) ad − bc = a+b ( )+( ) (5)(−4) − (−3)(2) = (5) + (−3) Finally, follow the Rules Guiding Order of Operations to evaluate the resulting expression. Note that we evaluate the expressions in the numerator and denominator separately, then divide. ad − bc ( )( ) − ( )( ) = a+b ( )+( ) (5)(−4) − (−3)(2) = (5) + (−3) −20 − (−6) = 2 −20 + 6 2 −14 = 2 = −7 = Replace variables with parentheses. Substitute: 5 for a, −3 for b, 2 for c, −4 for d Numerator: (5)(−4) = −20, (−3)(2) = −6 Denominator: 5 + (−3) = 2 Numerator: Add the opposite Numerator: −20 + 6 = −14 Divide. Thus, if a = 5, b = −3, c = 2, and d = −4, then (ad − bc)/(a + b) = −7. Answer: −2 Using the Graphing Calculator The graphing calculator is a splendid tool for evaluating algebraic expressions, particularly when the numbers involved are large. 24 CHAPTER 1. THE ARITHMETIC OF NUMBERS You Try It! Use the graphing calculator to evaluate −2 − 2[−2 − 2(−2 − 2)]. EXAMPLE 10. Use the graphing calculator to simplify the following expression. −213 − 35[−18 − 211(15 − 223)] Solution. The first difficulty with this expression is the fact that the graphing calculator does not have a bracket symbol for the purposes of grouping. The calculator has only parentheses for grouping. So we first convert our expression to the following: −213 − 35(−18 − 211(15 − 223)) Note that brackets and parentheses are completely interchangeable. The next difficulty is determining which of the minus signs are negation symbols and which are subtraction symbols. If the minus sign does not appear between two numbers, it is a negation symbol. If the minus sign does appear between two numbers, it is a subtraction symbol. Hence, we enter the following keystrokes on our calculator. The result is shown in Figure 1.8. (-) 2 1 3 − 3 5 × ( (-) 1 8 − 1 1 × ( 1 5 − 2 2 3 ) ) ENTER 2 Figure 1.8: Calculating −213 − 35[−18 − 211(15 − 223)]. Answer: −14 Thus, −213 − 35[−18 − 211(15 − 223)] = −1, 535, 663. You Try It! Use the graphing calculator to evaluate 10 + 10 10 + 10 EXAMPLE 11. Use the graphing calculator to evaluate 5+5 5+5 . 25 1.2. ORDER OF OPERATIONS Solution. You might ask “Why do we need a calculator to evaluate this exceedingly simple expression?” After all, it’s very easy to compute. 5+5 10 = 5+5 10 =1 Simplify numerator and denominator. Divide: 10/10 = 1. Well, let’s enter the expression 5+5/5+5 in the calculator and see how well we understand the Rules Guiding Order of Operations (see first image in Figure 1.9). Whoa! How did the calculator get 11? The answer is supposed to be 1! Let’s slow down and apply the Rules Guiding Order of Operations to the expression 5+5/5+5. 5 + 5/5 + 5 = 5 + 5 +5 5 Divide first. 5 = 1. 5 Add: 5 + 1 + 5 = 11. =5+1+5 Divide: = 11 Aha! That’s how the calculator got 11. 5 + 5/5 + 5 is equivalent to 5+ 5 +5 5 Let’s change the order of evaluation by using grouping symbols. Note that: Parentheses first. Divide: 10/10 = 1. (5 + 5)/(5 + 5) = 10/10 =1 That is: 5+5 5+5 Enter (5+5)(5+5) and press the ENTER key to produce the output shown in the second image in Figure 1.9. (5 + 5)/(5 + 5) is equivalent to Figure 1.9: Calculating 5+5 . 5+5 Answer: 1 26 CHAPTER 1. THE ARITHMETIC OF NUMBERS The graphing calculator has memory locations available for “storing” values. They are lettered A-Z and appear on the calculator case, in alphabetic order as you move from left to right and down the keyboard. Storing values in these memory locations is an efficient way to evaluate algebraic expressions containing variables. Use the ALPHA key to access these memory locations. You Try It! Use the graphing calculator to evaluate |a − b| at a = −312 and b = −875. EXAMPLE 12. Use the graphing calculator to evaluate |a| − |b| at a = −312 and b = −875. Solution. First store −312 in the variable A with the following keystrokes. To select the letter A, press the ALPHA key, then the MATH key, located in the upper left-hand corner of the calculator (see Figure 1.10). (-) 3 1 2 STO. ALPHA A ENTER Next, store −875 in the variable B with the following keystrokes. To select the letter B, press the ALPHA key, then the APPS key. (-) Figure 1.10: Upper half of the TI84. 8 7 5 STO. ALPHA B ENTER The results of these keystrokes are shown in the first image in Figure 1.11. Now we need to enter the expression |a| − |b|. The absolute value function is located in the MATH menu. When you press the MATH key, you’ll notice submenus MATH, NUM, CPX, and PRB across the top row of the MATH menu. Use the right-arrow key to select the NUM submenu (see the second image in Figure 1.11). Note that abs( is the first entry on this menu. This is the absolute value function needed for this example. Enter the expression abs(A)-abs(B) as shown in the third image in Figure 1.11. Use the ALPHA key as described above to enter the variables A and B and close the parentheses using the right parentheses key from the keyboard. Press the ENTER key to evaluate your expression. Figure 1.11: Evaluate |a| − |b| at a = −312 and b = −875. Answer: 563 Thus, |a| − |b| = −563. 27 1.2. ORDER OF OPERATIONS ❧ ❧ ❧ Exercises ❧ ❧ ❧ In Exercises 1-18, simplify the given expression. 1. −12 + 6(−4) 10. −(−30) 2. 11 + 11(7) 11. −35 3. −(−2)5 12. −32 4. −(−5)3 13. 48 ÷ 4(6) 5. −| − 40| 14. 96 ÷ 6(4) 6. −| − 42| 15. −52 − 8(−8) 7. −24/(−6)(−1) 16. −8 − 7(−3) 8. 45/(−3)(3) 17. (−2)4 9. −(−50) 18. (−4)4 In Exercises 19-42, simplify the given expression. 19. 9 − 3(2)2 31. −6 − 5(4 − 6) 20. −4 − 4(2)2 32. −5 − 5(−7 − 7) 21. 17 − 10|13 − 14| 33. 9 + (9 − 6)3 − 5 22. 18 − 3| − 20 − 5| 34. 12 + (8 − 3)3 − 6 23. −4 + 5(−4)3 35. −5 + 3(4)2 24. 3 + 3(−4)3 36. 2 + 3(2)2 25. 8 + 5(−1 − 6) 37. 8 − (5 − 2)3 + 6 26. 8 + 4(−5 − 5) 38. 9 − (12 − 11)2 + 4 27. (10 − 8)2 − (7 − 5)3 39. |6 − 15| − | − 17 − 11| 28. (8 − 10)2 − (4 − 5)3 40. | − 18 − 19| − | − 3 − 12| 29. 6 − 9(6 − 4(9 − 7)) 41. 5 − 5(5 − 6(6 − 4)) 30. 4 − 3(3 − 5(7 − 2)) 42. 4 − 6(4 − 7(8 − 5)) 28 CHAPTER 1. THE ARITHMETIC OF NUMBERS In Exercises 43-58, evaluate the expression at the given values of x and y. 43. 4x2 + 3xy + 4y 2 at x = −3 and y = 0 51. −2x2 + 2y 2 at x = 1 and y = −2 44. 3x2 − 3xy + 2y 2 at x = 4 and y = −3 52. −5x2 + 5y 2 at x = −4 and y = 0 45. −8x + 9 at x = −9 53. −3x2 − 6x + 3 at x = 2 46. −12x + 10 at x = 2 54. −7x2 + 9x + 5 at x = −7 47. −5x2 + 2xy − 4y 2 at x = 5 and y = 0 55. −6x − 1 at x = 1 2 2 48. 3x + 3xy − 5y at x = 0 and y = 3 56. 10x + 7 at x = 9 49. 3x2 + 3x − 4 at x = 5 57. 3x2 − 2y 2 at x = −3 and y = −2 50. 2x2 + 6x − 5 at x = 6 58. −3x2 + 2y 2 at x = 2 and y = 2 59. Evaluate 62. Evaluate 60. Evaluate 63. Evaluate 61. Evaluate 64. Evaluate a2 + b 2 a+b at a = 27 and b = −30. a2 + b 2 a+b at a = −63 and b = 77. a+b c−d at a = −42, b = 25, c = 26, and d = 43. a+b c−d at a = 38, b = 42, c = 10, and d = 50. a−b cd at a = −7, b = 48, c = 5, and d = 11. a−b cd at a = −46, b = 46, c = 23, and d = 2. 65. Evaluate the expressions a2 + b2 and (a + b)2 at a = 3 and b = 4. Do the expressions produce the same results? 66. Evaluate the expressions a2 b2 and (ab)2 at a = 3 and b = 4. Do the expressions produce the same results? 67. Evaluate the expressions |a||b| and |ab| at a = −3 and b = 5. Do the expressions produce the same results? 68. Evaluate the expressions |a| + |b| and |a + b| at a = −3 and b = 5. Do the expressions produce the same results? 29 1.2. ORDER OF OPERATIONS In Exercises 69-72, use a graphing calculator to evaluate the given expression. 69. −236 − 324(−576 + 57) 70. −443 + 27(−414 − 22) 270 − 900 300 − 174 3000 − 952 72. 144 − 400 71. a2 + b 2 at a = −93 and b = 84 by first storing a+b −93 in the variable A and 84 in the variable B, then entering the expression (A^2+B^2)/(A+B). 73. Use a graphing calculator to evaluate the expression a2 + b 2 at a = −76 and b = 77 by first storing a+b −76 in the variable A and 77 in the variable B, then entering the expression (A^2+B^2)/(A+B). 74. Use a graphing calculator to evaluate the expression 75. The formula the formula 9 C + 32 5 will change a Celsius temperature to a Fahrenheit temperature. Given that the Celsius temperature is C = 60◦ C, find the equivalent Fahrenheit temperature. F = 76. The surface area of a cardboard box is given by the formula S = 2W H + 2LH + 2LW, where W and L are the width and length of the base of the box and H is its height. If W = 2 centimeters, L = 8 centimeters, and H = 2 centimeters, find the surface area of the box. 77. The kinetic energy (in joules) of an object having mass m (in kilograms) and velocity v (in meters per second) is given by K= 1 mv 2 . 2 Given that the mass of the object is m = 7 kilograms and its velocity is v = 50 meters per second, calculate the kinetic energy of the object. 78. The area of a trapezoid is given by the formula A= 1 (b1 + b2 ) h, 2 where b1 and b2 are the lengths of the parallel bases and h is the height of the trapezoid. If the lengths of the bases are 21 yards and 11 yards, respectively, and if the height is 22 yards, find the area of the trapezoid. 30 CHAPTER 1. THE ARITHMETIC OF NUMBERS ❧ ❧ ❧ Answers ❧ ❧ ❧ 1. −36 41. 40 3. 32 43. 36 5. −40 45. 81 7. −4 47. −125 9. 50 49. 86 11. −243 13. 72 15. 12 17. 16 19. −3 21. 7 23. −324 51. 6 53. −21 55. −7 57. 19 59. −543 61. 1 63. −1 25. −27 65. No. 27. −4 67. Yes. 29. 24 69. 167920 31. 4 71. −5 33. 31 35. 43 37. −13 39. −19 73. −1745 75. 140◦ F 77. 8750 joules