Two distinct coplanar lines are parallel when they never meet. They are perpendicular when they meet at a right angle. Coordinates turn these geometric relationships into tests involving slopes or equation coefficients.

The familiar slope rules work for non-vertical lines. Vertical and horizontal lines are not exceptions to the geometry, but they need a description that does not divide by zero.

On this page

Parallel lines have the same direction

For non-vertical lines y=m1x+b1y=m_1x+b_1 and y=m2x+b2y=m_2x+b_2, equal slopes mean the same direction. If m1=m2m_1=m_2 and b1≠b2b_1\ne b_2, the lines are distinct and parallel. If the intercepts are also equal, the equations describe the same line.

Construct a parallel line

Find a line through P=(3,−4)P=(3,-4) parallel to y=2x+1y=2x+1. Its slope must also be 2. Use point-slope form:

y+4=2(x−3)⇒y=2x−10.y+4=2(x-3)\Rightarrow y=2x-10.

The intercept −10-10 differs from 1, so the lines are distinct. Substituting PP gives −4=2(3)−10-4=2(3)-10, confirming the required point.

Parallel lines with slope 2 and different intercepts

Parallel lines with slope 2 and different interceptsTwo lines of slope two have different intercepts. The lower line passes through three, negative four.−2246−8−6−4−22468100xyP (3, −4)y = 2x + 1y = 2x − 10
Matching slopes give a shared direction; different intercepts make the lines distinct.
Diagram explanation and exact data

The solid line is y = 2x + 1. The dashed line is y = 2x − 10. They have no common point.

Parallel lines with slope 2 and different intercepts: exact reference data
Line Slope y-intercept
y=2x+1y=2x+1 22 (0,1)(0,1)
y=2x−10y=2x-10 22 (0,−10)(0,-10)

Using an equal slope without checking whether the equations coincide can confuse “parallel distinct lines” with “two names for the same line.” This page uses the distinct-line convention for parallelism.

Perpendicular slopes are negative reciprocals

For two non-vertical lines that are perpendicular, neither line is horizontal and their slopes satisfy

m1m2=−1.m_1m_2=-1.

Equivalently, m2=−1/m1m_2=-1/m_1. Both the sign change and reciprocal matter: the perpendicular slope to 2 is −12-\tfrac12, not −2-2.

One way to see the relationship is through direction vectors. A line of slope mm has a direction vector (1,m)(1,m). Two direction vectors are perpendicular when their dot product is zero. Thus

(1,m1)⋅(1,m2)=1+m1m2=0.(1,m_1)\mathbin{\cdot}(1,m_2)=1+m_1m_2=0.

Here the dot product of (u,v)(u,v) and (s,t)(s,t) means us+vtus+vt. The slope relationship is also developed in the OpenStax linear-functions reference.

Construct a perpendicular line

Find the line through P=(3,−4)P=(3,-4) perpendicular to y=2x+1y=2x+1. Its slope is −12-\tfrac12, so

y+4=−12(x−3)y=−12x−52.\begin{aligned}y+4&=-\frac12(x-3)\\y&=-\frac12x-\frac52.\end{aligned}

The product of slopes is 2(−12)=−12(-\tfrac12)=-1. Substitution checks the point: at x=3x=3, y=−32−52=−4y=-\tfrac32-\tfrac52=-4.

Negative reciprocal directions

Negative reciprocal directionsThe line y equals two x plus one is perpendicular to the line y equals negative x over two minus five halves.−4−2246−6−4−22460xyP (3, −4)y = 2x + 1y = −x/2 − 5/2
Slopes 2 and −1/2 have product −1.
Diagram explanation and exact data

The dashed line passes through P and intersects the solid line at (−7/5, −9/5). The right-angle marker is computed from their perpendicular directions, not estimated from the screen.

Negative reciprocal directions: exact reference data
Line Slope
y=2x+1y=2x+1 22
y=−x/2−5/2y=-x/2-5/2 −1/2-1/2
Intersection (−7/5,−9/5)(-7/5,-9/5)

Horizontal and vertical lines

All vertical lines have equations x=cx=c. Two distinct vertical lines are parallel, even though neither has a numerical slope. All horizontal lines have equations y=dy=d; distinct horizontal lines are parallel with slope zero.

A vertical line and a horizontal line are perpendicular. For example, x=3x=3 and y=−4y=-4 meet at (3,−4)(3,-4) at a right angle. Do not put an undefined slope into the equation m1m2=−1m_1m_2=-1.

Equal unit scales are required when assessing geometric right angles from a plotted image. A stretched image can make perpendicular lines look oblique; the coordinates and equations remain the reliable evidence.

Tests using standard-form coefficients

Write the lines as

A1x+B1y=C1,A2x+B2y=C2,A_1x+B_1y=C_1,\qquad A_2x+B_2y=C_2,

where neither pair (Ai,Bi)(A_i,B_i) is (0,0)(0,0). Their directions are parallel when

A1B2−A2B1=0.A_1B_2-A_2B_1=0.

This test includes vertical lines. It identifies either parallel or coincident lines; substitute a point or compare the full scaled equations to distinguish those cases.

The lines are perpendicular when

A1A2+B1B2=0.A_1A_2+B_1B_2=0.

This works because (Ai,Bi)(A_i,B_i) is a normal vector, perpendicular to its line. For example, x+2y=7x+2y=7 and 2x−y=12x-y=1 have coefficient dot product 1(2)+2(−1)=01(2)+2(-1)=0, so they are perpendicular.

Constructing a perpendicular bisector

Let a segment have endpoints A=(−2,5)A=(-2,5) and B=(6,−1)B=(6,-1). Its midpoint is (2,2)(2,2) and its slope is

mAB=−1−56−(−2)=−34.m_{AB}=\frac{-1-5}{6-(-2)}=-\frac34.

The perpendicular-bisector slope is 43\tfrac43. The required line through the midpoint is

y−2=43(x−2),or4x−3y=2.y-2=\frac43(x-2),\qquad\text{or}\qquad4x-3y=2.

This is not just any perpendicular line: passing through the midpoint is essential. Every point on it is equally far from AA and BB, making perpendicular bisectors useful when locating a circle’s centre from points on its boundary.

Practice questions

  1. Find a line through (3,−4)(3,-4) parallel to y=2x+1y=2x+1.
  2. Find a line through the same point perpendicular to y=2x+1y=2x+1.
  3. Are x+2y=7x+2y=7 and 2x−y=12x-y=1 perpendicular? Give an algebraic check.
Check your answers
  1. Use slope 2: y+4=2(x−3)y+4=2(x-3), so y=2x−10y=2x-10.
  2. Use slope −12-\tfrac12: y+4=−12(x−3)y+4=-\tfrac12(x-3), so y=−12x−52y=-\tfrac12x-\tfrac52.
  3. Yes. The coefficient test gives 1(2)+2(−1)=01(2)+2(-1)=0. Their slopes, −12-\tfrac12 and 2, also have product −1-1.

Related topics

Distance from a Point to a Line uses a perpendicular segment to measure the shortest distance. Equations of Circles uses perpendicular bisectors to reconstruct a circle.

Sources and further reading