# Showing three points are collinear [closed]

Show that $(-1, 8)$, $(1, -2)$ and $(2, 1)$ lie on a common line.

Any help understanding how to go about doing this is greatly appreciated.

-

## closed as off-topic by Najib Idrissi, Joonas Ilmavirta, Jean-Claude Arbaut, TZakrevskiy, MathOverviewNov 26 '14 at 11:34

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Najib Idrissi, Joonas Ilmavirta, Jean-Claude Arbaut, TZakrevskiy, MathOverview
If this question can be reworded to fit the rules in the help center, please edit the question.

Since this statement is false, showing it to be true will be rather difficult. –  MartianInvader May 10 '11 at 21:40
There is one and only one line through any two points. Find the line through $(-1,8)$ and $(1,-2)$, and check to see if it contains $(2,1)$. If it does, then this proves the statement. If it doesn't, then it shows the statement is false. You can use the two-point formula to find the equation of the first line. –  Arturo Magidin May 10 '11 at 21:41
hmm, $(2,1)-(1,-2)=(1,3)$, $(1,-2)-(-1,8)=(2,-10)$ - apparently you wanted to write $(-1,-8)$ (then $(1,-2)-(-1,-8)=(2,6)=2(1,3)$, so they are on a line) –  user8268 May 10 '11 at 21:42
@user8268, I don't understand what you did there please –  user10695 May 10 '11 at 21:45
@user10695: When I say "the point formula", I mean the formula for finding the equation of a line when you are given two points on a line; that formula does not require you to know the value of $m$, this value is computed. Perhaps you are confusing it with the point-slope formula. –  Arturo Magidin May 10 '11 at 23:16

Since there seems to be some confusion as to the fit of $(-1,8)$ vs. $(-1,-8)$, try to use the other two points.

So say that point $a$ is $(x_1, y_1)$, point $b$ is $(x_2, y_2)$, and we'll start with the assumption that $x_1\neq x_2$.

The general "two-point" formula for the equation of a line (given two points) is given by:

$$(y - y_1) = \frac{(y_2 - y_1)} {(x_2 - x_1)} (x-x_1)\quad\quad\quad(1)$$

where $$\frac{(y_2 - y_1)} {(x_2 - x_1)} = m$$

($m$ represents the slope of the line). You the need to simplify the equation by solving for $y$ and putting the equation, e.g., in slope-intercept form: $y = mx + b$ where $b$ is the $y$-intercept (the value of $y$ when $x = 0$). Then you need then to substitute the $x$-coordinate of the third point for $x$ in the equation, likewise for $y$. If the result, after doing so, is not an equality, then the third point doesn't "satisfy" the equation; in other words, it is therefore not on the line.

If $(-1,8)$ does not satisfy the equation of the line (such that after replacing $x$ and $y$ with the third point's coordinates, the two sides of the equation don't match, try using $(-1,-8)$, and if that works, you need to recheck the method you used to obtain the point $(-1,8)$.

Of course, you can also use the slope-intercept form, after computing the slope, as above: $$y = mx + b$$ To solve for $b$, the $y$-intercept, simply evaluate the equation, putting $x = 0.$ That should give you $y = b$ (at $x = 0$): the point at which the line intersects the $y$-axis.

Caveat:

Now, suppose $x_1 = x_2$. Then what? We certainly cannot use the general two-point formulation given above, since if $x_1=x_2$, then $x_2 - x_1 = 0$, and division by zero is undefined. What do you know about lines for which the slope is undefined?

Such lines are always vertical lines, perpendicular to the $x$-axis, so every $x$-coordinate on such a line is identical. If we can rewrite the equation provided above in (1) as such:

$$(x_2 - x_1)(y - y_1) = (y_2 - y_1)(x-x_1)$$

The left side evaluates to $0$; simplifying gives us the equation $x = x_1.$

Recommendation: if this question is related to your studying for exams etc., it's important to understand how to compute the equation of a line, given two points, given the slope, and also how to easily move back and forth between such forms.

-
@Amy: Just to make it complete, you might want to say a word or two of what to do when $x_2=x_1$. –  Arturo Magidin May 10 '11 at 23:17
Ah...good point, Arturo! –  amWhy May 10 '11 at 23:23
Thank you very much for breaking that down for me!!! :) –  user10695 May 11 '11 at 1:45
I had a few votes to spare today and thought it would reduce the reviewing work drastically if I voted you over the threshold of 2k rep. Now you can edit as much as you want and the edits take immediate effect... Have fun! I honestly tried to choose answers I really like, so I don't think the votes are undeserved. –  t.b. May 29 '11 at 0:01
Of course, I didn't mean to imply that there were answers I didn't like... I hope you got my meaning. –  t.b. May 29 '11 at 0:08

For 3 points to be collinear:

The area of the triangle formed by given 3 points should be ZERO.

Suppose there are three points given A(x1, y1), B(x2, y2) and C(x3, y3). Then

                     x1 y1 1
Area(ABC) = (1/2)det x2 y2 1
x3 y3 1


Where det is determinant. So find this determinant, if zero, the given points are collinear otherwise not.

For n points to be collinear:

Input: P1, P2, P3, ... , Pn

Method 1:

1. For each triplet (P1, P2, P3)
2. See if these three are collinear using area of the triangle method given above.
3. Repeat for (P3, P4, P5) and so on till (Pn-2, Pn-1, Pn)
4. If all triplets are collinear (area = zero) then given n points are collinear.

Method 2:

1. Find minimum and maximum points with respect to x-coordinate.
2. Find equation of the line joining these min and max points using two-point formula (credit: amWhy).
3. For each remaining n-2 points, check whether they all lie (satisfy the equation) on this line.

Food for thought: If you want to find 3 collinear points from given n points then it's rather tough and time complexity is more.

Thanks.

-

Here are three tests of collinearity.

Distance Test

This is the first test I learned to check if three points were collinear. It actually tests if one point is between two others. Given three points $(x_1,y_1)$, $(x_2,y_2)$, and $(x_3,y_3)$, the point $(x_2,y_2)$ is between $(x_1,y_1)$ and $(x_3,y_3)$ when $$|(x_1,y_1)-(x_3,y_3)|=|(x_1,y_1)-(x_2,y_2)|+|(x_2,y_2)-(x_3,y_3)|$$ If any of the three points is between the other two, they are collinear; that is, if any of the distances is the sum of the other two.

$\hspace{3cm}$

Area Test

The area of a triangle is given by half the determinant of the vectors of two of the sides. That is, given

$\hspace{4cm}$

The area of the triangle is $$\frac12\det\begin{bmatrix}x_2-x_1&y_2-y_1\\\\x_3-x_1&y_3-y_1\end{bmatrix}$$ The three points are collinear exactly when this area is $0$.

Volume Test

Given three points in $\mathbb{R}^2$, first we move them into $\mathbb{R}^3$, $z=1$ to be precise. Next the volume of the tetrahedron formed by three points and the origin is one sixth the determinant of the three points.

That is, the volume of

$\hspace{3cm}$

is $$\frac16\det\begin{bmatrix}x_1&y_1&1\\x_2&y_2&1\\x_3&y_3&1\end{bmatrix}$$

The volume of a pyramid is one third of the base times the altitude. In the case above, the altitude is $1$. Thus, the points are collinear exactly when this volume is $0$.

-
isn't there another technique like the following: To test whether $\frac {x_2-x_1} {\delta x}$ and $\frac {y_2 - y_1} {\delta y}$ are equal? –  anonymous Aug 2 at 21:19
What you are suggesting is essentially the area test, since the determinant is zero precisely when $$(x_2-x_1)(y_3-y_1)=(x_3-x_1)(y_2-y_1)$$ which is equivalent to $$\frac{y_3-y_1}{x_3-x_1}=\frac{y_2-y_1}{x_2-x_1}$$ –  robjohn Aug 2 at 22:41
Oh. Thanks for the clarification. –  anonymous Aug 2 at 23:09
I just discovered that, area test doesn't work for line segments. –  anonymous Aug 3 at 0:02
I am not sure I understand what you are saying. For what line segment does it not work? –  robjohn Aug 3 at 0:09

For three to be collinear, the sum of the distance between two pairs of points equals the distance between the third pair of points (ie .|AB|+|AC|=|BC| or |AB|+|BC|=|AC| or |AC|+|BC|=|AB|

-

(upps: didn't notice the date of the original posting (it's one year old) But now that I've written so much I just leave it here for the cursory reader)

A very elementary method is the following (which is in effect just Arturo Magidin's formula made geometrically explicite).

Assume your three points in a matrix $$\small A=\begin{bmatrix} 1&2&7 \\ 4&7&22 \end{bmatrix} = \begin{bmatrix} x_1&x_2&x_3 \\ y_1&y_2&y_3 \end{bmatrix}$$ where the first row shows the coordinates on the x-axis and the second row that of the y-axis. We might imagine a triangle on the plane.

First we drag that triangle vertically, such that the first point lies on the x-axis , that means, we subtract from all y-coordinates that of the first point. We get $$\small A_1=\begin{bmatrix} 1&2&7 \\ 0&3&18 \end{bmatrix} \qquad \qquad (=A- \begin{bmatrix} .&.&. \\ 4&4&4 \end{bmatrix})$$ Then we drag that triangle horizontally, such that the second point lies on the y-axis, that means, we subtract from all x-coordinates that of the second point. We get $$\small A_2=\begin{bmatrix} -1&0&5 \\ 0&3&18 \end{bmatrix} \qquad \qquad (=A_1- \begin{bmatrix} 2&2&2\\.&.&. \end{bmatrix})$$ Now we can imagine a diagonal line from (-1,0) to (0,3) and the third point must lie on that line. Without changing the configuration of the triangle we might scale the x and the y-extensions for convenience, such that the first x-coordinate is -1 and the second y-coordinate is +1, so we divide the y-xoordinates by 3, and even can leave the x-coordinates untouched: $$\small A_3=\begin{bmatrix} -1&0&5 \\ 0&1&6 \end{bmatrix}$$ Now the first four coordinates define the diagonal line with slope 1 through (-1,0) and (0,1) and each collinear point must have $\small y_k=1+x_k$ or $\small y_k-x_k=1$. We see that this is true immediately, but we can also subtract the x-coordinates from the y-coordinates to make it explicite: $$\small A_4=\begin{bmatrix} 0&0&0 \\ 1&1&1 \end{bmatrix}$$ which shows then collinearity of our three points.

Another example which is not collinear is $$\small B=\begin{bmatrix} 1&2&3 \\ 4&7&5 \end{bmatrix}$$ We translate to $\small x_2=0, y_1=0$ $$\small B_2=B-\begin{bmatrix} 2&2&2 \\ 4&4&4 \end{bmatrix}=\begin{bmatrix} -1&0&1 \\ 0&3&1 \end{bmatrix}$$ We rescale to $\small x_1=-1, y_2=1$ $$\small B_3= \begin{bmatrix} 1 \\ \frac13\end{bmatrix} \cdot B_2=\begin{bmatrix} -1&0&1 \\ 0&1& \frac13 \end{bmatrix}$$ and immediately we see by the difference $\small x_3-y_3 \ne 1$ that the third point is not collinear with the other two points.

-

3 points (-1,8), (1, -2) and (2,1) are we have to prove that they are colinear here A(-1,8) B (1.-2) & C (2,-1) Now by using distance we find AB AB=√((x2)-x1)^2+(y2-y〖1)〗^2 =√({-2)-(-1^2)}+(-2-〖8)〗^2 =√(-2+1^2 )+√(-〖10〗^2) =√(-1^2 )+√100 =(√ 1+100) =√1 01

Next by using distance we find BC BC=√((x2)-x1)^2+(y2-y〖1)〗^2 BC=√((2)-〖1)〗^2+{1-(-〖2)〗^2} =√1+√3^2 =√1+9 =√10

Finally We Find CA CA=√((x2)-x1)^2+(y2-y〖1)〗^2 √({2-(-1^2 ) }+(1-〖8)〗^2 )/ √(3^2+(-7^2))/=√(9+49)/=√58 Since AB + BC Is not equal to AC So These Points are not co-linear

-
You are indeed correct that they don't lie on a single line, but I'm finding your notation quite hard to read. Do you know how to use LaTeX? See, e.g. artofproblemsolving.com/Wiki/index.php/LaTeX:About –  Jonah Sinick Oct 26 '12 at 5:02
There is also a local Tutorial and Reference for MathJax. I tried to fix up this post, but there are mathematical mistakes as well as hard-to-read formatting. –  robjohn Oct 26 '12 at 16:20