THE STRAIGHT LINE Horizontal & Vertical Lines Horizontal lines give an equation of the form y = a because all of the y-coordinates are the same. Vertical Lines give an equation of the form x = a because all of the x-coordinates are the same. Ex1 Find the horizontal and vertical lines through the point (1,3). The horizontal line has equation y = 3 The vertical line has equation x = 1 Gradient In general maths: Ex1 Ex2 A car travels up a hill with a gradient of travels a horizontal distance of 120m? Vertical Height Horizontal Distance 1 x = 5 120 1 120 × = x 5 24 = x Gradient = ∴ It travels 24metres up 1 how far will it go up when it 5 The Gradient Formula In Credit maths: Gradient (m) = y 2 − y1 x 2 − x1 Where (x1 , y1 ) and (x2 , y2 ) are points on the line. Ex1 Find the gradient of the line PQ. x1 y 1 x2 y2 P (3 , 1) Q(6 , 2) mPQ = 2 −1 6−3 1 = 3 = mPQ y 2 − y1 x 2 − x1 Ex2 Find the gradient of the line RS. x 1 y1 x2 y2 R ( −3 , 1) S(1 , -7) mRS = y2 − y1 x 2 − x1 −7 − 1 1 − ( −3) −8 = 4 = −2 = mRS Remember: mRS = mSR Drawing Lines In order to draw a line we need to find any two points on it. This can be done by picking any two values of x and fitting them in to get the y coordinates. Ex1. Sketch the lines : a) y = 2x – 1 b) y = x - 2 c) y = -2x + 2 (a) y = 2x - 1 When x = 1 y = 2(1) − 1 = 1 (1,1) When x = 2 y = 2(2) − 1 = 3 (2,3) (b) y = x − 2 When x = 1 y = 1 − 2 = −1 (1,-1) When x = 3 y = 3−2 =1 (3,1) (c) y = −2x + 2 When x = 0 y = −2(0) + 2 = 2 (0,2) When x = 2 y = −2(2) + 2 = −2 (2,-2) The Equation of a Line The equation of the line through the point (0, c) with gradient m is : y = mx + c The point (0, c) is where the graph crosses the y axis and is called the y-intercept. Ex1 What is the equation of the line with gradient 4, passing through the point (0, 3) ? Ex2 Find the gradient and the y-intercept of the line with equation 3x + 4y = 5 Finding the Equation Given Any Two Points Ex1 Find the equation of the line through the points (2, 5) and (-1, -4) Modelling Situations This is similar to the last two exercises except that the x and y axes are replaced with different letters. m =8 c = 30 y = mx + c y = 8x + 30 C = 8T + 30 This is the equation of the line and also a formula for the cost given the time from the graph. Line of Best Fit (Scatter Diagrams) In chapter 6 (book 3) we used the following example to draw a scatter diagram. Ex – The shoe sizes and heights of 20 pupils are: Pupil 1 2 3 4 5 6 7 8 9 10 Shoe Size 7.5 8.5 7 8 10 6.5 6 8.5 9.5 8 Height 135 143 131 145 160 135 120 147 152 140 Pupil 11 12 13 14 15 16 17 18 19 20 Shoe Size 9 7 9 7.5 6 8 8.5 9.5 10 6.5 Height 150 135 152 143 129 137 150 155 155 126 This appears to show a positive correlation between shoe size and height. It is possible to draw a line of best fit which passes as close to as many points as possible. Once this is drawn you use the line to answer any other questions. In addition you can also now find the equation of the line. How to find the equation of the line of best fit: First you need the gradient – Start by choosing two well separated points. 1 So y = 8 x + c 3 Now fit in one of the points. E.g. (6,125) 1 125 = 8 × 6 + c 3 125 = 50 + c c = 125 − 50 c = 75 1 Now the equation of the line becomes: y = 8 x + 75 3