16. Slope of a Line

Hi. This lesson will talk about how to find the slope of a line.

We’ll consider two cases:

(i) Slope of a line whose equation is known

(ii) Slope of a line joining two points

Case 1

Let the equation of the line be ax + by + c = 0. Then, how do we find its slope?

We know that if the equation of the line looks like y = mx + c (slope-intercept form), then m is the slope of the line.

So, if we transform the first equation so that it looks like the second, then the coefficient of x will give us the slope.

Let’s do this!

The equation ax + by + c = 0 can be transformed as:

ax + by + c = 0

⇒ by = -ax – c

⇒ y = (-a/b)x + (-c/b)

This gives the slope of the line as -a/b (i.e., the coefficient of x). And we’re done!

We can remember this as a formula.

Slope = -(coefficient of x/coefficient of y)

For example, the slope of the line 2x – y + 10 = 0 will be -(2)/(-1) or 2.

This formula is valid only when the line is in the form ax + by + c = 0. If the equation is not in this form, say ax + by = c or ax = by + c, then we’ll bring all the terms to the LHS and then apply the above formula.

For example, to find the slope of the line 4x = y + 5, the equation should first written as 4x – y – 5 = 0. Then, the slope would be -(4)/(-1), or 4.

That’s all. Let’s move to the second case.

Case 2

I’ve already discussed this earlier. But it makes sense to discuss it here once again.

Let A(x1,y1) and B(x2,y2) be two points. We need to calculate the slope of the line joining A and B, or the slope of AB.

straight line two point form

Recall that the slope of a line is the tangent of the angle made by the line with the X-axis (measured anticlockwise).

To find that, let’s construct AC parallel to the Y-axis and BC parallel to the X-axis.

straight line two point form

Now, in triangle ABC,

tanθ = BC/AC

⇒ tanθ = (y2 – y1)/(x2 – x1)

⇒ m = (y2 – y1)/(x2 – x1)

And, we’re done!

A small point to note. If x1 = x2 (and y1  y2) then the denominator of the previous expression becomes zero, and the slope is undefined.

In this case, the line will be vertical, and the angle it makes with the X-axis would be 90°. And, tan90° is (also) undefined. It’s all connected!

Lesson Summary

  1. The slope of the line ax + by + c = 0, is equal to -a/b.
  2. The slope of the line joining the points (x1, y1) and (x2, y2) is equal to (y2 – y1)/(x2 – x1).

Remember these two, and you’ll be much comfortable later. In the next lesson, we’ll derive an expression to find the angle between two lines, whose slopes are known.

Leave a Reply

Scroll to Top