Key Points
- Line: no endpoints, endless both ways, no length. Written .
- Line segment: two endpoints and a length. Written ; its length is .
- Ray: one endpoint, endless one way. Written , starting at .
- Count the endpoints, 0, 1 or 2, and all three are sorted.
- Two lines that cross can carry segments that never touch.
Two Words That Look the Same on Paper
Draw a straight pencil mark between two dots, and the mark alone cannot say what it is. Is it a line or a line segment?
- An arrowhead on each end means a line, which never stops.
- Dots at the ends mean a line segment, which you can measure.
- Where it ends, or whether it ends, is the whole difference between a line and a line segment.

What Is a Line?
The short answer to the title: a line never ends, while a line segment stops at two endpoints, so only the segment has a length. Start with the line.
A line is a straight path of points that goes on without end in both directions. With no ends, there is nothing to measure from, so it has no length.
- It is named by two of its points with a two-headed arrow: , or by one letter, such as line .
- Letter order does not matter: .
- Through any two different points there is exactly one line.
- Picture a straight line through two points, carried on past both forever.
What Is a Line Segment?
A line segment is the part of a line between two endpoints, including the endpoints. It starts and stops, so a ruler gives its length.
- It is written with a plain bar: . No arrows means it stops.
- Without the bar, means its length: " cm".
- Every segment has exactly one midpoint, found on a grid with the midpoint formula. A line has none.
- Most real "lines" are a line segment: a book's edge, a triangle's side, a clock hand.
What Is a Ray?
A ray has one endpoint and goes on without end in one direction.
- It is written , and the first letter is always the endpoint.
- So and point opposite ways.
- Two opposite rays from one point make a whole line.
Difference Between a Line and a Line Segment: The Comparison
Both are straight; they differ in their ends, length and notation.
| Line | Ray | Line segment | |
|---|---|---|---|
| Endpoints | 0 | 1 | 2 |
| Extends | forever, both ways | forever, one way | not at all |
| Length | none | none | a definite number |
| Midpoint | none | none | exactly one |
| Notation | |||
| Letter order matters? | no | yes | no |
| Drawn with | an arrowhead at each end | a dot and an arrowhead | a dot at each end |
| Everyday model | an idea only | a torch beam | the edge of a ruler |
- In short: a segment is the piece of a line you can hold a ruler to.
A Line on a Grid, and the Segment Inside It
On a grid, a segment is exactly the piece of a line between two points. Take and . Every point on their line is
- gives , gives , and gives the midpoint .
- The segment is every point with .
- The ray from is every point with .
- The line is every : at is on the line, not the segment.
- The segment's length is the distance between two points: .

Try It Yourself
In the tool, the thick orange piece is the segment, with its length from the distance formula. The dashed purple line stops at the grid's edge, but the line itself does not. Drag and : the segment's length changes, while the line has none to report.
Where the Difference Between a Line and a Line Segment Shows Up
"Goes on forever" versus "stops at two points" decides what you can measure and what must cross.
Only segments can be measured
- Length, midpoint, perimeter and area all need ends.
- A triangle's sides are segments, so it has a perimeter.
- "The length of line " does not exist.
Lines must meet; segments need not
- Two different lines in a plane cross once or are parallel.
- Segments can end before the crossing point.
- The segments to and to lie on lines crossing at , but the segments never touch.

Counting gives different answers
- Four points on one line: 6 segments but only 1 line.
- Four points, no three in a line: 6 segments and 6 lines.
- For points, there are segments, one per pair.

Building, drawing and light
Everything you can touch is a segment at best; the line is an idea.
- Building: every cut, seam and beam has two ends and a length.
- Drawing software: the "line" tool stores a segment as two endpoints.
- Light: a torch beam starts at the torch and keeps going, so it is a ray.

Euclid's Lines Were Mostly Segments
The old meanings were different from today's.
- In Euclid's Elements, about 300 BCE, a "line" could even be curved, and its ends were points.
- His straight lines were finite: what we call segments.
- His second postulate let you extend a segment as far as needed. The endless "line" came much later.
Examples of Lines and Line Segments
These move from spotting the difference to using it on a grid.
Example 1
Classify: (a) arrowheads at both ends; (b) a dot at one end, an arrowhead at the other; (c) dots at both ends.
- Count the endpoints: 0, 1 and 2.
- Final answer: (a) a line, (b) a ray, (c) a line segment.
Example 2
A student measures the drawing of line AB (two-headed arrow): 8 cm. What is the right answer?
- The arrows say it goes on forever; the drawing is only a piece.
- Final answer: a line has no length. The segment would be 8 cm.

Example 3
Write the segment from P to Q, the ray from P through Q, and the ray from Q through P.
- Segment: , the same as .
- Final answer: rays and , which differ.
Example 4
Segment AB runs from A(1, 2) to B(7, 10). Find its length, then place C(4, 6), D(10, 14) and E(4, 5).
- .
- The line is .
- C: fits, so it is on the segment (the midpoint).
- D: fits, so it is on the line, beyond .
- E: needs , not 5, so it is off the line.

Example 5
How many lines and segments do two points give? Four points on one line?
- Two points: 1 segment and 1 line.
- Four points on a line: segments, all on 1 line.
Example 6
C lies on segment AB with AC = 3 cm and CB = 5 cm. Find AB. Works for a line?
- cm, by the segment addition postulate.
- Final answer: 8 cm. A line has no total to add up to.
Where Students Trip Up on the Difference Between a Line and a Line Segment
Most slips come from trusting the drawing instead of the marks on its ends.
Mistake 1: Measuring a line
Where it slips in: Every drawing of a line looks finite.
Don't do this: Give a length for .
The correct way: Arrows mean "do not measure"; only a segment has a length.
Mistake 2: Mixing up the marks above the letters
Where it slips in: Copying notation fast.
Don't do this: Write for a line, or cm.
The correct way: Bar for a segment, one arrow for a ray, two for a line, no mark for a length.
Mistake 3: Forgetting that a ray sits between the two
Where it slips in: Sorting figures into only two boxes.
Don't do this: Call a one-endpoint figure a segment or a line.
The correct way: One endpoint means a ray. Write its endpoint first: the ray from through is .
Mistake 4: Assuming two sides meet because their lines do
Where it slips in: Proofs and grid questions about crossing edges.
Don't do this: Say the segments cross where their lines cross.
The correct way: Check the crossing point lies between the endpoints of both.
The Short Version
- A line has no endpoints; a segment has two; a ray has one.
- Ask "how many ends?" and all three sort themselves.
- line, ray, segment, its length.
- Only segments have a length, and segments on crossing lines need not meet.
Practice These Problems to Solidify Your Understanding
Practice these problems to solidify your understanding. In the tool, pick a point on the dashed line beyond and check its is more than 1.
- A figure has an endpoint at and an arrowhead through . Name it and write it.
- Find the length of the segment from to .
- How many segments make a triangle's edges, and are any of them lines?
Answers: a ray, ; units; three, and none are lines. If Question 1 gave "line" or "segment", see Mistake 3.
To build these foundations with a teacher, explore Bhanzu's geometry tutor sessions.
Want a live Bhanzu trainer to guide your child through points, lines and segments? Book a free demo class.
Read More
Research Behind This Article
- Euclid, Elements, Book I, Definitions 1 to 4 (point, line, the ends of a line, straight line), with commentary by D. E. Joyce, Clark University. mathcs.clarku.edu
- Euclid, Elements, Book I, Postulate 1 (a straight line from any point to any point), with commentary by D. E. Joyce, Clark University. mathcs.clarku.edu
- Euclid, Elements, Book I, Postulate 2 (extending a finite straight line), with commentary by D. E. Joyce, Clark University. mathcs.clarku.edu
- OpenStax, Contemporary Mathematics, Section 10.1: Points, Lines, and Planes (line, segment and ray notation). openstax.org
- Euclid, Elements, Book I, Proposition 20 (any two sides of a triangle are together longer than the third, the reason the segment is the shortest path), D. E. Joyce, Clark University. mathcs.clarku.edu
Quick Quiz: Check Yourself
Three levels, questions with figures, instant feedback with the reason.
Was this article helpful?
Your feedback helps us write better content
Frequently Asked Questions
What is the main difference between a line and a line segment?
What is the difference between a line, a ray and a line segment?
How is a line segment measured?
Can a line segment be part of a line?
Is a line segment the shortest path between two points?
How many line segments make a triangle or a square?
