A line segment is a straight part of a line with two endpoints. It starts at one point, stops at another, and includes every point between them. A segment with endpoints A and B is written AB. Unlike a line, which goes on forever, a segment has a definite length that you can measure.
Arrows mean the figure keeps going. A segment has no arrows, only two endpoints, so it has a length. Lengths of segments on one line add: PQ + QR = PR.
Formal definition and notation
Given two distinct points A and B, the line segment AB is the set made of A, B and all points of the line AB that lie between A and B. Its length, written AB without the bar, is the distance between the endpoints. On the coordinate plane, AB = √(x2 − x1)2 + (y2 − y1)2.
Drag the two endpoints, or select one and use the arrow keys. The bracket marks the segment between them, and the readout gives its length as the distance between the endpoints.
This interactive needs JavaScript. The worked examples below show the same ideas step by step.
Line Segment examples, step by step
Example 1: Count the segments
Warm-up
Points A, B and C are corners of a triangle. Name all of its sides as line segments.
Each side joins two corners, and each corner is an endpoint.
The sides are AB, BC and CA.
BA would name the same segment as AB, so there are no others.
Answer: Three segments: AB, BC and CA.
Example 2: Segment addition
Core
Point M lies on JK. JM = 2x + 1, MK = 3x − 4 and JK = 27. Find x and JM.
Segment addition: JM + MK = JK, so (2x + 1) + (3x − 4) = 27.
The midpoint is one point, halfway along a segment. For AB from 0 to 10 on a number line, the midpoint is 5.
Quick check: 3 questions
Question 1 of 3
Which figure has exactly two endpoints?
Show answer and explanation
Answer: C. A line segment begins and ends at two endpoints. A ray has only one endpoint, and a line and a plane go on forever with no endpoints.
Question 2 of 3
B is on AC. AB = 9 and AC = 15. What is BC?
Show answer and explanation
Answer: B. By segment addition, AB + BC = AC, so BC = 15 − 9 = 6. 24 adds the two lengths, which would make the part longer than the whole.
Question 3 of 3
What is the length of the segment from (−2, 3) to (4, 3)?
Show answer and explanation
Answer: D. The y-coordinates match, so the segment is horizontal and its length is |4 − (−2)| = 6. 2 comes from 4 + (−2), and 36 is 62 without the square root.
Line Segment: frequently asked questions
What is the difference between a line and a line segment?
A line goes on forever in both directions, so it has no endpoints and no length. A line segment is the piece of a line between two endpoints, so it has a definite length. In drawings, a line has arrows on both ends and a segment has dots at its endpoints. Notation also differs: a segment uses a bar over the two letters.
How do you name a line segment?
Use its two endpoints with a bar over the letters: AB or BA, which are the same segment. To talk about its length, drop the bar and write AB = 7. Name a segment only by its endpoints, never by a point in the middle.
Is a side of a triangle a line segment?
Yes. Each side of a triangle, or of any polygon, is a line segment that joins two vertices. A triangle has three sides, so it is made of three segments, and its perimeter is the sum of their lengths. The diagonals of a polygon are segments too.
LengthLength is how long something is: the distance from one end of an object to the other. You measure it by counting equal units laid end to end with no gaps or overlaps, such as inches, feet, centimeters or meters. A new pencil is about 7 inches long.Measurement · Grade 1, Grade 2, Grade 3Coordinate PlaneThe coordinate plane is a flat grid formed by a horizontal x-axis and a vertical y-axis crossing at the origin, (0, 0). Every point is located by an ordered pair, x first then y, such as (3, −2). The two axes divide the plane into four quadrants, numbered I to IV counterclockwise from the upper right.Geometry · Grade 5, Grade 6, Grade 7NumberA number is an amount or value used to count, measure, order and compare. We write numbers with digits (7), words (seven) or other symbols, but the number itself is the amount: 7 dots, the word seven and the numeral 7 all show the same number. Numbers include whole numbers, fractions, decimals and negatives.Number System · Kindergarten, Grade 1, Grade 2SideA side is one of the straight line segments that form the outline of a polygon. Two sides meet at each corner, or vertex. A triangle has 3 sides and a square has 4, and adding the lengths of all the sides gives the perimeter.Geometry · Kindergarten, Grade 1, Grade 2PolygonA polygon is a flat, closed shape made of straight line segments, called sides, that meet only at their endpoints. Each corner is a vertex. Polygons are named by their number of sides: a triangle has 3, a quadrilateral 4, a pentagon 5, a hexagon 6 and an octagon 8.Geometry · Grade 2, Grade 3, Grade 5TriangleA triangle is a polygon with three sides and three angles. Its three corners are called vertices, and the angle measures in any triangle add to 180 degrees. Triangles are classified by their sides (equilateral, isosceles, scalene) and by their angles (acute, right, obtuse).Geometry · Grade 3, Grade 4, Grade 5AdditionAddition is the operation that puts amounts together to find the total. The numbers you add are called addends, the answer is the sum, and the sign is the plus sign, +. For example, 7 + 5 = 12. On a number line, adding a positive number means moving to the right.Operations · Kindergarten, Grade 1, Grade 2MidpointA midpoint is the point exactly halfway between the two endpoints of a line segment, so it splits the segment into two equal parts. On the coordinate plane, find it by averaging the coordinates: the midpoint of (x1, y1) and (x2, y2) is (x1 + x22, y1 + y22).Geometry · Grade 8, Algebra 1, GeometryCongruentCongruent means exactly the same size and shape. Two segments are congruent when they have the same length, two angles when they have the same measure, and two figures when one can be turned, flipped or slid onto the other. The symbol is ≅: AB ≅ CD reads “segment AB is congruent to segment CD.”Geometry · Grade 8, GeometryDiameterThe diameter of a circle is the distance straight across it through the center. It is twice the radius, d = 2r, and it is the longest chord any circle has. The word also names the line segment itself: a segment that passes through the center and touches both sides of the circle.Geometry · Grade 6, Grade 7, Grade 8RadiusThe radius is a line segment from the center of a circle to any point on the circle, or the length of that segment. The radius is half the diameter: if the diameter is 10, the radius is 5. All radii in the same circle have equal length, and r is the radius in C = 2π r.Geometry · Grade 6, Grade 7, Grade 8CircleA circle is the set of all points in a flat plane that are the same distance from one fixed point, the center. That distance is the radius. A segment through the center from edge to edge is the diameter, twice the radius. The distance around is the circumference, 2π r, and the area inside is π r2.Geometry · Kindergarten, Grade 1, Grade 7HypotenuseThe hypotenuse is the longest side of a right triangle. It is always across from the right angle, and the two shorter sides that form the right angle are the legs. In the Pythagorean theorem a2 + b2 = c2, the hypotenuse is c: in a 3-4-5 right triangle, it is the side of length 5.Geometry · Grade 8, Algebra 1Right TriangleA right triangle is a triangle with one right angle, an angle of exactly 90 degrees. The two sides that form the right angle are the legs, and the longest side, across from the right angle, is the hypotenuse. Its sides follow the Pythagorean theorem: a2 + b2 = c2.Geometry · Grade 4, Grade 6, Grade 8Like TermsLike terms have exactly the same variables raised to exactly the same powers; only their coefficients may differ. 3x and 8x are like terms, and so are 5a2 and −2a2, but 4x and 4y are not. Only like terms can be combined by adding or subtracting their coefficients: 3x + 8x = 11x.Algebra · Grade 6, Grade 7, Grade 8LineA line is a perfectly straight path of points that goes on forever in both directions. It has no thickness and no endpoints, so it has no length you can measure. Through any two points there is exactly one line, which is named by those two points, as in line AB, or by one lowercase letter.Geometry · Grade 4, Grade 8, GeometryRayA ray is part of a line that starts at one endpoint and goes on forever in one direction, like a beam of light from a flashlight. It is named by its endpoint first and then any other point on it, so ray AB starts at A and passes through B. Two rays sharing an endpoint form an angle.Geometry · Grade 4, GeometryNumber LineA number line is a straight line with numbers placed at equal distances along it, so every point stands for a number. Zero sits in the middle, positive numbers go to the right and negative numbers to the left. Numbers increase from left to right, so a number line shows order, distance and adding as moving.Number System · Grade 2, Grade 3, Grade 6PointA point is an exact location in space. It has no length, no width and no thickness, so it has no size at all. You draw a point as a dot and name it with a capital letter, such as point A. On a coordinate plane, an ordered pair such as (3, 2) names a point.Geometry · Grade 4, Grade 5, Grade 6PlaneA plane is a perfectly flat surface that has no thickness and extends forever in every direction, like a tabletop that never ends. It is one of the undefined terms of geometry, along with point and line. Any three points that are not on one line lie in exactly one plane.Geometry · Grade 7, Grade 8, GeometryCongruent FiguresCongruent figures have exactly the same size and shape. One can be moved onto the other by sliding, flipping or turning, so every pair of matching sides and angles is equal. Two squares with side 5 are congruent; a 3-4-5 triangle and a 6-8-10 triangle are not, because their sizes differ. The symbol is ≅.Geometry · Grade 7, Grade 8PerimeterPerimeter is the total distance around a two-dimensional shape. To find it, add the lengths of all the sides. A rectangle with sides 5 and 3 has perimeter 5 + 3 + 5 + 3 = 16. Perimeter is a length, so it uses length units such as inches or meters, never square units.Geometry · Grade 3, Grade 4, Grade 5Parallel LinesParallel lines are lines in the same plane that never intersect. They stay the same distance apart and point in the same direction, like the rails of a straight railroad track. On a coordinate plane, parallel lines have the same slope but different y-intercepts. The symbol ∥ means is parallel to.Geometry · Grade 4, Grade 5, Grade 6Perpendicular LinesPerpendicular lines are lines that intersect to form right angles: their intersection makes a 90-degree angle. The symbol ⊥ means is perpendicular to. On a coordinate plane, two perpendicular lines that are not vertical have slopes that multiply to −1, such as 2 and −12.Geometry · Grade 4, Grade 5, Grade 6AngleAn angle is formed by two rays that share the same endpoint, called the vertex. It is measured in degrees by how far one ray is turned from the other. A right angle measures 90 degrees, a straight angle measures 180 degrees, and one full turn is 360 degrees.Geometry · Grade 4, Grade 5, Grade 6