Class 1 -- Manipulating algebraic expressions I. Algebraic Expressions A. What is an expression? B. Plugging in C. Combining like terms D. Distributing II. Constructing Algebraic Expressions A. Price and "coin" problems B. Interest and rebates C. Distance and speed D. Geometry problems E. Number problems III. Algebraic Equations A. What is an Equation? B. The Addition Principle C. The Multiplication Principle D. Addition and Multiplication Together I. Algebraic Expressions A. What is an expression? Arithmetic is a way of dealing with numbers of known values. Algebra gives us a way of writing down general rules that can be applied to any particular number. The basic idea of algebra is the unknown, a symbol that stands for a number. We use can do everything to the unknown we could do to numbers: add to it, subtract from it, multiply it, divide it, square it, etc. This ability to maniuplate unknown or arbitrary numbers makes algebra a powerful method of solving problems, and of representing relationships in the real world. The basic tool of algebra is the algebraic expression. An algebraic expression just represents a rule for manipulating a number. Consider a basic example: suppose I run a store, and I want to take $5 off the price of each item. How do I do compute the new price? It's easy: I just take the old price and subtract $5. Algebraically, I write this as a recipe: new price = p - 5, where p is the old price. Another example: how do I compute the tax on an item? Suppose there is a 5% tax. The way I compute the tax is a take the price of the item and multiply by 5%: tax = 5% x p = 0.05p. Note two things here: first, it turned the percent into a decimal, i.e. 5% = 0.05. Second, when I wrote the second line, I omitted the times sign. This is an algebra convention: if you have two symbols next to one another, without anything in between, that means to multiply them. Algebraic formulas can also involve more than one quantity. For example, suppose I have a rectangular room and I want to calculate its area, i.e. how many square feet the room it. The way I do this is I take the length of the room and multiply by its width. An algebraic formula for this operation is area = lw, where l is the length and w is the width. B. Plugging in Given an algebraic expression, we can read it as a recipe for how to do a calculation given some numbers. This process is called "plugging in", because we plug a number into our algebraic formula and see what comes out. All we do is replace the variables by the given numbers and evaluate. Here's an example: the formula for the surface area of a sphere is surface area = 4 pi r^2, where r is the radius and pi ~= 3.14. In words, this means to compute the square of the radius, then multiply by 4, then multiply by pi. (Recall that to square something is to multiply it by itself.) Using this rule, I can calculate the total surface area of the Earth. The radius of the earth is about 4000 mi. I square this and get 16 million square miles. Then I multiply by 4 and 64 million. Then I multiply by pi and get about 200 million square miles. An important concept in plugging in is what order to do operations in. For example in the formula for the Earth, I would not have gotten the same answer if I had multiplied by 4 and pi, then squared. Here's a simpler example. Consider two expressions 2x^2 and (2x)^2. The first one means square the number, then multiply by 2, and the second means multiply by 2 and then square. To see those aren't the same, suppose we choose our number to be 5. 2x^2 = 2 (5^2) = 2 (25) = 50 (2x)^2 = (2 . 5)^2 = 10^2 = 100. Obviously not the same! The rule here is parentheses, then exponents, then multiplication/division, then addition/subtraction. A useful mnemonic device for this is "Please excuse my dear Aunt Sally": PEMDAS. Let's practice this. Plug into the following: -- ab + a for a = 3, b = 2 -- a(b+a) for a = 3, b = 2 -- x - y^2 for x = 4, y = 2 -- x + (-y)^2 for x = 4, y = 2 C. Combining Like Terms Evaluating algebraic expressions for given numbers is fine, but it's not necessarily easier than just working with the numbers to begin with. However, one thing that makes algebraic expressions useful is that we can manipulate and simplify them. One way of simplifying algebraic expressions is combining like terms. By "like terms", we mean terms that have the same unknown, the same variable. Consider for example the expression: 3x + 4x What does this mean in English? Notice that 3x just means x plus iteself 3 times, and 4x just means x plus itself four times. Well, if we write that out, it's just x + x + x + x + x + x + x Clearly, a simpler way to write this is just 7x. We can do similar things with any expressions where the variable is the same. However, we can't combine dissimilar variables. Consider, for example: 5x + 3y - 2x - 8y How could we combine like terms here? Note that we can't combine the x and the y terms. They represent different unknowns, and there's no way to write them together as a single term. D. Distribution The opposite of combining like terms is distributing terms. Distribution means breaking up an algebraic expression into simpler pieces. For example, suppose we had the expression 4 (x + y) The 4 gets multiplied by x and y, so we can simplify by writing out the multplication explicitly: 4 (x + y) = 4x + 4y This is called distributing the 4 over the x and y. Often we use distribution in conjunction with combining like terms. For example: 4 (x + y) + 2 (x - y) = 4x + 4y + 2x - 2y = 6x + 2y Here's another example: 3a - 2(a + b) = 3a - 2a - 2b = a - 2b Note a bit of trickiness here: the - sign applies to both the a and the b in the parentheses. You can check that this is necessary by plugging in: for a = 2 and b = 1, 3a - 2(a+b) = 3(2) - 2(2+1) = 6 - 6 = 0 equivalently: a - 2b = 2 - 2(1) = 2 - 2 = 0 On the other hand, if you didn't keep the - sign, you would have said 3a - 2(a+b) = 3a - 2a + 2b = a + 2b so a + 2b = 2 + 2(1) = 2 + 2 = 4 Obviously that's not correct! Here are some practice ones for you: -- simplify 3(x+y) - 2(x + 2y) -- simplify (3a)^2 + a(2a + 1) -- simplify 3 (x - 2(x + 2y)) II. Constructing Algebraic Expressions The trickiest part of algebra is usually constructing algebraic expressions to express a given operation. We can think of this as a problem of translation. Given a certain operation in English, what is the translation into algebra. Like translating languages this is something of an art, and it requires finesse. There are no absolute rules. The only thing to do is practice a lot, in a lot of situations. A. Price and "coin" problems One common situation where one has to come up with algebraic expressions is in situtations involving prices. Here's an example: Sodas cost $1.50 each, and slices of pizza are $2.50 each. Write an algebraic expression for the total cost of pizza and sodas. The solution is cost = 1.50s + 2.50p, where s = number of sodas bought and p = number of slices of pizza. Here's another example: I have $20 and I buy some coffee for me and my friends. Each cup of coffee is $1.25. How much money do I have left? The answer is 20 - 1.25c, where c is how many cups of coffee I buy. A closely related type of problem is a "coin" problem: a problem involving items of different value. For example: what is the total value of d dimes and n nickels? Example: A case of soda contains 12 cans. Write an algebraic expression for the number of cans. B. Interest and rebates Closely related to price problem are interest and rebate problems, which involve computing percentages of amounts of money. An example: A bank account earns 3% interest per year. Write an expression for the amount of interest an account containing d dollars earns. The solution is 0.03d. Note that we have converted the percent into a decimal, which we always do in writing algebraic expressions. Here's a tricky, closely related problem: a bank account earns 3% interest per year. How much money in total will it contain at the end of the year? The solution is 1.03d. One way to see this is to note that the amount it contains will be equal to the amount originally deposited (called the principle) plus the interest. Thus we have d + 0.03d, which is 1.03d following the rules we just learned. Practice example: I have a bank account containing b dollars that earns 2% interest and a savings bond for s dollars that earns 5% interest. How much money do I have a year later? A rebate problem is quite similar. For example, what is the cost of an item whose original price is p if it is sold for 10% off? The solution is 0.9p. To see why, think of this as the reverse of the interest problem. The discount is 10% of the original price or 0.1p. The price you have to pay is the original price minus the discount: p - 0.1p = 0.9p. Practice example: a store is selling shirts for 5% off and pants for 15% off. What is the total price of a purchase of shirts with an original price of s dollars and pants with an original price of p dollars? Tricky example: a store is selling shirts for p percent off. What is the price of shirts with an orignal total price of $100? $200? C. Distance and speed Another example where algebraic expressions come up is with distances and times. Here's a simple example: a car is going 60 mph. How far does it travel in h hours? This can be phrased in different ways, depending on what is given. A related problem, for example, is: a car is going 60 mph. How long does it take to travel m miles? These can get more complicated, of course, but the general rule is that distance = rate x time, or time = distance / rate. Some examples: -- A plane is traveling at 500 mph. How long does it take to travel m miles? -- A plane is traveling at 500 mph and is making a 5000 mile trip. How far has it gone after h hours? How much distance does it have left to go? D. Geometry problems Yet another example is problems involving geometry, and geometric formulas for area, perimeter, and things like that. An example is: the area of a triangle is half the base time the height. Write an algebraic expression for the area. Practice examples: -- A rectangular fence is twice as long as it is wide. If its width is w, what is its total length? -- A farmer has 500 feet of fencing, and is using it to make a square enclosure. If the enclosure is s feet on a side, how many feet of fencing does the farmer have left? -- A farmer is building a square enclosure s feet on a side, and fencing costs $2.50 per foot. How much does it cost to make an enclosure of a given side length? E. Number problems Finally, algebraic expressions can be given purely as operations on numbers. Here are some examples: -- Add 2, double the result, then subtract 4 -- Divide by 5, subtract 2 from the result, then multiply by 3 -- Subtract 1, square the result, then add 1 III. Solving Basic Equations A. What is an equation? One particularly useful trick to do with algebraic expressions is to set them equal to something. The result is called an equation. Here's an example of what I mean. The area of a square is just the square of the length of one of its side. What is the side length of a square that is 25 square feet? The formula for the area of a square is area = s^2, where s is the length of a side. Thus we have an equation: s^2 = 25 square feet. The solution to the equation is the value of s that makes the statement true. In this case, clearly s = 5 feet. Here's another example. A store is selling shirts for 10% off. What as the original price of a shirt for which this discount is $5? The formula for the discount is 0.1p, where p is the original price, so we have an equation 0.1p = 5. The solution is p = $50. The simplest sorts of equations involve only one variable, and no operations other than addition, subtraction, multiplication, and division. These are called linear equations in one variable. We can solve all such equations using two simple rules. B. Addition Principle Let's consider a simple english statement: "Some number decreased by eight is thirteen" (on board) What's that in algebra? (have class answer) It's "x - 8 = 13" (on board) We can look at this and just guess the answer, but I want to show you a formal trick to deal with equations that look like this. The neat thing is that, with an equation, I can add or subtract anything I want to one side -- as long as I also do it to the other. What I mean by this is that if I have the equation "1 = 1" (on the board), I can also get a true equation by adding two to both sides: "1 + 2 = 1 + 2" (on board). Adding the same thing to both sides leaves a true equation true. This is called the "addition principle". So, with "x - 8 = 13", suppose I add eight to both sides: (on board) x - 8 = 13 (on board) +8 +8 ---------- x = 21 Notice that the plus eight cancels out the minus eight! I'm left with an equation that is just the variable by itself -- so it's obvious here that x is 21. We can see a principle here: if we want to figure out what the variable is, we want to get the variable by itself on one side of the equation. To do that, we can add or subtract to cancel out whatever is with the variable. Thus, if I had "x + 3 = -9" (on board), what would I do to both sides to get the x by itself (have class answer). I would just subtract 3 from both sides: x + 3 = -9 (on board) -3 -3 ----------- x = -12 Again, I immediately know what x is. B. Multiplication Principle The addition principle allows us to "undo" addition to or subtraction from the variable, so that we can get the variable by itself. Is there a similar principle for multiplication/division? Yes! If we take the equation "2 = 2", note that we can multiply both sides by, for example, 1/3. 2 . 1/3 = 2 . 1/3 (on board) 2/3 = 2/3 Thus, multiplying both sides of a true equation by the same number generates another true equation. This is called the multiplication principle. OK, now let's try applying it to variables. Consider "4x = 32" (on board). Suppose I multiply both sides by 1/4: 1/4 . 4x = 1/4 . 32 (on board) x = 8 Just as we did with addition, we've cancelled out the 4 that was multiplying the x and gotten x by itself. To get rid of a multipication by four, I divide by four, or, equivalently, multiply by one fourth. Suppose I had "-6x = 15" (on board) Here my x is multiplied by -6. What should I do to get x by itself? (let class answer) Right: I multiply by -1/6, or divide by -6. Notice that I need to multiply or divide the -6 by another negative to leave behind a positive x. (-1/6) . -6x = (-1/6) . 15 x = -15/6 = -5/2 So we've got x again. C. Addition and Multiplication Together The final step is to combine these two principles. Consider the equation "3x + 8 = 17" (on board). We want to figure out x, so we need to get x by itself. In this equation, x is both muliplied by 3 and added to 8. We need to undo both, but which first? We can be guided by the order of operations. If we look at "3x + 8", the order of operations tells us that we would do the multiply first, then the addition. To undo these, we need to work in reverse order, so we undo the addition first, and then the multiplication. So how do we undo the addition? (let class answer) We subtract 8 from both sides: 3x + 8 = 17 - 8 -8 ----------- 3x = 9 OK, now we've got just multiplication. So let's undo that. What should we do to both sides? (let class answer) We divide both sides by 3, or multiply them by 1/3: 1/3 . 3x = 1/3 . 9 x = 3 And thus we have the answer. We can check to make sure this is right by plugging in to the original equation: "3x + 8 = 17". If we plug in a 3 for x, we get: 3x + 8 = 17 3(3) + 8 = 17 9 + 8 = 17 17 = 17 So this checks out, which means that 3 really is the right value for x.