In geometry, a segment is a set of points that includes two endpoints and all the points between them. Segments are used to represent the length, height, or width of an object, or the distance between two objects. Examples of line segments include the sides of a triangle or square.