Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

So I've got a homework question I'm stuck on. It's asking me to develop a formula that when given $n$ points, it gives the number of straight lines that can be drawn through those points.

For example, the first two questions were "How many lines can be drawn through 3 points?" Which is 3, and "How many lines can be drawn through 4 points?" Which is 6. Now, it says "Develop a formula that gives the number of lines that can be drawn through $n$ points." I understand the relationship, and i've developed a formula, but it relies on having a predetermined list of answers.

I've found that where $a_n$ is the number of points you have, you can find the number of lines with $a_n = a_{n-1} + (n-1)$ where $a_{n-1}$ is the previous item in the list. However, I don't think that's the formula that my teacher is looking for. Is there a less complicated way to solve this problem?

share|improve this question
Note that if $a_n=a_{n-1}+(n-1)$, then $$a_n=a_1+\sum_{i=1}^{n-1}i=a_1+\frac{(n-1)(n-2)}{2}$$ –  Alex Becker Aug 22 '12 at 23:16
@Alex $$\sum_{i=1}^{n-1}i=\frac{(n-1)n}{2}$$ –  Henry Aug 23 '12 at 0:10
@Henry Yes, sorry. –  Alex Becker Aug 23 '12 at 1:55
add comment

4 Answers

up vote 6 down vote accepted

It says "drawn through $n$ points", but it really means "drawn through any two of $n$ points", where we assume no three points are collinear. So the number of lines is the same as the number of ways to choose two points out of $n$, where order doesn't count. Do you know about permutations, combinations, binomial coefficients?

share|improve this answer
or triangle numbers? –  Henry Aug 23 '12 at 0:08
Yes, sorry. "drawn through any two of $n$ points" is correct. also, no, this is why i say i think my answer is too complicated. I'm in a basic Geometry class. I have a separate understanding of math from the class i'm in, so I understand the other answers, but these seem too complicated to be the actual answer, because i'm in such a basic class. –  SomekidwithHTML Aug 23 '12 at 2:33
It sounds crazy, I know, but occasionally a teacher will assume you have learned something in other classes. –  Robert Israel Aug 23 '12 at 5:55
add comment

We will assume that our $n$ points are in "general position." This means that no three of our points are on the same line.

Let our points be $P_1, P_2, P_3, \dots, P_n$.

First draw all the lines through $P_1$ and every other point. There are $n-1$ of these.

Now draw all the lines through $P_2$, and every other point, except for the line through $P_1$ and $P_2$, since that has already been drawn. There are $n-2$ of these, through $P_3$, $P_4$, and so on up to $P_n$.

Now draw all the lines through $P_3$ and every other point that have not already been drawn. We have already taken care of the line through $P_3$ and $P_1$, and also of the line through $P_3$ and $P_2$, so there are $n-3$ of these.

Continue. At the end, all we are drawing is the line through $P_{n-1}$ and $P_n$, just $1$ line.

Thus the total number of lines is $$(n-1)+(n-2)+(n-3)+\cdots+2+1,$$ which will look more familiar as $$1+2+3+\cdots +(n-1).$$ You probably know a formula for the sum of the first $k$ positive integers.

Another way: Sit in turn on every one of our $n$ points. Draw the lines through that point and every other point. So for each of our $n$ points, you draw $n-1$ lines, for a total of $n(n-1)$.

However, this means that you have drawn every line twice. The line through $P_i$ and $P_j$ has been drawn once when you were sitting on $P_i$, and once again when you were sitting on $P_j$. So $n(n-1)$ overcounts our lines by a factor of $2$. That means that the actual number of lines is $$\frac{n(n-1)}{2}.$$

share|improve this answer
add comment

All of you were a lot of help, but Andre got closest to the answer. My math teacher gave me credit for my answer, but he also said that the following answers were correct:

$$\frac{1}{2}n(n-1)$$ and $$\sum_{i=1}^{n}(n-1)$$ The first one is pretty much exactly the same as Andre's answer: $$\frac{n(n-1)}{2}$$

share|improve this answer
add comment

Assuming no three of the points are collinear (which I think is a fair assumption for this question based on the answer), any such line is uniquely determined by a choice of $2$ of the $n$ points. Conversely given any $2$ points there is a unique line passing through them.

Thus there are $\left(\begin{matrix}n\\2\end{matrix}\right) = \frac{n(n-1)}{2}$ possible lines.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.