# Difference Between a Line and a Line Segment

## 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.

## 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: AB↔80\overleftrightarrow{AB}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](/content/math/geometry/straight-line/index.html) 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): AB‾\overline{AB}AB. The missing arrows are the whole point; they tell you it stops at AAA and BBB. A [line segment](/content/math/geometry/line-segment/index.html) 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** | AB↔\overleftrightarrow{AB}AB (double arrow) | AB‾\overline{AB}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 AB→\overrightarrow{AB}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, AB→\overrightarrow{AB}AB starts at AAA, 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 AB↔\overleftrightarrow{AB}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 AB↔\overleftrightarrow{AB}AB marks an infinite line, which cannot be measured. Only a **line segment** AB‾\overline{AB}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 PPP and QQQ 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:

PQ‾\overline{PQ}.PQ​.

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

### Example 4

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

Because a segment is finite, it has a length, given by the [distance formula](/content/math/formula/distance-formula/index.html):

AB=(x2−x1)2+(y2−y1)2=(7−1)2+(10−2)2.AB = \sqrt{(x\_2 - x\_1)^2 + (y\_2 - y\_1)^2} = \sqrt{(7 - 1)^2 + (10 - 2)^2}.AB=(x2​−x1​)2+(y2​−y1​)2​=(7−1)2+(10−2)2​.

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

The length of segment AB‾\overline{AB}AB is 101010 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 AAA, BBB, CCC, DDD. 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: AB‾,BC‾,CD‾,DA‾\overline{AB}, \overline{BC}, \overline{CD}, \overline{DA}AB,BC,CD,DA. The two diagonals AC‾\overline{AC}AC and BD‾\overline{BD}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 labeled 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 AB↔\overleftrightarrow{AB}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 AB↔\overleftrightarrow{AB}AB for a segment, or a plain bar AB‾\overline{AB}AB for an infinite line.

**The correct way:** The bar AB‾\overline{AB}AB (no arrows) is the **segment**; the double-headed arrow AB↔\overleftrightarrow{AB}AB is the **line**; a single arrow AB→\overrightarrow{AB}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: AB↔\overleftrightarrow{AB}AB (arrows) is a line, AB‾\overline{AB}AB (plain bar) is a segment.
- A ray sits between them, with one endpoint and a single arrow AB→\overrightarrow{AB}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 AAA and an arrowhead pointing through BBB. Name it and write its notation.
2. Find the length of the line segment with endpoints C(−2,1)C(-2, 1)C(−2,1) and D(4,9)D(4, 9)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 AB→\overrightarrow{AB}AB (one endpoint, one arrow).
- **Answer to Question 2:** (4−(−2))2+(9−1)2=36+64=100=10\sqrt{(4 - (-2))^2 + (9 - 1)^2} = \sqrt{36 + 64} = \sqrt{100} = 10(4−(−2))2+(9−1)2​=36+64​=100​=10 units.
- **Answer to Question 3:** three line segments (the three sides), and none are lines; each side has two endpoints.
