Class 7 Notes: Lines I I. Lines A. Graphing a Line B. Slopes and Intercepts C. Intercepts D. Point-Slope Form E. Practice Problems II. Finding Equations of Lines A. Finding the Equation from a Point and Slope B. Point-Slope Form C. Finding the Equation from Two Points D. Practice Problems III. Linear equations A. Finding solutions B. Equations without solutions C. Equations with infinite solutions In this class we will cover the simplest sort of function: lines. I. Lines A. Graphing a Line A linear function is just a function that describes something that increases or decreases at a constant rate. As an example, suppose that a man has to take a $20 train ride to get to work, and gets paid $10 per hour. Let's compute the net amount he makes per hour he works. A function for this is f(x) = 10x - 20, where x is the number of hours he works. To see why this is called a linear function, let's make a plot of what it looks like. x | f(x) = y 0 | -20 1 | -10 2 | 0 3 | 10 4 | 20 5 | 30 6 | 40 7 | 50 8 | 60 etc. When plotting linear function, we often refer to f(x) with the letter y. What we have here is a set of (x,y) pairs. Well, we can graph each of these points. (Draw graph) 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) y = mx + b where m and b are any numbers. This is referred to as the slope-intercept form of the line. B. Slopes 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: Find the slope of the line between the points (-3,-2) and (4,1). To find the slope, we just use the formula. 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. [Do some examples] 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. C. Intercepts 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 an example: y = 2x + 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? It clearly has to be zero. But if we know the x coordinate, we can easily get the y coordinate from the equation. y = 2(0) + 1 = 1 So the y intercept is (0, 1), or just 1. 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: 0 = 2x + 1 -1 = 2x x = -1/2 So the x intercept is (-1/2, 0) or just -1/2. That's all there is to finding intercepts. D. Point-Slope Form Thus far we have written lines as y = mx + b, but this is only one possible form. Another very useful one is point-slope form. This is y = y_0 + m (x - x_0) The usefulness of this form is that one can see immediatley that if x = x_0, then y = y_0. Let's check this: y = y_0 + m (x_0 - x_0) = y_0 + m (0) = y_0 Thus this form of a line makes it immediately clear that the line passes through a given point. We can always go between point-slope form and the slope-interept form we've used thus far quite easily. Consider an example: y = 2 + 3 (x - 1) This is in point-slope form, and the line passes through (1, 2). To change to slope-intercept form, we just multiply and simplify: y = 2 + 3 (x - 1) = 2 + 3x - 3 = 3x - 1 This is slope-intercept form. Thus we see that the y intercept is -1. II. Finding Equations of Lines We just learned how to plot lines, how to go from an equation to a graph. As we discussed, though, the graph and the equation really represent the same thing -- so it must be possible to go from graphical information back to an equation. That's the first thing we're going to talk about today: how to find the equation of a line given information about it. A. Finding the Equation from a Point and Slope If we know the slope and intercept of a line, we know everything about it. More generally, if we know the slope and any point on the line, we know everything about it. It's easy to see this intuitively: by telling you a point, I tell you where the line starts. By telling you the slope, I tell you which direction it goes. Thus, if I give you a point and a slope, I've told you where to start and which way to go, which is all there is to a line. So all we need to do is take the intuitive information and turn it into a method for finding the equation. Let's consider an example: (on board) Find the equation of a line passing through the point (-1,2) with slope -1. We'll begin by trying to find the equation in slope-intercept form, which we saw last time is the most convenient form in general. (on board) y = mx + b Recall tht this equation describes a generic line, with m and b as the slope and y intercept. We need to "fill in" m and b in this equation so that it describes our line. The value of m is easy enough to fill in: we know that the slope is -1, and m is just the slope. Thus: (on board) m = -1 We can get b almost as easily. We know that the point (-1,2) is on the line, meaning that if we put in -1 for x and 2 for y, the equation has to come out true. We can just plug in (-1,2) into our y = mx+b form, and that will tell us what b is. (on board) y = mx + b y = -x + b 2 = -(-1) + b 2 = 1 + b b = 1 So we just plug in the point we've been given for x and y, and then solve for b. Thus, the equation for this line is y = -x + 1. To be sure, let's plot this: x Equation y 0 y = -(0) + 1 1 1 y = -(1) + 1 0 -1 y = -(-1) + 1 2 2 y = -(2) + 1 -1 -2 y = -(-2) + 1 3 (draw graph) As we can see from looking at the graph or the table, the line does indeed pass through the point (-1,2). The slope is downhill, as it should be for a negative slope, and it has the right steepness. So this works. Let's try another example. (on board) Find the line through the point (2,3) with slope 1/2. We start with the equation (on board) y = mx + b What do we do first? (let class answer) We immediately know that m = 1/2. What next? (let class answer) Then we plug in x and y to get b: (on board) y = 1/2 x + b 3 = 1/2 (2) + b 3 = 1 + b b = 2 So the equation is (on board) y = 1/2 x + 2 So the approach we have is very simple: (on board) 1. Write down y = mx + b. 2. The slope is m. 3. Plug in the point for x and y, and solve for b. B. Point-Slope Form (10) There is a slight variation on this method which your book uses to find the equation of a line from a point and a slope. I personally think it's fairly silly, since the method we just used is so simple, but let's talk about it for a moment anyway. Consider the following way of writing the equation of a line: (on board) y - y1 = m(x - x1) where x1, y1, and m are just some numbers. The first thing to notice here is that this is the equation of a line. We could easily re-arrange it into the form something times x plus something times y equal some number. The key ingredients are there: a number times x, a number times y, and other pure numbers. Why would we choose to write the equation of a line in this somewhat bizarre form? Here's why: if we're given a point and a slope, we can plug them directly into this form. Let's consider our last problem: (on board) Find the equation of the line that passes through (2,3) with slope 1/2. Now let's write down the point-slope formula: (on board) y - y1 = m (x - x1) Let's fill in the slope for m, and put in (2,3) for x1 and y1. Then we get: (on board) y - 3 = 1/2 (x - 2) How can we simplify this into y = mx + b form? (let class answer) (on board) y - 3 = 1/2 x - 1 y = 1/2 x + 2 Notice that's the same equation we got before. So this is another method of finding the equation given a point and a slope: (on board) 1. Write down y - y1 = m (x - x1). 2. The slope is m. 3. Plug in the point for x1 and y1. 4. Simplify. C. Finding the Equation from Two Points We can extend this a step further. Suppose we have two points. (draw two points on the board) It's pretty clear that there's only one straight line we can draw between these two points. (draw a line through the points) So there must be a way to go from the coordinates of two points to the equation of the line joining them. In fact, the way is really simple. Recall from last week that we know how to find the slope between two points. To find the equation of the line through two points, then, all we have to do is find the slope between them and use our method for finding the equation given a point and a slope. Let's do an example: (on board) Find the equation of the line through (2,3) and (-2,1). OK, first we find the slope. Who remembers how to do that? (let class answer) (on board) m = delta y / delta x = (y2 - y1) / (x2 - x1) = (1 - 3) / (-2 - 2) = -2 / (-4) = 1/2 Now we just find the equation using the slope and one of the points -- it doesn't matter which one, as they'll both give the same answer. How do we do this? (let class answer) (on board) y = 1/2 x + b 3 = 1/2 (2) + b 3 = 1 + b b = 2 So the equation of the line is (on board) y = 1/2 x + 2 Just to verify, let's try plugging in the other point: (on board) y = 1/2 x + b 1 = 1/2 (-2) + b 1 = -1 + b b = 2 So we get the same equation: (on board) y = 1/2 x + 2 Let's graph this. (on board) x Equation y 0 y = 1/2 (0) + 2 2 1 y = 1/2 (1) + 2 5/2 -1 y = 1/2 (-1) + 2 3/2 2 y = 1/2 (2) + 2 3 -2 y = 1/2 (-1) + 2 1 (draw graph) As you can see, this line does indeed pass through both the given points. So finding the line through two points is very simple: just find the slope, then find the line using the point and slope with either point. D. Practice Problems Practice problems to do as time permits: 1. Plot the points (-3,2) and (-1,1). Find the equation of the line connecting the points, and plot it. 2. An architect is drawing blueprints for a wheelchair ramp. In his blueprints, he chooses a coordinate system so the base of the ramp is at (0,0) and y is the vertical direction. a. The wheelchair ramp is to have a slope of 1/10. Find the equation of the line describing the ramp. b. Plot the line. c. The ramp must climb a height of 1 foot. Find the coordinates of the top of the ramp. III. Linear equations A. Finding solutions Often we want to know where two lines cross. Consider an example: y = 2x - 2 y = -x + 4 We would like to know where these cross. One way is to draw a graph. [draw graph] However that is tedious and indirect. A more direct method is to use the equations themselves. We want to find a point (x,y) on both lines. At the intersection point, we must have equal y values, so let's set the two y's equal: y = 2x - 2 = -x + 4 Now we can solve for x: 2x - 2 = -x + 4 3x - 2 = 4 3x = 6 x = 2 Thus we have found a solution at x = 2. The corresponding y we can get just by plugging in: y = 2x - 2 = 2(2) - 2 = 2 So the solution is (2,2). [Do more examples] B. Equations without solutions Let's try another example: y = 2x + 2 y = 2x - 4 Setting the y's equal gives: 2x + 2 = 2x - 4 2 = -4 Clearly something has gone wrong. The x's dropped out of the equation, and the resulting statement, 2 = -4, is clearly false. To see what has gone wrong, it's helpful to draw a graph. [draw graph] This makes the problem apparent. There is no solution between the two lines are parallel. They never intersect. If, when trying to find the intersection of two lines, you ever find that x drops out and you are left with a false statement, that's the cause. The two lines are parallel and non-interesecting. In this case there is no solution. C. Equations with infinite solutions One more example: y = 2x + 2 y = 2(x + 1) Putting these together: 2x + 2 = 2(x + 1) 2x + 2 = 2x + 2 2 = 2 Again we've had a cancellation, but in this case we wound up with something true: 2 = 2. It's easy to see what is going on: 2 (x+1) is just 2x + 2 by another name. The two lines are the same. In cases like these, there are infinitely many solutions, because any point that is on one line is also on the other.