0
$\begingroup$

I am writing a program that determines the type of triangle it is based on the three side lengths. I think I have covered all the bases with one exception that I am not sure of. A triangle with all sides of zero is it a triangle or not? Following the Triangle Inequality Theorem a triangle with all sides zero does not pass the test. But is it a triangle with all sides zero a special case like in set theory a zero set is a special kind of set. Finally, I do not think that a triangle can have a one of the sides length of zero because that would not pass the Triangle Inequality Theorem test.

For example I do not think you can find three sides with one of the sides equal to zero that would satisfy;

a + b > c

a + c > b

b + c > a

I am just trying to find out if a triangle can have a side or all sides of zero length and if one does is it a valid triangle.

  • 1
    Depends on how you define "triangle." What triangle inequality test fails?2017-02-17
  • 0
    It's hypothetically possible but not practically. Um.. A triangle with all three sides zero does pass the triangle inequality. $0 \le 0 + 0$ nothing wrong with that. You can also have a triangle with sides 0, a, a. and it will pass as 0 < 2a. a $\le a$ and $a \le a$. No problem.2017-02-17
  • 0
    Ah, I see. You have the *practical* form of the triangle inequality. In more theoretical and analytical context, it isn't a strict inequality. Equality is allowed if one or all three sides are zero. Or if the "triangle" is actually a line segment. (sides a, b, and c= a+b)2017-02-17

1 Answers 1

1

Yes, and any such triangle is called a degenerate triangle. If the distance between two points $a$ and $b$ is zero, then the corresponding vertex $\overline{ab}$ is the zero vector, which is collinear to every vector (which includes $\overline{ac}$ and $\overline{bc}$). Hence the vectors defining the triangle are all collinear, i.e., a degenerate triangle.

As to your question regarding a "Triangle Inequality Test", this "test" seems likely to be a teaching tool for classification rather than a definitive rule. But the triangle inequality itself does permit equality which occurs if and only if the triangle is degenerate.

Permitting degenerate triangles can greatly reduce the number of special cases in integration over polygons, as an example of mathematical use.

  • 0
    Does a "degenerate triangle" allow a "triangle" that has no zero sides but $c = a + b$ i.e. the vertices are colinear? Or is there another terminology for that?2017-02-17
  • 0
    Yes, I was just showing that a zero sided triangle is just a special type of degenerate triangle. Any triangle with collinear vertices is a degenerate triangle by definition, with zero length or not.2017-02-17
  • 0
    I wasn't sure if the colinear had a special name or not. The op is asking about 0 lengths. S/he probably should consider the a,b, a+b. exceptions as well as 0,0,0 and 0,a, a2017-02-17
  • 0
    I kind of see what you mean, though there are plenty of occasions where you wouldn't consider such degenerate triangles to be equivalent to line segments. I think the encompassing term "degenerate triangle" is an important idea in general. I had to use these plenty when working with stochastic geometric algorithms.2017-02-17