# What is the logic to calculate triangle-inequality-theorem

So I want to know is there any simple formula to get the result for the triangle-inequality-theorem I know what is the theorem but any formula rather than doing it the routine way of adding then checking

E.g: Side a + Side b > Side C

(And all the three combinations)

-

Not sure exactly what you are looking for in your question. If you are looking for a single formula that will give a simple yes/no answer for whether any given three lengths can compose a triangle, I suppose you could have a brute force solution such as:

$(a + b - c) + (b + c - a) + (a + c - b) - (|a+b-c| + |b+c-a| + |a+c-b|)$

Which simplifies to:

$(a + b + c) - (|a+b-c|+|b+c-a|+|a+c-b|)$

If your result is less than 0, then the three sides cannot compose a triangle. The logic is that all three variations of the inequality need to be greater than zero. If they all are, then their absolute values are equivalent and the expression above would yield 0 as the result. If any of the inequalities are negative, then subtracting the absolute value will leave an even more negative number in your result.

-

If you go to Heron's formula, you know that $A = \sqrt{s(s-a)(s-b)(s-c)}$ where the semiperimeter $s = \frac{a+b+c}{2}$. Note that if the expression in the square root is negative or zero, then the area does not exist. That expression will only be negative or zero when $s \leq a,\ s \leq b,$ or $s \leq c$. This means that $s \gt a$, $s \gt b$, and $s > c$. Plugging in s, you can get $\frac{a+b+c}{2} > a \longrightarrow a+b+c > 2a \longrightarrow b + c > a$. You can do something similar for the other two variables and get the same results. Also note that it is impossible for two or three side lengths to be greater than $s$ as well. If that were the case, you are saying that at least two of the sides are greater than half the total perimeter of the triangle, which is obviously impossible.

-