i have following question and please help me,suppose that we have region on coordinante systems bounded by lines $x=0$,$=0$,$y=1-x$ we have to enter some point let's sat M,with x,y coordinates,my aim is to show if given point lies on this bounded interval,just one thing which i didn't understand is that,should i use theorem of right triangle or what?i need a little explanation ,for example i want to write program and want to understand correctly mathematical definition of this problem
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
The way to approach this sort of questions, is to think about inequalities geometrically. You don't want to start messing around with distances and properties of triangles. Instead, you can view each line as a "boundary", and the other lines as the "direction" of the inequality. The best way is to start with a picture:
Now, take your first line equation $x = 0$ that's just the $x$-axis. Looking at the picture, the region you want extends to the right along this axis, so you set $x \geq 0$. The second equation is (I assume) $y = 0$. Looking at the picture, the region you want extends to the top, along this axis, so you set $y \geq 0$. Finally, the last boundary is $y = 1-x$. Looking the the picture, you want the points to be under that line, so you set $y \leq 1-x$.
You're done, a point with coordinates $(a,b)$ will be in the triangle iff $a, b$ are both non-negative, and $b \leq 1-a$.