Slopes and Equations of Lines
Slope of a Line:
If a line passes through two distinct points P_{1}(x_{1} , y_{1}) and P_{2}(x_{2}, y_{2}), its slope is given by:
m = (y_{2}  y_{1}) / (x_{2}  x_{1})
with x_{2} not equal to x_{1}.
General Equation of a Straight line:
The general equation of straight line is given by:
A x + B y = C
where A, B and C are constants and A and B cannot be both zero.
An interactive exploration of the equations of lines of the form A x + B y = c is included.
Any straight line in a rectangular system has an equation of the form given above.
Slope intercept form of a Line:
The equation of a line with a defined slope m can also be written as follows:
y = m x + b
where m is the slope of the line and b is the y intercept of the graph of the line.
The above form is called the slope intercept form of a line. Further interactive tutorials on this form of lines are included.
PointSlope form of a line:
An equation of a line through a point P(x_{1} , y_{1})
with slope m is given by
y  y_{1} = m(x  x_{1})
Vertical and Horizontal lines:
a  If we set A to zero in the general equation, we obtain an equation in y only of the form
B y = C
which gives y = C / B = k; k is a constant. This is a horizontal line with slope 0 and passes through all points with y coordinate equal to k.
b  If we set B to zero in the general equation, we obtain
A x = C
which gives x = C / A = h; h is constant. This is a vertical line with undefined slope and passes through all points with x coordinate equal to h.
Parallel Lines:
Two non vertical lines are parallel if and only if their slopes are equal.
Perpendicular Lines:
Two non vertical lines are perpendicular if and only if
their slopes m_{1} and m_{2} are such that
m_{1} × m_{2} =  1
Questions with Solutions
Question 1
Find the slope of a line passing through the points
 (2 , 3) and (0 ,  1)
 ( 2 , 4) and ( 2 , 6)
 (5 , 2) and ( 7 , 2)
Solution to Question 1

m = (y_{2}  y_{1}) / (x_{2}  x_{1})
= (1  3) / (0  2) = 2

m = (6  4) / (2 + 2)
The division by 2 + 2 = 0 is undefined
and the slope in this case is undefined. The line passing through the given
points is a vertical line.

m = (2  2) / (7  5) = 0
The slope is equal to 0 and the line
through the given points is a horizontal line.
Question 2
Find the equation of the line that passes through the point (2 , 5) and has a slope of 4.
Solution to Question 2

Substitute y_{1} , x_{1}
and m in the point slope form of a line
y  y_{1} = m(x  x_{1})
y  5 =  4(x  (2))
y =  4 x  3
Question 3
Find the equation of the line that passes through the points (0 , 1) and (3 , 5).
Solution to Question 3

We first calculate the slope of the line
m = (5  (1)) / (3  0) = 6 / 3 = 2

Use the slope and any of the two points to
write the equation of the line using the point slope form.
y  y_{1} = m(x  x_{1})
using the first point
y  (1) = 2(x  0)
y = 2 x  1
Question 4
Find the slope of the line given by the equation
 2 x + 4 y = 6
Solution to Question 4

Given the equation
 2 x + 4 y = 6

Write the equation in slope intercept form
4 y = 2 x + 6
y = (1 / 2) x + 3 / 2

The slope of the line is given by the
coefficient of x and is equal to 1 / 2.
Question 5
Find an equation of the line that passes through the point (2 , 3) and is parallel to the line 4 x + 4 y = 8
Solution to Question 5

Let m_{1} be the slope of the line
whose equation is to be found and m_{2} the slope of the given line. Rewrite the given equation in slope intercept form and find its slope.
4 y =  4 x + 8

Divide both sides by 4
y =  x + 2
slope m_{2} =  1.

Two lines are parallel if and only if they
have equal slopes
m_{1} = m_{2} =  1

We now use the point slope form to find
the equation of the line with slope m_{1}.
y  3 =  1(x  (2))
which may be written as
y =  x + 1
Question 6
Find an equation of the line that passes through the point (0 ,  3) and is perpendicular to the line  x + y = 2.
Solution to Question 6

Let m_{1} be the slope of the line
whose equation is to be found and m_{2} the slope of the given line. Rewrite the given equation in slope intercept form and find its slope.
y = x + 2
slope m_{2} = 1

Two lines are perpendicular if and only
their slopes are such that
m_{1} × m_{2} =  1

This gives m_{1} = 1

We now use the point slope form to find
the equation of the line with slope m_{1}.
y  (3) = 1(x  0)
which may be written
y =  x  3
Matched Questions
The following are questions matched to the questions presented above. Their answers are also included.
Matched Question 1
Find the slope of a line passing through the points
 ( 2 , 7) and ( 2 ,  1)
 (2 , 4) and ( 2 , 6)
 ( 1 ,  2) and (4 ,  2)
Matched Question 2
line that passes through the point (3 , 0) and has a slope of  1.
Matched Question 3
Find the equation of the line that passes through the points (2 , 0) and (3 , 3).
Matched Question 4
Find the slope of the line given by the equation
x  3 y =  9
Matched Question 5
Find an equation of the line that passes through the point (1 , 0) and is parallel to the line  2 x + 2 y = 8.
Matched Question 6
Find an equation of the line that passes through the point (2 , 1) and is perpendicular to the line x + 2 y = 2.
Answers to the Matched Questions
Matched Question 1
1) undefined
2)  1 / 2
3) 0
Matched Question 2
y =  x + 3
Matched Question 3
y = 3 x  6
Matched Question 4
slope = 1 / 3
Matched Question 5
y = x + 1
Matched Question 6
y = 2 x + 5
More References and LinksFind a Parallel Line Through a Point: Find a line that is parallel to another line and passes through a point.
Find a Perpendicular Line Through a Point: Find a line that is perpendicular to another line and passes through a point.
General Equation of a Line: ax + by = c  Applet
Slope Intercept Form Of a Line
Slope of a LineStep by Step Solver to Find The Equation of the Line parallel to Another Line.
Step by Step Solver to Find The Equation of the Line Perpendicular to Another Line.
Easy to use calculator to find slope and equation of a line through two points.Find Distance, Slope and Equation of Line  Calculator.
Calculator to find slope, x and y intercepts given the equation of a line.Find Slope and Intercepts of a Line  Calculator
Find Distance From a Point to a Line  Calculator
