next up previous
Next: Angles and Trigonometry Up: Cartesian Coordinates Previous: Distance between points

Straight Lines

An important concept for a straight line in the (x, y)-plane is its slope.

Figure 1.1: The slope of a line.
\includegraphics[width=5cm]{fig2.eps}

The slope, or gradient, of a straight line is the tan of the angle that the line makes with the positive direction of the x-axis

This makes sense for any line other than those lines that are perpendicular to the x-axis. We do not give a slope for those lines.

Two lines with the same slope are parallel. The condition for two lines of slopes m1 and m2 to be perpendicular is that

m1m2 = - 1 (1.2)

The slope of the line joining P(x1, y1) to Q(x2, y2) is

m = $\displaystyle {\frac{y_2-y_1}{x_2-x_1}}$

The cartesian equation of a straight line having slope m is of the form

y = mx + c (1.3)

The constant c tells us where the line meets the y-axis.

This equation can be re-written in a couple of other useful forms.

The equation of the straight line through the point (a, b) with slope m is

y - b = m(x - a) (1.4)

This is clear. The coefficient of x is m, so the line has slope m. When x = a the RHS is zero, so y = b. Therefore the line goes through (a, b).

The equation of the straight line through (x1, y1) and (x2, y2), if x1$ \ne$x2, is

y - y1 = $\displaystyle {\frac{y_1-y_2}{x_1-x_2}}$(x - x1) (1.5)

All the forms so far have had the slight disadvantage that, since they are written in terms of the gradient, they do not apply to the case ( x = constant) of a line perpendicular to the x-axis.

This is corrected as follows. The fully general equation of a straight line is

ax + by + c = 0 (1.6)

where a and b are not both zero.

If b$ \ne$ 0 then we can re-arrange the equation as y = - $ {\frac{a}{b}}$x - $ {\frac{c}{b}}$ which is of the form y = mx + c as before. If, on the other hand, b = 0 then the equation becomes

x = - $\displaystyle {\frac{c}{a}}$ = constant

which covers the case of lines perpendicular to the x-axis.

Example     What is the equation of the straight line through (1, 2) with slope -1?

Using the above fomula the equation is y - 2 = - 1(x - 1) or, tidying up, y = 3 - x.

Example     What is the equation of the straight line through (4, 5) which is perpendicular to the line y = 2x - 3?

The second line has slope 2. So, by the formula m1m2 = - 1 the required slope of our line is -1/2. So the equation of the line is

y - 5 = - $\displaystyle {\textstyle\tfrac{1}{2}}$(x - 4)    or     x + 2y = 14

Example      What is the equation of the straight line through the two points (1, 3) and (- 3, 8)?

We can do this by the earlier formula, but it is probably easier to do it in two stages. First, the slope of the line must be

m = $\displaystyle {\frac{8-3}{-3-1}}$ = - $\displaystyle {\textstyle\frac{5}{4}}$

So the equation is

y - 3 = - $\displaystyle {\textstyle\tfrac{5}{4}}$(x - 1)    or     5x + 4y = 17

Example      Where do the two lines y = 3x - 2 and y = 5x + 7 meet?

The point (x, y) where they meet must lie on both lines, so x and y must satisfy both equations. So we are looking to solve the two simultaneous equations

y = 3x - 2    and     y = 5x + 7

Well, in that case, 3x - 2 = 5x + 7, so 2x = - 9 and x = - 9/2. Putting this back in one of the equations we get y = - 27/2 - 2 = - 31/2.




Example 1.1   What is the equation of the straight line passing through the point (- 3, 5) and having slope 2?

Example 1.2   What is the equation of the line passing through the points (- 4, 2) and (3, 8)? What are the equations of the lines through (5, 5) parallel and perpendicular to this line?

Example 1.3   Where do the lines y = 4x - 2 and y = 1 - 3x meet? Where does the line y = 5x - 6 meet the graph y = x2?

Example 1.4   Let l1 be the line of slope 1 through (1, 0) and l2 the line of slope 2 through (2, 0). Where do they meet and what is the area of the triangle formed by l1, l2 and the x-axis?


next up previous
Next: Angles and Trigonometry Up: Cartesian Coordinates Previous: Distance between points
Ian Craw 2000-01-19