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?

  • $\begingroup$ 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}$$ $\endgroup$ – Alex Becker Aug 22 '12 at 23:16
  • $\begingroup$ @Alex $$\sum_{i=1}^{n-1}i=\frac{(n-1)n}{2}$$ $\endgroup$ – Henry Aug 23 '12 at 0:10
  • $\begingroup$ @Henry Yes, sorry. $\endgroup$ – Alex Becker Aug 23 '12 at 1:55
  • $\begingroup$ 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}(i-1)$$ The first one is pretty much exactly the same as Andre's answer: $$\frac{n(n-1)}{2}$$ $\endgroup$ – SomekidwithHTML Aug 23 '12 at 23:10
  • $\begingroup$ Tell your teacher that $\sum_{i=1}^n(n-1)=n(n-1)$. $\endgroup$ – Suzu Hirose Dec 12 '14 at 2:48

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?

| cite | improve this answer | |
  • $\begingroup$ or triangle numbers? $\endgroup$ – Henry Aug 23 '12 at 0:08
  • 1
    $\begingroup$ 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. $\endgroup$ – SomekidwithHTML Aug 23 '12 at 2:33
  • 4
    $\begingroup$ It sounds crazy, I know, but occasionally a teacher will assume you have learned something in other classes. $\endgroup$ – Robert Israel Aug 23 '12 at 5:55

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}.$$

| cite | improve this answer | |

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.

| cite | improve this answer | |

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