Rays and Half-Lines
Learning objectives
- Define a ray starting from a point in a given direction
- Write the parametric form for a ray
- Distinguish between rays and segments by the parameter range
A ray is a segment that does not stop. Stand at a point , pick a direction (say, toward another point ), and walk forever. The trail you trace out is a ray, it has a starting endpoint but no terminal one. We have already done the algebraic work for segments; this section adapts it to rays simply by letting the parameter grow without bound.
The parametric form
Given a starting point and a "direction" point , the ray from through is
At you are at ; at you reach ; for you continue past in the same direction. The constraint is what distinguishes a ray from a segment (which had ) or a full line (which has ).
- Computer Graphics: A ray traced from a camera through a pixel into a scene is mathematically with ; ray-tracing renderers test each ray for intersection with scene geometry to colour the pixel.
- Physics: A laser beam is a physical ray: it starts at the emitter and continues in a straight direction (assuming no obstacles or atmosphere); the constraint excludes "behind the laser" from any meaningful question.
- Optics: Snell's law of refraction traces light rays from the source through interfaces: each segment is a ray with until it hits the next surface, where a new ray is spawned.
Switch to "ray" mode. The widget shows a ray starting at the green anchor and extending in the slope direction. The dashed extension is the "opposite" direction the ray does not include.
Direction vector
The vector is the direction vector of the ray. Any positive scalar multiple of it represents the same direction, so the same ray. Example: with and , the direction vector is , and the ray is
At you are at , on the same ray but beyond .
Rays from the origin and same-direction tests
A ray from the origin in the direction of a nonzero point is the set . Two nonzero points and lie on the same ray from the origin precisely when for some positive scalar . If is negative, they lie on opposite rays through the origin, the same straight line, but pointing the wrong way.
Why rays matter
Rays are the building block for two geometric notions you have already met:
- An angle (§5.2) is the wedge between two rays sharing a common endpoint (the vertex).
- A convex set (the kind of region a parallelogram or disc encloses) is characterised by which rays it contains.
Beyond geometry, rays show up in linear programming, convex optimization, and the geometry of light. Half-lines are everywhere.
Try it
- Ray from toward . Direction . At : .
- Ray from origin through : every point on it has the form for . Try : .
- Do and lie on the same ray from the origin? Yes, and .
A trap to watch for
A common confusion is between a ray and its "reverse" ray. The ray from toward uses . The ray from in the opposite direction is a different ray, requiring in the same parametrisation. Two rays sharing the same endpoint but pointing opposite ways together form a line. So "the line " includes both rays, while "the ray from through " is only one of them. Watch the direction language carefully on a problem, "from to " and "from to " describe different rays.
What you now know
You can describe any ray by a parametric formula, identify its direction vector, and decide whether two points lie on the same ray from a given origin. The next section relaxes the parameter range completely, , to describe lines.
Quick check
Mark section complete →
References
- Lang, S. (1971). Basic Mathematics. Springer. Chapter 10, §2, rays via the parametric form.
- Coxeter, H. S. M. (1969). Introduction to Geometry, 2nd ed. Wiley. §13 develops half-lines and convex cones.
- Rockafellar, R. T. (1970). Convex Analysis. Princeton University Press. §1 defines rays and uses them for convex set theory.
- Hartshorne, R. (2000). Geometry: Euclid and Beyond. Springer. Chapter 1 reconciles the parametric and synthetic definitions of a ray.