Slope-intercept form of a line
The slope-intercept form of a line is based on the size of the angle that the line makes with the x-axis.
Motivation
We have a line p with the general equation ax + by + c = 0. We know that the graph of a linear function is a line. We usually write a linear function in the form y = f(x), so we might want to convert the general equation ax + by + c = 0 to this form. To do that we need b ≠ 0, because we have to isolate y, which means dividing the whole equation by b. If b ≠ 0, we can rearrange the general equation like this:
This gives us the usual form of a linear function. Because this expression is rather clumsy, we introduce new letters: we write m for the fraction
It is not a different form: instead of the ugly fraction
If this coefficient were b = 0, the line would be parallel to the y-axis and the general equation of such a line would have the form ax + c = 0. If we divide this equation by a and rearrange it, we get:
Because the fraction
To sum up, we can write every line that is not parallel to the y-axis in the form y = mx + b, where m, b ∈ ℝ, and every line parallel to the y-axis in the form x = d, where d ∈ ℝ.
An equation of the form y = mx + b is called the slope-intercept form of a line, and we call the coefficient m the slope of the line.
Example
We have a line that passes through the points A(2, 8), B(8, 10). Find the slope-intercept form of the line. The slope-intercept form is best found from the general equation of the line, so we construct that first. The general equation has the form ax + by + c = 0, where (a, b) is a normal vector, so we find a normal vector. The direction vector has coordinates (8, 10) − (2, 8) = (6, 2), so the normal vector
In place of (x, y) we substitute a point that the line certainly passes through, for example the point B(8, 10). So we substitute x = 8, y = 10 into the equation:
We get the general equation
We can divide this equation by −2 to get a slightly nicer form:
We get the slope-intercept form by isolating y. We move all the other terms to the right-hand side and then divide the equation by three:
The last line is the line in slope-intercept form. If we want the coefficients m, b of the slope-intercept form, we write
If the coefficient b had not come out as awkward as
The slope of a line
If we have the equation of a line in slope-intercept form y = mx + b, we call the number m the slope of the line. The slope is related to the angle that the line makes with the positive x-axis. Look at the following picture:
The picture shows four different lines with different slopes m but always the same coefficient b = 2. All the lines have the form y = mx + 2. Notice that as the slope, that is, the number in front of the unknown x, changes continuously, the angle that the line makes with the positive x-axis changes too. For example, the purple line
In this case, the greater the slope, the greater the angle the line makes with the axis. The slope of the purple line
We can see that the slope m is related to the angle somehow. Let’s look at it more closely. We will show only the purple line
We will now try to express the angle ϵ using the line segments AC and BC. To do that, we need to know their lengths. Let’s label the coordinates of the points A and B like this: A = (x1, y1) = (2, 3) and B = (x2, y2) = (6, 5). The length of the segment AC is then equal to the difference |x2 − x1| = |6 − 2| = 4. We take the x-coordinate of the point B, which is the same as the x-coordinate of the point C, and subtract the x-coordinate of the point A. This gives us the length of the segment AC. We do the same with the segment BC, only with the y-coordinates. So |BC| = |y2 − y1| = |5 − 3| = 2.
Next we use the trigonometric functions, specifically the tangent. In the right-angled triangle ABC, for the angle ϵ we have
So the tangent of the angle ϵ, which is the same as the angle δ, comes out as
If a line p has the slope-intercept equation y = mx + b, then the slope m is equal to the tangent of the angle that the line p makes with the positive x-axis.
Chapters: Parametric equations of a line, General equation of a line, Normal vector of a line, Slope-intercept form of a line, Equation of a line in 3D