Class 8: Lines II I. Standard form II. Special lines A. Horizontal lines B. Vertical lines C. Parallel lines D. Perpendicular lines III. Linear models IV. Finding intersections of lines A. Substitution B. Elimination I. Standard form First a reminder: we've learned how to graph things that look like y = mx + b, where m is the slope and b is the y-intercept. This is called slope-intercept form. It is often the most useful form, since we can just read off the slope and the intercept. However, we can write lines in other ways. In particular, we can write them where we put x and y on one side of the equal sign, and all constants on the other. For example: y = -(1/2) x + 3 We can multiply both sides by 2 to get 2y = -x + 6 Then move the -x to the other side: x + 2y = 6 This is standard form, meaning that the x and y terms are on one side, and the constant on the other. In general standard form is anything that looks like Ax + By = C where A, B, and C are constant numbers. Equivalently, it's easy to go from standard form to slope-intercept form, just by solving to get y by itself. For example: 2x - 3y = 6 is in standard form. To turn this into slope intercept form, we just get y by itself: 2x - 3y = 6 -2x -2x ------------- -3y = -2x + 6 /-3 /-3 --------------- y = (2/3) x - 2 This is slope-intercept form, and we can immediately see that the line 2x - 3y = 6 has a slope of 2/3 and a y intercept of -2. II. Special lines A. Horizontal lines A line with a positive slope rises from left to right. One with negative slope falls from left to right. A line with zero slope, on the other hand, is horizonal. In slope intercept form, such a line looks like y = m x + b with m = 0. Thus we have y = b or y is constant, no matter what x is. If we graph this, we see that it produces a horizontal line. For example: y = 2 x | y ------ -2 | 2 -1 | 2 0 | 2 1 | 2 2 | 2 ... [Draw graph] Thus horizontal lines just look like y = constant. B. Vertical lines What about a vertical line? If we draw a graph of one, we can see that a vertical line corersponds to x having a constant value. All points on the line are at the same x. [Draw graph] This is exactly what the equation for a vertical line looks like: x = constant. C. Parallel Lines Something else neat we can do is use the equations to look at relationships between lines. One common occurence is parallel lines, lines that run next to each other, at constant distance, never touching or diverging. The idea of parallelism gives us another way of defining a line. Suppose I give you a line and a point not on that line. (draw on board) As you can see intuitively, there is only one way to draw a line through the point so that it is parallel to the first line. (draw on board) Thus, this situation uniquely defines a line. There must therefore be a way of getting from a line and point to find the equation of the parallel line -- and there is. Let's take a concrete example. (on board) Find the line through (1,2) parallel to the line y = x - 1. The key thing to notice is that parallel lines have to be equally steep -- otherwise they'd converge or diverge. Thus, parallel lines must have the same slope! With this insight, it's easy to see how to proceed. What is the slope of y = x - 1? (let class answer) It's just 1. Thus, the line we're looking for must also have slope 1. We now have a point and a slope, so we've reduced this to a problem we know how to solve: finding the equation given a point and a slope. How do we proceed then? (let class answer) We know that m is 1, so we just have to plug in x and y to find b. (on board) y = mx + b y = x + b 2 = 1 + b b = 1 So the equation of the line is (on board) y = x + 1 Notice that the parallel lines has the same "y = mx" part of its equation, but that the "b" is different. That is always true of parallel lines. Also note that we can do this in reverse, and use this as a check as to whether two lines are parallel. Consider: (on board) Is the line connecting (-3,-1) to (1,2) parallel to the line connecting (-2,0) to (2,2)? To check this, we simply compute the slopes of the two lines. How do we do this? (let class answer) (on board) m1 = (y2 - y1) / (x2 - x1) = (2 - (-1)) / (1 - (-3)) = 3 / 4 m2 = (y2 - y1) / (x2 - x1) = (2 - 0) / (2 - (-2)) = 1 / 2 The slopes are different, to the lines are not parallel. If they had come out the same, that would mean the lines were parallel. D. Perpendicular lines If we can find parallel lines, we can also find perpendicular lines. Again, consider a line and a point. (draw picture) Suppose I tell you I want a line that passes through the point and is perpendicular to the first line. (draw picture) As you can see, that again uniquely defines a line. Thus, there must be a way to find the equation of that line. Let's take another concrete example: (on board) Find the line through (1,1) perpendicular to y = 2x - 1. To see how to approach this problem, let's graph the line we've been given. (on board) x Equation y 0 y = 2(0) - 1 -1 1 y = 2(1) - 1 1 -1 y = 2(-1) - 1 -3 (draw graph) We can envision what the perpendicular line will have to look like. (draw picture) First of all, notice that, since the original line is uphill, the perpendicular line will have to be downhill. If the original line had been downhill, the perpendicular line would be uphill. If we say this in terms of slopes, the slope of the perpendicular line has to have the opposite sign of the slope of the original line. Similarly, if the original line is steep, the perpendicular line will have to be a gradual slope, and vice versa. So if the original line has a big positive slope, for example, its perpendicular will have to have a small (in the absolute value sense) negative slope. It turns out that the rule is this: (on board) If a line has slope m, its perpendicular has slope m_perp = -1/m. In other words, the slopes of perpendicular lines are negative reciprocals of one another. So if m is positive, the perpendicular has a negative slope. And if m is big, the perpendicular will be small, which is exactly what we want. Let's apply this to our example. What is the slope of the original line? (let class answer) It's just 2. So the slope of the perpendicular is m_perp = -1/2. Now we're back to the problem we know how to solve: finding the equation given the slope and a point: (1,1). How do we find the equation? (let class answer) We know the slope is -1/2, so we write down: (on board) y = (-1/2) x + b 1 = (-1/2)(1) + b 1 = -1/2 + b b = 3/2 So the perpendicular equation is (on board) y = (-1/2) x + 3/2 Let's graph this just to be sure: x Equation y 0 y = (-1/2)(0) + 3/2 3/2 1 y = (-1/2)(1) + 3/2 1 -1 y = (-1/2)(-1) + 3/2 2 (draw graph) As we can see, this is just like what we think it should look like. As with parallel lines, we can turn this knowledge around and use it as a test to see if two lines are perpendicular. Consider this problem: (on board) Are 4x - 2y = 3 and x = 1 - 2y perpendicular? How should we approach this? (let class answer) We just find the slope of each line. It's easiest to do that by putting them into slope-intercept form. (on board) 4x - 2y = 3 -2y = -4x + 3 y = 2x - 3/2 So this line has slope 2. (on board) x = 1 - 2y 1 - 2y = x -2y = x - 1 y = -1/2 x + 1/2 So this line has slope -1/2. Clearly, 2 times -1/2 is -1, so the lines are perpendicular. Practice problem: 1a. Plot y = (1/3) x + 1 b. Find the equation of the line parallel to this through (0,-1), and plot the parallel line. c. Find the equation of the line perpendicular to the two lines you just plotted, passing through (0,-1). III. Linear models Lines are particularly useful when they describe the real world. Such a line is called a linear model. We can tell when a linear model is appropriate by computing rates of change. We can take an example from electronics. Suppose we attach batteries of varying voltage to a circuit, and measure the amount of current that runs through it. Suppose our data looks like this: Voltage | Current ----------------- 5 V | 1 mA 10 V | 2 mA 15 V | 3 mA 20 V | 4 mA Is a linear model appropriate for this situation? To figure that out, we can compute the rates of change of current between successive voltages. For a line, these will all be the same. Let's check for our example: rate of change = Delta current / Delta voltage For the first two points: rate of change = (2 mA - 1 mA) / (10 V - 5 V) = 1 mA / 5 V = 0.2 mA / V Every other pair of points we can check in the same way: rate of change = (3 mA - 2 mA) / (15 V - 10 V) = 0.2 mA / V rate of change = (4 mA - 3 mA) / (20 V - 15 V) = 0.2 mA / V All of these rates of chane are the same, and this tells us that a linear model is appropriate. Thus we must have current = m * voltage + b We've already found m, the rate of change. It's 0.2 mA / V. We just need to find b, and we can do that by plugging in, just like we would for any other line. current = 0.2 mA/V * voltage + b 1 mA = 0.2 * mA/V * (5 V) + b 1 mA = 1 mA + b 0 = b So b = 0, and the linear model is current = 0.2 mA/V * voltage That's all there is to linear models. IV. Finding Intersections of Lines It is often very useful to be able to figure out where two lines cross. Of course one can do this simply by drawing the graphs and measuring, but it is useful to be able to do it algebraically as well. A. Substitution Suppose we have two lines: y = 2x - 4 y = x + 2 We want to find out where they cross. Any point where they cross must have the same x and y values, so we can find such a point just be knowing that the y's have to come out the same. Thus we must have 2x - 4 = x + 2 and we can solve: x - 4 = 2 x = 6 and we see that the two lines cross at the point (6,8). This method of finding the intersection is called substitution: we get one of the variables by itself, then substitute it into the other equation. We can use substitution even when equations aren't given in y = mx + b form. For example, suppose we have x + y = 3 3x - y = 1 We can re-arrange one or both of these equations into y = mx + b form, and then substitute: 3x - 2y = 1 -y = -3x + 1 y = 3x - 1 Now substitute into the other equation: x + (3x - 1) = 3 x + 3x - 1 = 3 4x - 1 = 3 4x = 4 x = 1 Finally, plug in to get y: y = 3(1) - 1 = 2 That's it. We could equally well have substituted for x instead of y. B. Elimination An alternative means of solving is called elimination. Let's take our previous example: x + y = 3 3x - y = 1 Suppose we add the two equations; we're allowed to do that, because we're adding equal things to both sides. Then we get 4x = 4 x = 1 Notice that the y cancelled out, leaving only x, which we could then solve for. Then we can substitute in and solve for y just like before. The trick here is to add or subtract equations in such a way as to make on of the variables cancel. Here's another example: 2x + y = -4 x - 2y = 3 In this case we can't just add, but we can still use elimination: we just have to multiply one of the equations by a number first. For example, suppose we multiply the first equation by 2 on both sides. This gives 2(2x + y) = -4(2) 4x + 2y = -8 Why do this? Because now we can add to the second equation and get a cancellation: 4x + 2y = -8 x - 2y = 3 5x = -5 x = -1 Finally, we can solve for y: x - 2y = 3 -1 - 2y = 3 -2y = 4 y = -2 And we're done. One more example: 2x + 3y = 1 -4x - 6y = 3 Let's use elimination to get rid of the x's. We'll start by multiplying the first equation by 2, then adding: 2 (2x + 3y) = 1 4x + 6y = 2 Now add the second equation 4x + 6y = 2 -4x - 6y = 3 ------------- 0 = 5 Everything cancelled out on the left, and we were left with a false statement. What is going on here? It's easy to figure out if rewrite the two equations in slope-intercept form: 2x + 3y = 1 3y = -2x + 1 y = -(2/3)x + (1/3) -4x - 6y = 3 -6y = 4x + 3 y = (-2/3)x - 1/2 So these two lines have the same slope, but different intercepts. Remember that two lines with the same slope are paraellel. Thus our lines are parallel. They have different intercepts, though, which means that pass through the x axis at different points. Thus the lines are parallel but not identical. That's why our attempt to find a solution, where the lines cross, didn't work. The two lines never cross! This is just like what we found earlier when we tried to find the intersection of two functions.