Difference Between a Line and a Line Segment

#Geometry
TL;DR
The difference between a line and a line segment comes down to ends: a line has no endpoints and runs infinitely in both directions, while a line segment has two endpoints and a definite, measurable length. This article covers both definitions, a side-by-side comparison table, the notation, real-world examples, and the common mistakes students make telling them apart.
BT
Bhanzu TeamLast updated on June 15, 202610 min read

What Is a Line?

A line is a straight, one-dimensional figure that extends infinitely in both directions and has no endpoints. It is made of an unlimited number of points lying in a perfectly straight path, and because it never stops, a line has no measurable length. You name a line by any two points on it, written with a double-headed arrow above: $\overleftrightarrow{AB}$, where the arrows on both ends signal that it runs on forever.

A line is one of the undefined starting objects of geometry, you build almost everything else from it. A straight line is the shortest path idea taken to its limit: extend it past both points and never lift the pencil.

What Is a Line Segment?

A line segment is the part of a line between two endpoints. Those two endpoints are what make it finite: a segment starts at one point, ends at the other, and contains every point in a straight path between them. Because it has a definite start and finish, a line segment has a measurable length, you can lay a ruler along it and read off a number.

You name a segment by its two endpoints with a plain bar above (no arrows): $\overline{AB}$. The missing arrows are the whole point, they tell you it stops at $A$ and $B$. A line segment is what most "lines" you meet in the real world actually are: the edge of a book, the side of a triangle, the hand of a clock.

Difference Between a Line and a Line Segment: The Comparison

Both are straight and both are made of points, so the differences live in four places: the ends, the length, the notation, and what you can do with each. The table lays them side by side.

Feature

Line

Line Segment

Endpoints

None

Exactly two

Extent

Infinite, both directions

Finite, between the two endpoints

Length

Cannot be measured

Definite, measurable

Notation

$\overleftrightarrow{AB}$ (double arrow)

$\overline{AB}$ (plain bar)

Drawn as

Arrowheads on both ends

Solid points on both ends, no arrows

Example

The path of a laser with no walls

The edge of a ruler

One line of summary holds the whole comparison: a line is a segment that never stops, and a segment is the piece of a line you can actually hold a ruler to. They share a shape; they differ in where they end, which is exactly where one of them does not.

A quick word on the ray, the third member of this family, so the picture is complete. A ray has one endpoint and extends infinitely in one direction, notated $\overrightarrow{AB}$ with a single arrow. It sits exactly between the line (no ends) and the segment (two ends). For naming, order matters on a ray, $\overrightarrow{AB}$ starts at $A$, but for a line and a segment the order of the letters does not.

Where the Difference Between a Line and a Line Segment Shows Up

This is not hair-splitting for an exam. The distinction between "extends forever" and "stops at two points" decides whether you can measure something, whether two paths must eventually cross, and how a computer stores a shape.

  • Measurement and construction. A carpenter, tailor, or engineer works entirely in line segments, every cut, seam, and beam has two ends and a length. The infinite line is the guideline drawn first (a chalk line snapped across a wall), then trimmed to segments. You can measure a segment; you cannot measure a line.

  • Geometry proofs. Whether two paths must intersect often hinges on line versus segment. Two non-parallel lines always meet somewhere, even far off the page; two segments might not, because they could end before reaching the crossing point. Get this wrong in a proof and the conclusion collapses.

  • Computer graphics and CAD. A screen cannot store something infinite, so every shape a computer draws is built from line segments with stored endpoint coordinates. The "line tool" in any drawing app actually creates a segment. The infinite line exists only as a mathematical construct used to calculate, like finding where two walls would meet.

  • Navigation. A flight path between two airports is a segment (it has a start and an end you can measure in kilometres); the great-circle line it lies on continues around the whole globe.

For a student meeting geometry for the first time, this is the moment the vocabulary starts to carry real weight: the word you pick decides whether the thing can be measured at all.

Examples of the Line and Line Segment

The examples move from spotting the difference in a figure up to using it in a coordinate computation. The first few are about identifying; the later ones put the segment's measurability to work.

Example 1

Classify each as a line or a line segment: (a) a figure with arrowheads on both ends, (b) a figure with two solid endpoints and no arrows.

Read the ends. Arrowheads mean the figure continues forever in that direction; solid endpoints mean it stops there.

(a) Arrowheads on both ends, no stopping points, so it is a line. (b) Two solid endpoints, no arrows, so it is a line segment.

Example 2

A student is asked for the length of the line $\overleftrightarrow{AB}$ and answers "8 cm." What went wrong?

The instinct is reasonable, the figure looks like an 8 cm mark on the page, so the student measures it. Test that against the definition, though: a line extends infinitely in both directions, so it has no endpoints to measure between. The "8 cm" is just the length of the drawing, not of the line, which has no finite length at all.

The fix is to read the notation. The double-headed arrow $\overleftrightarrow{AB}$ marks an infinite line, which cannot be measured. Only a line segment $\overline{AB}$ has a length. The correct answer is that the length of a line is undefined, you can only measure a segment.

Example 3

Name the figure with endpoints $P$ and $Q$ and write its correct notation.

A figure with two endpoints is a line segment. Named by its endpoints, with a plain bar (no arrows) above:

$$\overline{PQ}.$$

The order does not matter for a segment, so $\overline{PQ}$ and $\overline{QP}$ name the same object.

Example 4

A line segment has endpoints $A(1, 2)$ and $B(7, 10)$. Find its length.

Because a segment is finite, it has a length, given by the distance formula:

$$AB = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} = \sqrt{(7 - 1)^2 + (10 - 2)^2}.$$

$$AB = \sqrt{6^2 + 8^2} = \sqrt{36 + 64} = \sqrt{100} = 10.$$

The length of segment $\overline{AB}$ is $10$ units. (A line through the same two points would have no such length.)

Example 5

How many line segments can be drawn through two fixed points, and how many lines?

Through any two distinct points, exactly one line segment can be drawn (the one joining them) and exactly one line (the one passing through both and extending beyond). The segment is the finite piece; the line is its infinite extension. Both are unique for a given pair of points.

Example 6

A square has vertices $A$, $B$, $C$, $D$. Are its four sides lines or line segments? How many segments in total, including the diagonals?

The sides have endpoints (the vertices), so they are line segments, four of them: $\overline{AB}, \overline{BC}, \overline{CD}, \overline{DA}$. The two diagonals $\overline{AC}$ and $\overline{BD}$ are also segments. That is six line segments in total. None of them are lines, a shape is bounded, and bounded edges always have endpoints.

Where Students Trip Up on the Difference Between a Line and a Line Segment

Mistake 1: Trying to measure a line

Where it slips in: A figure is labelled as a line, but it looks like a finite mark on the page, so the student measures it with a ruler.

Don't do this: Report a length for $\overleftrightarrow{AB}$ β€” a line has no endpoints, so no length.

The correct way: Only a line segment has a measurable length. A line extends infinitely, so its length is undefined.

Mistake 2: Confusing the notation (arrows vs bar)

Where it slips in: Writing the symbol for a segment when the figure is a line, or vice versa.

Don't do this: Use a double-headed arrow $\overleftrightarrow{AB}$ for a segment, or a plain bar $\overline{AB}$ for an infinite line.

The correct way: The bar $\overline{AB}$ (no arrows) is the segment; the double-headed arrow $\overleftrightarrow{AB}$ is the line; a single arrow $\overrightarrow{AB}$ is the ray. The memorizer, the student who learns "AB with a thing on top" without noticing which thing, mixes these constantly. The mark on top is the whole message: arrows mean it keeps going.

Mistake 3: Forgetting a ray sits between the two

Where it slips in: Sorting figures into just "line" or "line segment" and forcing a one-endpoint figure into one of those boxes.

Don't do this: Call a figure with one endpoint and one arrow a line segment (it is not, it is infinite on one side) or a line (it is not, it has an endpoint).

The correct way: A figure with one endpoint is a ray, the third object in the family. Lines have zero endpoints, rays have one, segments have two. Counting the endpoints sorts all three with no guessing.

The Short Version

  • The difference between a line and a line segment is endpoints: a line has none and is infinite; a segment has two and is finite.

  • A line cannot be measured; a line segment has a definite, measurable length.

  • Notation tells them apart: $\overleftrightarrow{AB}$ (arrows) is a line, $\overline{AB}$ (plain bar) is a segment.

  • A ray sits between them, with one endpoint and a single arrow $\overrightarrow{AB}$.

  • The most common mistake is trying to measure a line, only the segment has a length.

Practice These Problems to Solidify Your Understanding

  1. A figure has one solid endpoint at $A$ and an arrowhead pointing through $B$. Name it and write its notation.

  2. Find the length of the line segment with endpoints $C(-2, 1)$ and $D(4, 9)$.

  3. How many line segments are there along the edges of a triangle, and are any of them lines?

Answer to Question 1: it is a ray, written $\overrightarrow{AB}$ (one endpoint, one arrow). Answer to Question 2: $\sqrt{(4 - (-2))^2 + (9 - 1)^2} = \sqrt{36 + 64} = \sqrt{100} = 10$ units. Answer to Question 3: three line segments (the three sides), and none are lines, each side has two endpoints. If Question 1 gave you "line" or "line segment," revisit Mistake 3 on the ray.

Want a live Bhanzu trainer to walk your child through points, lines, and line segments? Book a free demo class β€” online globally.

Book a Free Demo

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?
The difference between a line and a line segment is endpoints: a line has no endpoints and extends infinitely in both directions, so it cannot be measured, while a line segment has two endpoints and a definite, measurable length.
What is the difference between a ray, a line, and a line segment?
A line has no endpoints (infinite both ways), a ray has one endpoint (infinite one way), and a line segment has two endpoints (finite). Count the endpoints: 0, 1, 2.
How is a line segment measured?
Lay a ruler along it and read the length, or, on a coordinate grid, use the distance formula $\sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$ between its two endpoints.
What are three real-world examples of line segments?
The edge of a book, the side of a triangle, and the hand of a clock, each has two clear endpoints and a measurable length.
How many line segments make a square?
Six, if you count the diagonals: four sides plus two diagonals. Just the sides would be four. Every one is a segment, because each has two endpoints (the vertices).
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now β†’