Class 3 Notes I. The Cartesian Coordinate System A. Plotting Points (10) B. Finding Distances (10) C. Finding Midpoints (5) D. Group Work Practice (25) II. Lines A. Graphing a Line (15) B. Slopes and Intercepts (10) C. Intercepts (10) D. Slope-Intercept Form (10) E. Word Problems (10) F. Group Work Practice (30) I. The Cartesian Coordinate System Last we we learned how to graph an inequality in one variable, something like "x<5". That's one use for graphing, but a far more powerful application is as a way of representing a relationship between quantities. That's what we're going to talk about today: graphs. We're going to spend the next two weeks talking about lines and their graphs. A. Plotting Points (10) Before we begin graphing lines, we need to set up what is called a coordinate system. A coordinate system is nothing more than a way of naming locations. For example, the system of naming a point on the Earth by giving a longitude and a latitude is a coordinate system. The simplest coordinate system we can use is called Cartesian coordinates, after Rene Descartes, the French mathematician and philosopher who invented it. (He's the same guy who said "I think therefore I am.") In this class we're going to work in two dimensions -- in other words, on the surface of a sheet of paper. However, the Cartesian coordinates we're going to learn about can be extended in a rather straightforward manner to three or even more dimensions. To set up a Cartesian coordinate system, the first thing we do is pick a point called the origin. (Draw a point on the board) Through this origin, we draw two number lines perpendicular to each other, on horizontal and one vertical. (Draw on board) The horizontal line we call the "x axis" and the vertical line we call the "y axis". (Write labels on the board). To give the position of any point, we see where it lines up with the horizontal line. The value it lines up with we call the x coordinate. Consider this point. (Draw the point (2,3)) As you can see, this point, lines up with 2 on the x axis, so we say that its x coordinate is 2. Similarly, we can line the point up with the vertical line, and see that it lines up with 3. We therefore say that the y coordinate is 3. We write this point down as: (on board) (2,4) The format is just (x coordinate, y coordinate). It's farily easy to see how we go the other way, from a label to a point on the graph. Suppose we are asked to plot the point (-2, 1). (on board) Plot (-2, 1). To plot this point, we just go over to -2 on the horizontal axis, then go up to 1 on the vertical axis. NOTE: The origin always has the coordinate (0,0). B. Finding Distances (10) The next thing we add to this picture is a way of finding the distances between points. Consider the two points we've drawn: (-2,1) and (2,4). What is the distance between them? (on board) What is the distance from (-2,1) to (2,4)? The ancient Greeks, even though they didn't have the idea of a coordinate system, did know how to find the distances between points. We can make a triangle from these two points just by going straight horizontal, then straight vertical, then connecting the points. (Draw on board) How long is the horizonal leg of this triangle? (let class answer) One leg just goes straight horizonal, so we can figure out the distance just by looking at how far we've gone along the number line. We started at -2, then went to 2, so the distance we went is 4: (on board) Distance = End - Start = 2 - (-2) = 4 How about for the vertical line? (let class answer) For the vertical leg, it's the same idea: (on board) Distance = End - Start = 4 - 1 = 3 OK, now we've got the legs of the triangle. Here's where we invoke the ancient Greeks. The Pythagorean Theorem tells us how to find length of the hypotenuse, the long side, of a triangle. The theorem says that we take the lengths of each of the two legs, square them, add them, then take the square root to get the length we want. Let's do that for our points: (ask class to what the formula should be): Distance = sqrt(3^2 + 4^2) = sqrt(9 + 16) = sqrt(25) = 5 So the two points are 5 units apart. We can generalize this procedure for any pair of points, say (x1, y1) and (x2, y2). The procedure is: (on board) 1. Find horizontal distance using delta x = x2 - x1 2. Find the vertical distance using delta y = y2 - y1 3. The distance is sqrt( (x2-x1)^2 + (y2 - y1)^2 ) This is called the distance formula: (on board) d = sqrt((x2-x1)^2+(y2-y1)^2) With this in hand we can find the distance between any two points. (mention that they do not need to memorize this formula because it will be provided on e.g. tests, they simply need to know how to use it) C. Finding Midpoints (5) One more trick we want to add to our repetoire the the ability to find the point halfway between two other points, the midpoint. Let's go back to our example points: (-2,1) and (2,4) (on board) Find and plot the midpoint between (-2,1) and (2,4)? Well, the midpoint should be halfway between the points in both the horizontal and vertical directions. To find the halfway point, we just take the average, and we do it separately for both the x and y directions. Thus, the x coordinate of the midpoint is (on board) (-2 + 2)/2 = 0 The y coordinate of the midpoints is what? (let class answer) (on board) (4 + 1)/2 = 2.5 So the midpoint is (0, 2.5). We can plot this as with any other point. (Plot on board) The coordinate for the midpoint can be found for any two points (x1,y1) and (x2,y2) as midpoint = ( (x1+x2)/2 , (y1+y2)/2 ) That's all there is to finding midpoints. D. Group Work Practice (25 minutes) OK, now please practice some of these on your own. Problems: 1a. Plot the points (-3,2) and (1,-1) b. Find the distance between the points c. Find and plot the midpoint. 2. An architect is planning a park with a fountain in its center, which he uses as the origin of the coordinate system. North-South is the y axis, East-West is the x axis. a. There will be a bench 5 m North and 2 m East of the fountain. Plot its location. b. There will be a row of shrubs running from 3 m South, 3 m East of the fountain to 5 m South, 4 m East of the fountain. Draw the shrub patch. c. Find the length of the shrubs. d. Find the distance between the bench and the nearest point in the shrub patch. II. Lines A. Graphing a Line (15) OK, we now have some basic tools for dealing with points in a Cartesian coordinate system. But what about lines? What is a line anyway? Well, to answer that question I first want to point out a deep and fundamental relationship between graphs and algebraic equations. Consider an algebraic equation with two variables, x and y. (on board) x + 2y = -1 This equation tells us about the relationship between two numbers, x and y. We can look at this equation as a rule: if I give you an x, you can solve this equation to get a y, and vice-versa. We can make a table of these values: (on board) x | Equation | y 0 | 2y = -1 | -1/2 1 | 1+2y = -1 | -1 -1 | -1+2y = -1 | 0 2 | 2+2y = -1 | -3/2 -2 | -2+2y = -1 | 1/2 etc. What we have here is a set of (x,y) pairs. Well, we can graph each of these points. (Draw graph, letting class specify where to put points) Note that if we connect these points, we get a straight line! That's the deep relationship between algebraic equations and graphs I was referring to earlier. A line describes a certain type of relationship between two quantities, x and y. An equation involving two unknowns, x and y, also describes a certain type of relationship. We can represent that relationship either as a graph or an equation. In some sense, a graph and an equation are really the same thing! So if I ask what we mean by a line, one possible answer is "A certain type of equation." The distinguishing characteristic of the equation of a line is that it is of the form (or can be put into the form) (on board) Ax + By = C where A, B, and C are any numbers. Let's practice going from an equation to a graph. (on board) Graph the line 2x - y = 1. Let's graph this exactly the way we graphed the last line. We make a table of x values, find the corresponding y values, then plot the points and connect them up. (on board) x | Equation | y 0 | -y = 1 | -1 1 | 2 - y = 1 | 1 -1 | -2 - y = 1 | -3 2 | 4 - y = 1 | 3 -2 | -4 - y = 1 | -5 etc. (Draw graph from points.) That's all there is to graphing lines. One final note: I can have an equation of the form (on board) y = 1 What does this look like? Well, for every x I put in, I get y = 1. (on board) x | y 0 | 1 -1 | 1 1 | 1 So if we graph this, we just get a horizontal line! (draw graph) Similarly, what do you think an equation of the form x=2 gives us? (on board) x=2 (Let class answer) It's just a vertical line, since for every y we get the same x. B. Slopes (10) We can boil the description of a line down to two concepts: its slope and its intercepts. The slope of a line is a measure of its steepness and of whether its headed uphill or downhill. We define the slope of the line connecting any two points as the change in the y coordinate divided by the change in the x coordinate. A useful mnemonic for this is the "rise over the run" (on board) m = delta y / delta x = (y2 - y1) / (x2 - x1) = rise / run For reasons I've never understood, we usually use m to represent the slope of a line. Let's consider an example of this: (on board) Find the slope of the line between the points (-3,-2) and (4,1). To find the slope, we just use the formula. (on board) m = (y2 - y1) / (x2 - x1) = (1 - (-2)) / (4 - (-3)) = 3/7 That's it. If we want to see what we're doing, we can just draw the graph. (draw graph) As you can see from the graph, we're just taking the change in height, the rise, divided by the horizontal distance, the run. If we're given a line as an equation, one way of finding the slope is just finding any points on that line, then finding the slope between them. For example: (on board) Find the slope of the line 3x - 2y = -1. We first pick any two points: (let class pick x values and find the corresponding y values) (plug into formula to get slope of -3/2) If we graph this line, we can see what it looks like. (draw graph) We can at this point note a couple of trends: first, a positive slope indicates a line headed uphill, while a negative slope indicates one headed downhill. Second, the bigger the slope is (in the sense of absolute value), the steeper the line is. ** (give examples of zero and undefined slopes) ** C. Intercepts (10) Slope is the first key quantity for a line. The second is the intercepts. The y intercept is what we call the point where the line crosses the y axis. The x intercept is what we call the point where the line crosses the x axis. Let's consider the line we just worked with: 3x - 2y = -1 We want to know where this line crosses the y axis, the y intercept. We could just guess this by looking at the graph, but we can in fact find it exactly from the equation. Remember that a graph, or an equation, is a rule for giving us an x given a y, or vice-versa. The y intercept occurs where the graph crosses the y axis. If we look at this point, we immediately know what its x coordinate is. What is the x coordinate of this point? (let class answer) It clearly has to be zero. But if we know the x coordinate, we can easily get the y coordinate from the equation. (let class do this) (on board) -2y = -1 y = 1/2 So the y intercept is (0, 1/2), or just 1/2. Finding the x intercept is exactly the same procedure. We know that where the line crosses the x axis, that point must have y coordinate zero. So we just plug that in to get x: 3x = -1 x = -1/3 So the x intercept is (-1/3, 0) or just -1/3. That's all there is to finding intercepts. C. Slope-Intercept Form (10) It is possible to write the equation of a line so that the slope and one of the intercepts are apppearant, and we can just read them off. This proves to be very convenient. We said before that a line is an equation of the form (on board) Ax + By = C Let's take a concrete example: (on board) 3x - 2y = 1 Let's take this equation and rearrange it to get y by itself. (Let class walk through this.) (on board) 3x - 2y = 1 -3x -3x -2y = -3x + 1 y = (3/2) x - 1/2 There are two things we can notice here. First, suppose we plug in x = 0, to get the y intercept. In this case, the equation just becomes: (on board) x = 0: y = -1/2 So the last number there, the -1/2, is the y intercept. When we write the equation in this form, with y by itself, the pure number on the right side gives us the y intercept. Next, let's calculate the slope of this line. How do we do this? (let class walk through it.) We need two points. We have one point, (0, -1/2). If w take x = 1, we get a second point: (1, 1) So the slope is (on board) m = delta y / delta x = (-1/2 - 1) / (0 - 1) = (-3/2) / (-1) = 3/2 So the slope is 3/2, which is just the coefficient of x. When the equation is written in this form, the slope is just the coefficient of x. We therefore call this form of the equation for a line "slope-intercept form", since it lets us just read off the slope and the y intercept. We usually write this form of the equation (on board) y = mx + b where m is the slope and b is the y intercept. E. Word Problems Lines are incredibly useful as a means of dealing with word problems, or indeed any real problems. Often a graph of a line is a useful way of conveying information. Let's just consider one example: (on board) In California, the state tax on the first $5700 of income is 1%. Draw a graph showing the tax rate versus income up to $5700. What is the slope of this graph? OK, how would we do this. (Let class answer) We'll let our y axis be the amount of tax, and the x axis be our income. We pick a couple of points, and plot connect them to make a line. (Draw graph/table.) We can then compute the slope. (Do calculation from points on the table.) If we were asksed to write an equation giving the tax owed for a given income, what would this be? (Let class answer.) We have our line, and we know its y intercept and slope. So we can just use our equation of a line: (on board) y = 0.01 x F. Group Work Practice (30) Problems: 1. Graph the line x + 2y = -2. Find the slope and intercepts. 2. The state income tax in CA is 1% of the first $5700, and 2% on income beyond $5700, up to $13,500. a. Graph the tax owed versus income from $0 to $5700. b. Continue your graph up to $13,500. c. What is the slope of the line up to $5700? d. What is the slope from $5700 to $13500? e. What is the equation of each part of the line?