# Find sufficient condition in which the point w belongs to the triangle $D$

Let $$1 be real number. Let us consider the triangle $$D=(c,0)(-c,2(c-1))(c-2,-2(c-1))$$

and consider a point $$w=(x,y)$$

My question is: Find sufficient conditions in which the point w belongs to the region enclosed by the triangle $$D$$. I have no idea to start.

• Hint: A point $P$ lies on a line segment $AB$ if and only if there is a unique number $t\in[0,1]$ such that $P=(1-t)\cdot A+t\cdot B$. – John Wayland Bales Feb 8 at 18:28
• What do you mean by a point $w$ belonging to the triangle $D$? Do you mean that $w$ lies on the triangle or do you mean that $w$ lies in region enclosed by it? – feynhat Feb 8 at 18:35
• @feynhat: See the edited question. – China Feb 8 at 18:47
• @China Such problems are usually done using this simple trick: let the points of your triangle be $A$, $B$, $C$ and let $D$ be the point which you want to check. Then compute the areas of these triangles: $\Delta ABD$, $\Delta ADC$ and $\Delta DBC$, and check if they add up to area of $\Delta ABC$. – feynhat Feb 8 at 18:53

## 2 Answers

Given $$\triangle ABC$$, for every point $$D$$ on side $$AB$$ between $$A$$ and $$B$$ there is one and only one number $$t\in(0,1)$$ such that

$$D=(1-t)A+tB\tag{1}$$

For every point $$W$$ on line segment $$DC$$ lying inside $$\triangle ABC$$ there is one and only one number $$s\in(0,1)$$ such that

$$W=(1-s)D+sC\tag{2}$$.

Therefore, for every $$W$$ lying in the interior of $$\triangle ABC$$ there is one and only one pair of numbers $$(t,s)\in(0,1)\times(0,1)$$ such that

$$W=(1-s)[\,(1-t)A+tB\,]+sC\tag{3}$$

So the coordinates of $$W$$ can be found by applying equation (3) to the coordinates of $$A,\,B$$ and $$C$$. ADDENDUM Note that an alternate approach would be to express the conditions on $$W$$ as three linear inequalities. Since, when $$c>1$$ the point $$W$$ must simultaneously be above lines $$AC$$ and $$BC$$ and below line $$AB$$, this fact can be expressed as a system of three simultaneous linear inequalities in variables $$x$$ and $$y$$ with coefficients being functions of $$c$$.

P.S.: Writing as answer, since I don't have enough reputation to comment

To visualize the problem, check how the triangle $$D$$ varies with parameter $$1 < c < 1.3$$ in this 3d plot. Here, neglect the $$z$$-axis value.