Parallel lines (Coordinate Geometry)
Two lines are parallel if they have the same slope, or if they are both vertical.
Try this Drag any of the 4 points below to move the lines. Note they are parallel when the slopes are the same.

When two straight lines are plotted on the coordinate plane, we can tell if they are parallel from the slope, of each line. If the slopes are the same then the lines are parallel. In the figure above, there are two lines that are determined by given points. Drag any point to reposition the lines and note that they are parallel only when the slopes are equal.

The slope can be found using any method that is convenient to you:

And of course, you can use different methods for each line.

When they are vertical

Recall that if a line is vertical it has no defined slope. (See Slope of a line). Vertical lines are parallel by definition. A line is vertical if the x-coordinates of two points on the line are the same.

Example 1.   Are two lines parallel?

Fig 1. Are these lines parallel?

In Fig 1 there are two lines. One line is defined by two points at (5,5) and (25,15). The other is defined by an equation in slope-intercept form form y = 0.52x - 2.5. We are to decide if they are parallel.

For the top line, the slope is found using the coordinates of the two points that define the line. (See Slope of a Line for instructions).

slope equals 15 minus 5 over 25 minus 5
equals 10 over 20 equals 0.5

For the lower line, the slope is taken directly from the formula. Recall that the slope intercept formula is y = mx + b, where m is the slope. So looking at the formula we see that the slope is 0.52.

So, the top one has a slope of 0.5, the lower slope is 0.52, which are not equal. Therefore, the lines are not parallel. The lines are very close to being parallel, and may look parallel, but appearance can deceive.

Example 2. Define a line through a point parallel to a line

In Fig 2 is a line AB defined by two points. We are to plot a line through the given point P parallel to AB.
Plot showing a line through the points A(10,20) and B(35,7).  Also a point C at (12,10)
Fig 2. we need a line parallel to AB through C

We first find the slope of the line AB using the same method as in the example above.

20 minus 7 over 10 minus 35, equals 13 over minus 25, equals negative 0.52

For the line to be parallel to AB it will have the same slope, and will pass through a given point, C(12,10). We therefore have enough information to define the line by its equation in point-slope form form:

y = -0.52(x-12)+10
This is one of the ways a line can be defined and so we have solved the problem. If we wanted to go ahead and actually plot the line we can do so by finding another point on the line using the equation and then draw the line through the two points. For more on this see Equation of a Line (point - slope form)

Things to try

  1. In the above diagram, press 'reset'.
  2. Note that because the slopes are the same, the lines are parallel.
  3. Adjust one of the points defining the lines. They are no longer parallel.
  4. Drag a point on the other line to make them parallel again.
  5. Drag a point until the lines are not parallel. Click on "hide details". Determine the slope of both lines and prove they are not parallel. Click "show details" to verify.


In the interest of clarity in the applet above, the coordinates are rounded off to integers and the lengths rounded to one decimal place. This can cause calculatioons to be slightly off.

For more see Teaching Notes

Other linear equation topics

Linear Function Explorer