Home

Straight Line Calculator

Points-and-segments counter. Enter n points on a line to count all segments as n(n−1)/2, with enumeration—for counting principles.

展开更多 ▾
Segments from n points = C(n,2) = n(n−1)/2
直线上 n 个点
Total points on the line, at least 2

📖 Tutorial | Line, Ray, Segment

1. Definition
A line has no endpoints, a ray has one, and a segment has two and is measurable. Postulate: two points determine a line.
2. Formula & Notation
nTotal points on the line
C(n,2)Ways to choose 2 points
3. Properties & Laws
  • Two points determine a line and a segment;
  • Order does not matter, hence combinations;
  • n collinear points give n(n−1)/2 segments;
  • Lines and rays cannot be measured.
4. Steps
  1. Enter the number of points n (≥2);
  2. Click "Count";
  3. Or click "Load Example".
5. Worked Examples
Example: 5 points on a line.
Solution: 5×4/2 = 10 segments.
6. Common Pitfalls
Do not use n×(n−1), which double-counts;
Need n≥2;
Count rays by direction.

❓ FAQ | Line, Ray, Segment

How do line, ray, and segment differ?
A line has no endpoints, a ray one, a segment two and is measurable.
What do two points determine?
A unique line and a unique segment.
Why use combinations?
Any two distinct points give one segment, regardless of order.
How many segments for n points?
n(n−1)/2; e.g. 5 points give 10.
How are rays counted?
Each point starts a ray each way; count from the figure.
Which is longer, segment or line?
A line is infinite and cannot be compared; a segment has fixed length.