Class 2 -- Algebra basics 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 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