The location of a line segment on the coordinate plane is defined by two endpoints whose coordinates are known. The line links the two endpoints but does not extend beyond them. It is a segment (piece) of a line.
This is the same as the definition of a line segment in ordinary plane geometry, the only difference being that we know the coordinates of the points involved. The naming conventions are also the same.
See also the Definition of a Line Segment in plane geometry.
In the interest of clarity in the applet above, the coordinates are rounded off to integers and the lengths rounded to one decimal place. This can cause calculatioons to be slightly off.
For more see Teaching Notes