The slope of a line gives the measure of its steepness and direction. The slope of a straight line between two points says (x_{1},y_{1}) and (x_{2},y_{2}) can be easily determined by finding the difference between the coordinates of the points. The slope is usually represented by the letter ‘m’.

## Slope Formula

If P(x_{1},y_{1}) and Q(x_{2},y_{2}) are the two points on a straight line, then the slope formula is given by:

Slope, m = Change in y-coordinates/Change in x-coordinates
m = (y |

Therefore, based on the above formula, we can easily calculate the slope of a line between two points.

In other term, the slope of a line between two points is also said to be the rise of the line from one point to another (along y-axis) over the run (along x-axis). Therefore,

Slope, m = Rise/Run

## Slope of a Line Equation

The equation for the slope of a line and the points also called point slope form of equation of a straight line is given by:

y − y_{1} = m(x − x_{1}) |

Whereas the slope-intercept form the equation of the line is given by:

y = mx + b

Where b is the y-intercept.

## How to Find Slope of a line on a Graph?

In the given figure, if the angle of inclination of the given line with the x-axis is θ then, the slope of the line is given by tan θ. Hence, there is a relation between the lines and angles. In this article, you will learn various formulas related to the angles and lines.

The slope of a line is given as m = tan θ. If two points A \((x_1,y_1)\) and B \((x_2,y_2) \) lie on the line with (\( x_1\) ≠ \(x_2\)) then the slope of the line AB is given as:

m = tan θ = \( \frac{y_2~-~y_1}{x_2~-~x_1}\)

Where θ is the angle which the line AB makes with the positive direction of the x-axis. θ lies between 0° and 180°.

It must be noted that θ = 90° is only possible when the line is parallel to y-axis i.e. at \( x_1 \) = \( x_2,\) at this particular angle the slope of the line is undefined.

Conditions for perpendicularity, parallelism, and collinearity of straight lines are given below:

## Slope For parallel lines

Consider two parallel lines given by \( l_1\) and \( l_2 \) with inclinations α and β respectively. For two lines to be parallel their inclination must also be equal i.e. α=β. This results in the fact that tan α = tan β. Hence, the condition for two lines with inclinations α, β to be parallel is tan α = tan β.

Therefore, if the slopes of two lines on the Cartesian plane are equal, then the lines are parallel to each other.

Thus, if two lines are parallel then, \( m_1\) = \( m_2 \) .

Generalizing this for n lines, they are parallel only when the slopes of all the lines are equal.

If the equation of the two lines are given as ax + by + c = 0 and a’ x + b’ y + c’= 0, then they are parallel when ab’ = a’b. (How? You can arrive at this result if you find the slopes of each line and equate them.)

## Slope For perpendicular lines

In the figure, we have two lines \( l_1\) and \( l_2 \) with inclinations α, β. If they are perpendicular, we can say that β = α + 90°. (Using properties of angles)

Their slopes can be given as:

m_{1} = tan(α + 90°) and \( m_2 \) = \( tan~α\).

⇒\( m_1 \) = – cot α = \( -~ \frac{1}{tan~\alpha}\) = \( -~\frac {1}{m_2}\)

⇒\( m_1 \) = \( -\frac {1}{m_2} \)

⇒\( m_1 ~×~m_2 \) = -1

Thus, for two lines to be perpendicular the product of their slope must be equal to -1.

If the equations of the two lines are given by ax + by + c = 0 and a’ x + b’ y + c’ = 0, then they are perpendicular if, aa’+ bb’ = 0. (Again, you can arrive at this result if you find the slopes of each line and equate their product to -1.)

## Slope For Collinearity

For two lines AB and BC to be collinear the slope of both the lines must be equal and there should be at least one common point through which they should pass. Thus, for three points A, B, and C to be collinear the slopes of AB and BC must be equal.

If the equation of the two lines is given by ax + by + c = 0 and a’ x+b’ y+c’ = 0, then they are collinear when ab’ c’ = a’ b’ c = a’c’b.

### Angle between Two Lines

When two lines intersect at a point then the angle between them can be expressed in terms of their slopes and is given by the following formula:

tan θ = |\( \frac{ m_2~-~m_1}{1~+~m_1~ m_2}\)| , where \( m_1 ~and~ m_2\) are the slopes of the line AB and CD respectively.

If \( \frac{ m_2~-~m_1}{1~+~m_1~ m_2}\)is positive then the angle between the lines is acute. If \( \frac{ m_2~-~m_1}{1~+~m_1~ m_2}\) is negative then the angle between the lines is obtuse.

## Slope of Vertical Lines

Vertical lines have no slope, as they do not have any steepness. Or it can be said, we cannot define the steepness of vertical lines.

A vertical line will have no values for x-coordinates. So, as per the formula of slope of the line,

Slope, m = (y_{2} – y_{1})/(x_{2} – x_{1})

But for vertical lines, x_{2} = x_{1} = 0

Therefore,

m = (y_{2} – y_{1})/0 = undefined

In the same way, slope of horizontal line is equal to 0, since the y-coordinates are zero.

m = 0/(x_{2} – x_{1}) = 0 [for horizontal line]

## Positive and Negative Slope

If the value of slope of a line is positive, it shows that line goes up as we move along or the rise over run is positive.

If the value of slope is negative, then the line goes done in the graph as we move along the x-axis.

## Solved Examples

Q.1 Find the slope of a line between the points P = (0, –1) and Q = (4,1).

Solution: Given,the points P = (0, –1) and Q = (4,1).

As per the slope formula we know that,

Slope of a line, m = (y_{2} – y_{1})/(x_{2} – x_{1})

m = (1-(-1))/(4-0) = 2/4 = ½

Q.2: Find the slope of a line between P(–2, 3) and Q(0, –1).

Solution: Given, P(–2, 3) and Q(0, –1) are the two points.

Therefore, slope of the line,

m = (-1-3)/0-(-2) = -4/2 = -2

Learn more about co-ordinate geometry with BYJU’S and excel in every field. Download BYJU’S – The Learning App.

## Frequently Asked Questions – FAQs

### What is the slope of a straight line?

### How to find slope of a line?

Question: What is the slope equation of a straight line?

Answer: The point-slope form of equation of a straight line is given by:

y − y

_{1}= m(x − x

_{1})

### What is the slope between two points?

m = (1-8)/(-7-4) = -7/-11 = 7/11

### What is the slope of the line: y = −2x + 7?

m = -2