Slope of a line is defined as the measure of the steepness of a line. The higher is the value of slope, the steeper is the line inclined. It is also known as a gradient. Usually, slope of the line is denoted by the letter m. If a line goes upward to the right, then the slope of the line is said to be positive.
 
If the line goes downward, then the slope of the line is said to be negative. Also, when it is a horizontal l
ine then the slope is zero and for a vertical line, the slope is infinity.

The formula for slope of a line is the change in the $y$ coordinate divided by the corresponding change in the $x$ coordinate, between two distinct points $A$ and $B$ lying on the line. Therefore, the slope formula of the line is:

$Slope\ (m)$ = $\frac{(Ay - By)}{(Ax – Bx)}$

Where, $A_{x}$  = $x$ coordinate of point $A$

$B_{x}$ = $x$ coordinate of point $B$

$A_{y}$ = $y$ coordinate of point $A$

$B_{y}$ = $y$ coordinate of point $B$

The following steps are needed to be performed to find out the slope of a line.

Step 1: Choose any two points $A$ and $B$ lying on the line.

Step 2: Identify the $x$ and $y$ coordinates of the points $A$ and $B$.

Step 3: Find the difference between the $y$ coordinates.

Step 4: Find the difference between the $x$ coordinates.

Step 5: Divide the difference in the $y$ coordinates by the difference in the $x$ coordinates of the two points $A$ and $B$ to get the slope.
Slope of a line is also defined as the ratio of rise to run between two points. The rise is the difference between the $y$ coordinates of the two points and run is the difference between the $x$ coordinates of the two points lying on the straight line.

Let us consider two points $A$ and $B$ lying on the line whose slope we need to find out. The coordinate’s of $A$ are $(x1,\ y1)$ and the coordinates of $B$ are $(x2,\ y2)$. We first find out the difference between the $y$ coordinates of the points $A$ and $B$, that is $(y2-y1)$. Then, we find the difference between the $x$ coordinates $(x2-x1)$. On dividing the respective difference, we get the slope of the line.

Condition for two parallel lines: $m1$ = $m2$

Condition for two perpendicular lines: $m1\ \times\ m2$ = $-1$

Slope of a line is the measure of the steepness of the line. The slope of a line could be negative, zero, positive or undefined.

Positive Slope – When the value of $y$ increases with the increase in the value of $x$, the line goes upwards towards the right.

In that case, the slope will be positive or a positive number.
Negative Slope – When the value of $y$ decreases as in increase of $x$, the line goes downwards towards the right. Hence,  the slope is negative or will be a negative number.
Zero Slope – When the value of $y$ does not vary if we increase the value of $x$, the line is exactly horizontal. And we know that the slope of any horizontal line is always zero. It neither goes up nor goes down as $x$ increases.
Undefined Slope – When the $x$ coordinates of the points lying on the line are the same and does not change, it is said that the line has an undefined slope. In this, the line is exactly vertical and does not have a defined slope. As the denominator of the fraction is $0$, so any number divided by zero gives us an undefined value.
Slope as an Angle – The angle made by slope of a line is usually expressed in degrees or radians.  The line is said to have positive slope if it has a positive angle and a negative slope if it has a negative angle.

Conversion of slope of line $(m)$ to slope angle and vice versa

$m$ = $tan\ theta$

$Angle$ = $arctan(m)$
Equation of a Line – Equation of a line in terms of slope could be in two different forms. They are slope intercept form and point slope form.

Slope intercept form: $y$ = $mx+b$

Where, $m$ = slope of the line, $b$ =intercept and $x$ and $y$ are coordinates of any point lying on the line

Point slope form: $y\ -\ y1$ = $m(x\ -\ x1)$

Where, $m$ is the slope of the line, $(x1,\ y1)$ is the coordinates of any point lying on the line whose slope we need to find out.
Example 1: 

Determine the slope of a line which contains $A\ (-4,5)$ and $B\ (-2,1)$

Solution: 

We see $x1$ = $-4$, $x2$ = $-2$, $y1$ = $5$ and $y2$ = $1$

Therefore, $Slope\ (m)$ = $\frac{(y2-y1)}{(x2-x1)}$

$Slope\ (m)$ = $\frac{(1-5)}{(-2+4)}$

$Slope\ (m)$ = $\frac{-4}{2}$

$Slope\ (m)$ = $-2$
Example 2:

What will be the slope of the line whose equation is $4y$ = $12\ x-8$?

Solution: 

We need to arrange the given problem in slope intercept form 

$y$ = $mx\ +\ b$

So, we shall separate out $y$ by dividing by $4$ throughout

$\frac{4y}{4}$ = $\frac{(12x - 8)}{4}$

$Y$ = $3x\ -2$

Therefore, slope of the line $(m)$ = $3$
Example 3:

Find the equation of the straight line that has slope $m$ = $2$ and passes through the point $(-2,-8)$?

Solution: 

We use the point slope form to form the equation of the straight line.

The point slope form is $(y-y1)$ = $m(x-x1)$

Given, $m$ = $2$, $x1$ = $-2$ and $y1$ = $-8$

Plugging in the values given,

$Y$ – $(-8)$ = $2\ (x—(-2))$

$Y+8$ = $2(x+2)$

$Y+8$ = $2x+4$

$Y$ = $2x-4$
Example 4:

Find the equation of the line which passes through the points $(2,8)$ and $(3,9)$

Solution: 

Point slope form $(y-y1)$ = $m(x-x1)$ need to be applied

We need to first find out the slope $m$

$Slope\ (m)$ = $\frac{(y2-y1)}{(x2-x1)}$

$Slope\ (m)$ = $\frac{(9-8)}{(3-2)}$

$Slope\ (m)$ = $1$

So plugging in the respective values $x1$ = $2$, $y1$ = $8$ and $m$ = $1$ in the point slope form, we get

$(y-8)$ = $1(x-2)$

$y-8$ = $x-2$

$y$ = $x+6$
Example 5:

The slope of a line is 1. Find out the slope angle.

Solution: 

Slope angle = arctan(m)

Slope angle = arctan(1)

Slope angle = $45$ degrees.
Example 6:

The slope angle is $60$ degrees. Find out the slope (m) of the line.

Solution: 

$Slope\ (m)$ = $tan(Slope\ angle)$

$Slope\ (m)$ = $tan(60)$

$Slope\ (m)$ = $\sqrt{3}$