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
The cartesian equation of a straight line having slope m is of the form
| y = mx + c | (1.3) |
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) |
The equation of the straight line through (x1, y1)
and (x2, y2), if
x1
x2, is
y - y1 = (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) |
If b
0 then we can re-arrange the equation as
y = -
x -
which is of the form y = mx + c as before. If, on the
other hand, b = 0 then the equation becomes
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
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
= - 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