Lines in the Plane

Part 11, Chapter 11: Lines, Rays, and Segments

Learning objectives

  • Describe a line through two points using parametric form
  • Understand that the parameter ranges over all real numbers for a line
  • Determine when two lines are parallel or perpendicular from their direction vectors

A line is what you get when you let the parameter run free. Segments stop at the endpoints; rays have one endpoint; a line extends infinitely in both directions. By removing all restrictions on the parameter tt, the same parametric formula we have used for segments and rays now describes an entire line. With this final relaxation we get the basic object of synthetic and analytic geometry, the straight, unbounded path through two points.

The parametric form

The line through points AA and BB consists of all points

P(t)=(1t)A+tB;=;A+t(BA)quadtextfortinmathbbR.P(t) = (1 - t)A + tB \;=\; A + t(B - A) \quad \text{for } t \in \mathbb{R}.

Negative tt produces points before AA (on the opposite side from BB); 0leqtleq10 \leq t \leq 1 recovers the segment from AA to BB; tgeq1t \geq 1 continues past BB. So the parametric form unifies three different objects:

  • Segment from AA to BB: 0leqtleq10 \leq t \leq 1.
  • Ray from AA through BB: tgeq0t \geq 0.
  • Line through AA and BB: tinmathbbRt \in \mathbb{R}.
Where this shows up
  • Robotics: The line connecting two waypoints, extended infinitely, is used in motion planning to test whether a straight-line path between any two points lies inside the safe region; this is the segment-as-test-line application.
  • Computer Vision: The Hough transform detects line segments in images by accumulating votes for all possible lines (rho,theta)(\rho, \theta) passing through each edge point; the parameter space is exactly the line's two-real-parameter description.
  • Navigation: A great-circle route on the sphere is the analogue of a straight line; its parametric description (with tt running over all reals on a spherical line) is what airline routing software computes for optimal trajectories.

Click "line" in the mode selector. Adjust slope mm and intercept bb; the line extends to both edges of the canvas. The dashed extension you see in segment or ray mode is now the solid line itself.

Direction vectors

The vector mathbfd=BA\mathbf{d} = B - A is a direction vector of the line. Any nonzero scalar multiple of mathbfd\mathbf{d} also serves as a direction vector for the same line (because scaling by cneq0c \neq 0 stretches but does not reorient the line). Two lines with direction vectors mathbfd_1\mathbf{d}_1 and mathbfd2\mathbf{d}_2 are parallel when one is a nonzero scalar multiple of the other.

Parallel and perpendicular

Two clean tests, both using the components mathbfd1=(a1,b_1)\mathbf{d}_1 = (a_1, b_1) and mathbfd2=(a2,b2)\mathbf{d}_2 = (a_2, b_2):

  • Parallel ⇔ the cross-product determinant a1b2a2b1=0a_1 b_2 - a_2 b_1 = 0.
  • Perpendicular ⇔ the dot product a1a2+b1b2=0a_1 a_2 + b_1 b_2 = 0.

For example, (3,2)(3, 2) and (2,3)(-2, 3): dot product =(3)(2)+(2)(3)=6+6=0= (3)(-2) + (2)(3) = -6 + 6 = 0, so the lines are perpendicular. These are the same dot- and cross-product tests you will see at the heart of linear algebra and vector calculus.

Euclidean facts you now have on coordinates

  • Two distinct points determine a unique line through them.
  • Two distinct lines in the plane either intersect in exactly one point or are parallel (and do not intersect).
  • Through any point not on a given line, there is exactly one line parallel to it (Euclid's fifth postulate, made algebraic).

Try it

  • Line through A=(1,3)A = (1, 3) and B=(4,1)B = (4, -1). Direction =(3,4)= (3, -4). Parametric form: P(t)=(1+3t,;34t)P(t) = (1 + 3t,\; 3 - 4t). Try t=1t = -1: (2,7)(-2, 7), on the opposite side of AA from BB.
  • Are the lines through (0,0),(2,3)(0, 0), (2, 3) and through (1,1),(5,7)(1, 1), (5, 7) parallel? Direction vectors (2,3)(2, 3) and (4,6)=2(2,3)(4, 6) = 2(2, 3). Yes, parallel.
  • Are the lines with direction (3,2)(3, 2) and (2,3)(-2, 3) perpendicular? Dot product =0= 0. Yes.

A trap to watch for

Beginners sometimes assume that "two lines have the same equation @⇔ same line." But a line can be written by infinitely many different parametric formulas (any choice of AA on the line, any nonzero direction vector). Likewise, in slope-intercept form (next section), y=2x+3y = 2x + 3 and 2y=4x+62y = 4x + 6 describe the same line. Two lines are the same line when they pass through the same set of points, not when their equations are literally identical. To check sameness, pick two points on each and verify both lie on both.

What you now know

You can describe any line by a parametric formula, identify direction vectors, and test parallelism or perpendicularity using cross- and dot-product tests. The next section gives the more familiar slope-intercept form y=mx+by = mx + b, which is the everyday way to write a line equation in school.

Quick check

Mark section complete →

References

  • Lang, S. (1971). Basic Mathematics. Springer. Chapter 10, §3, lines via the parametric form.
  • Euclid (c. 300 BCE). Elements, Book I, Postulates 1, 5 (Heath translation, Dover, 1956). The original synthetic axioms for lines.
  • Coxeter, H. S. M. (1969). Introduction to Geometry, 2nd ed. Wiley. §1 develops lines and the parallel postulate.
  • Artin, M. (2011). Algebra, 2nd ed. Pearson. Chapter 3 connects lines to linear algebra via the parametric form.

This page is prerendered for SEO and accessibility. The interactive widgets above hydrate on JavaScript load.