Condition for a point to lie inside a triangle

2k Views Asked by At

Given three lines $L_{1}\equiv a_1x+b_1y+c_1=0$ , $L_{2}\equiv a_2x+b_2y+c_2=0$, $L_{3}\equiv a_3x+b_3y+c_3=0$ where $c_1,c_2$ and $c_3$ are all positive.

Find the condition that the point $P\equiv(x_0,y_0)$ may lie inside the triangle formed by three given lines.

The answer given was $(a_1x_0+b_1y_0+c_1)(a_2x_0+b_0y+c_2)(a_3x_0+b_3y_0+c_3)<0$.

But I am not able to justify.

2

There are 2 best solutions below

0
On BEST ANSWER

Hint: Observe that intersection point of 2 lines say $L_1,L_2$ lie on the same side of $L_3$ as point $P$ lies.
Repeating this for all combinations of lines gives the above result.

0
On

Note that the product on the left equals zero if and only if $P$ is on at leas tone of the three lines (black in the image below). For any point on none of the lines, the three factors and hence the product is non-zero. The sign of the product changes whenever we cross one of the lines. Thus there are two possibilites:

  • Either the product is negative precisely for points in the red area and positive for points in the green area
  • Or the product is negative precisely for points in the green area and positive for points in the red area

So in the first case, we see that the condition holds for all points inside the triangle (but also for some other points). In the second case, the condition would be totally wrong. But which is it? Well, we did not make use of the fact that all $c_i$ are positive. This tells us that when testing the point $(x_0,y_0)=(0,0)$, the product is $c_1c_2c_3$ and hence positive. This means that we "want" the origin to lie in one of the green areas - but we cannot guarantee that. For example with $$\begin{array}tL_1\equiv& -1x&+0y&+1&=0\\L_2\equiv& \hphantom{-}0x&-1y&+1&=0\\L_3\equiv& \hphantom{-}1x&+1y&+2&=0 \end{array}$$ The origin is actually inside the triangle.

We conclude that the given condition is neither sufficient nor necessary for the general case.

enter image description here