5
$\begingroup$

Given $3$ points $$(x_1, y_1), (x_2, y_2), (x_3, y_3),$$ how does one determine whether they are vertices of a triangle?

Thanks.

$\endgroup$
  • $\begingroup$ en.wikipedia.org/wiki/Triangle_inequality $\endgroup$ – GTX OC Sep 19 '14 at 11:53
  • $\begingroup$ The triangle inequality deals with lengths, points. $\endgroup$ – Martigan Sep 19 '14 at 11:54
  • $\begingroup$ If the points are given,you can always find the distance between them. $\endgroup$ – GTX OC Sep 19 '14 at 11:54
  • $\begingroup$ Have you ever tried to draw a triangle, given three points in the plane? $\endgroup$ – Christian Blatter Sep 19 '14 at 12:08
  • $\begingroup$ @ChristianBlatter its to determine with a program that handles larger numbers, that ain't possible to draw by myself. $\endgroup$ – x0x Sep 19 '14 at 12:13
4
$\begingroup$

1: Find area of triangle formed by 3 points. if not zero they can form triangle.

2: Find line equation of 2 vertices and check if the 3rd vertices is present on this line. if not they can form triangle. Similarly Find the slope of the line joining points A and B,then find the slope of the line joining A and C.If they are same,then you can't draw a triangle.(@rah4927)

$\endgroup$
  • 1
    $\begingroup$ The second way can also be rephrased as follows:Find the slope of the line joining points A and B,then find the slope of the line joining A and C.If they are same,then you can't draw a triangle.Otherwise,you can. $\endgroup$ – rah4927 Sep 19 '14 at 11:59
1
$\begingroup$

The area of a triangle is given by the formula $$|\frac12 det(\vec{AB}, \vec{AC})|$$

Let $$\vec{A}=(x_1,y_1), \vec{B}=(x_2,y_2), \vec{C}=(x_3, y_3)$$

Then $$\vec{AB}=(x_2-x_1, y_2-y_1), \vec{AC}=(x_3-x_1,y_3-y_1)$$

Then it must hold that $$| (x_2-x_1)(y_3-y_1)-(y_2-y_1)(x_3-x_1)| \neq 0$$

$\endgroup$
-3
$\begingroup$

A triangle can be drawn with three points iff these three points are three different points.

EDIT: in order to be more precise in the core of my answer, and not in comment: three distincts colinear points form a degenerate triangle, but a triangle nonetheless. It is a geometric figure with three angles (they can be calculated, and not in the case where there are only one or two disctinct points) and their sum is 180°...

$\endgroup$
  • $\begingroup$ They might be collinear. $\endgroup$ – user175968 Sep 19 '14 at 11:55
  • $\begingroup$ what if the three different points are on a line? $\endgroup$ – x0x Sep 19 '14 at 11:55
  • $\begingroup$ For me this is still a triangle (a flat one), since you have three angles you can define and measure. If you have two point identical, or three, you can't define the three angles... $\endgroup$ – Martigan Sep 19 '14 at 12:07
  • $\begingroup$ I am NOK with the downvotes. A degenerate triangle is a triangle... Or else explain to me why not... $\endgroup$ – Martigan Sep 19 '14 at 12:16
  • $\begingroup$ @Martigan: someone asking a question as basic as the OP's won't surely understand "degenerate triangles": in high school, a triangle is a plane figure obtained by joining three non-collinear points by straight line segments. And even following your reasoning: the three points do not have to be different, as the degenerate triangle's vertices could aslo be degenerate, or collapsed into two or only one point representing the three vertices. Too much for such a basic question, imo. $\endgroup$ – Timbuc Sep 19 '14 at 14:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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