Line Segments
Learning objectives
- Define a line segment between two points using a parametric description
- Evaluate the parametric form to find points on a segment
- Understand the parameter range for segments
A segment is the simplest geometric object after a point. Pick two points, draw the straight piece between them, and you have a segment. The non-obvious thing, the thing this section exists to teach, is that this segment has a clean algebraic description: every point on it is a weighted average of the two endpoints, controlled by a single parameter between and . The parametric idea you learn here scales up to rays, lines, curves, and even multi-dimensional surfaces.
The parametric form
Given endpoints and , the segment from to consists of all points
Check the endpoints: (start) and (end). For strictly between and you sweep continuously across the interior. An equivalent rearrangement uses the direction vector :
This makes the geometry transparent: start at , move of the way toward .
- Computer Graphics: Every line of code that draws a line segment between two pixels, CAD, game UI, data plots, uses the parametric form for t \in [0, 1], rasterised one pixel per step.
- Game Design: Pathfinding for a unit moving from A to B clamps its position to the segment until it reaches B; the parameter here is the fraction of the route completed.
- Animation: Linear interpolation (lerp) between two key positions is segment parametrisation: at , the character is exactly halfway between start and end. Every smooth motion in modern animation is built from chained lerps.
Switch to "segment" mode in the widget. Drag the anchor ; adjust slope and intercept; the line between the green and orange dots is the segment from to the next-unit point .
The midpoint and other proportional points
The parameter literally represents the fraction of the way from to . Some special values:
- : the point .
- : a quarter of the way from to .
- : the midpoint, , same as the midpoint formula.
- : two-thirds of the way from to .
- : the point .
For any rational , the point divides the segment in ratio from . This is how segment bisection, trisection, and general division calculations all reduce to one formula.
From point-set to parametric formula
The leap of insight here is that a one-dimensional geometric set (a segment, a curve in the plane, etc.) can be described by a one-dimensional algebraic parameter. The segment is the image of [0, 1] under the function . This idea, encoding geometry as a parametric function, is what allows you to describe curves you cannot easily draw, and it returns in calculus and in physics (motion of a particle along a trajectory).
Try it
- For and at : .
- For and at : midpoint is , matching the midpoint formula.
- For and at : .
A trap to watch for
The parameter range is what makes the formula represent a segment rather than an entire line. If you let go negative or above , you get points outside the segment, on the ray extending past or past . Common confusion: the formula only describes the segment when you restrict ; the same formula with unrestricted describes the full line. Always check which object you mean. The next two sections formalise rays and lines using exactly this idea.
What you now know
You can describe any segment by a parametric formula, compute the point at any fraction along it (midpoint, quarter, ratio division), and connect the parametric description to the midpoint formula from §8.2. The next section relaxes the parameter range to to describe rays.
Quick check
Mark section complete →
References
- Lang, S. (1971). Basic Mathematics. Springer. Chapter 10, §1, segments via the parametric form.
- Euclid (c. 300 BCE). Elements, Book I, Definitions 3-4 (Heath translation, Dover, 1956). The axiomatic origin of "segment" between two points.
- Coxeter, H. S. M. (1969). Introduction to Geometry, 2nd ed. Wiley. §13 covers convex combinations, segments as the simplest example.
- Stewart, J. (2015). Calculus, 8th ed. Cengage. Chapter 10 develops parametric curves as a generalisation of this idea.