Equation of Line Questions with Solutions

Question on how to find the slopes and equations of lines. A review of the concepts of slope and equations of lines are presented followed by questions with detailed solutions.

Slopes and Equations of Lines

Slope of a Line:

If a line passes through two distinct points P1(x1 , y1) and P2(x2, y2), its slope is given by:
m = (y2 - y1) / (x2 - x1)
with x2 not equal to x1.

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.


Point-Slope form of a line:


An equation of a line through a point P(x
1 , y1) with slope m is given by
y - y1 = m(x - x1)

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 m1 and m2 are such that
m1 m2 = - 1

Questions with Solutions

Question 1
Find the slope of a line passing through the points

  1. (2 , 3) and (0 , - 1)
  2. (- 2 , 4) and (- 2 , 6)
  3. (5 , 2) and (- 7 , 2)

Solution to Question 1
  1. m = (y2 -  y1) / (x2 - x1) = (-1 -  3) / (0 - 2) = 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.
  3. 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 y1 , x1 and m in the point slope form of a line
    y - y1 = m(x - x1)
    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 - y1 = m(x - x1)
    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 m1 be the slope of the line whose equation is to be found and m2 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 m2 = - 1.
  • Two lines are parallel if and only if they have equal slopes
    m1 = m2 = - 1
  • We now use the point slope form to find the equation of the line with slope m1.
    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 m1 be the slope of the line whose equation is to be found and m2 the slope of the given line. Rewrite the given equation in slope intercept form and find its slope.
    y = x + 2
    slope m2 = 1
  • Two lines are perpendicular if and only their slopes are such that
    m1 m2 = - 1
  • This gives m1 = -1
  • We now use the point slope form to find the equation of the line with slope m1.
    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

  1. (- 2 , 7) and (- 2 , - 1)
  2. (2 , 4) and (- 2 , 6)
  3. (- 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 Links

Find 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