Distance from a point to a line: Difference between revisions

Content deleted Content added
Tags: Mobile edit Mobile web edit Advanced mobile edit
Line 15:
'''Horizontal and vertical lines'''
 
In the general equation of a line, ''ax'' + ''by'' + ''c'' = 0, ''a'' and ''b'' cannot both be zero unless ''c'' is also zero, in which case the equation does not define a line. If ''a''&nbsp;=&nbsp;0 and ''b''&nbsp;{{math|≠}}&nbsp;0, the line is horizontal and has equation ''y'' = -''c''/''b''. The distance from (''x''<sub>0</sub>, ''y''<sub>0</sub>) to this line is measured along a vertical line segment of length |''y''<sub>0</sub> - (-''c''/''b'')| = |''by''<sub>0</sub> + ''c''| / |''b''| in accordance with the formula. Similarly, for vertical lines (''b'' = 0) the distance between the same point and the line is |''ax''<sub>0</sub> + ''c''| / |''a''|, as measured along a horizontal line segment.
 
===Line defined by two points===