Possibility to construct a perpendicular to a line interval Given a line interval on a two-dimensional plane which starts at location $(x_1, y_1)$ and ends at location $(x_2, y_2)$, how to find out if it is possible to construct a perpendicular to this line interval from any given point $(x_0, y_0)$?
The question regards the possibility rather the actual construction. I assume that the answer contains calculating the angles of the locations $(x_1, y_1)$ and $(x_2, y_ 2)$ relative to the point $(x_0, y_0)$ but still can not figure out the way.
 A: Let $A$, $B$, $P$ be the endpoints of your line segment and your given point respectively.
Noting from don-joe's answer that you need the angles $\angle PAB$ and $\angle PBA$ to both be less than $90^{\circ}$, the angles don't need to be computed explicitly as the sign of the dot product gives the answer: the dot product $u \cdot v = |u| |v| \cos \theta$ where $\theta$ is the angle between the vectors.
So the perpendicular can be constructed if
$$(P-A) \cdot (B-A) \ge 0 \land (P-B) \cdot (A-B) \ge 0$$
A: The three points form a triangle where the height, taken from the point $(x_0, y_0)$ stands perpendicular on the line defined by the base $b = [(x_1, y_1),(x_2,y_2)]$.
If the height stay inside the triangle, you can construct the perpendicular line. That is the case if both angles between the endpoints of the line and your third point are less then $90$
A: Given any line and point not on the line, there exist a unique perpendicular to the line through the point.  Extend the segment to a line, then find that perpendicular and determine whether or not the foot of that perpendicular lies on the given segment.
