# Distance of a Point from a Line

The distance $d$ of the point $A\left( {{x_1},{y_1}} \right)$ from the line $ax + by + c = 0$ is given by

Let $\alpha$ be the inclination of the line as shown in the given diagram, and then its slope is given as

Squaring both sides of the above value of the slope, we get

Draw a perpendicular line from point $A$ to the X-axis intersecting the line at point $P$. Since the abscissa of $P$ is the same as that of $A$, the coordinates of point $P$ are $\left( {{x_1},{y_2}} \right)$, ${y_2} \ne {y_1}$. In the triangle $ALP$, $m\angle MAP = \alpha$ and $m\angle AMP = {90^ \circ }$, so

Since the distance $d$ should be positive, we must take the modulus of the right side of the above equation, i.e.

Putting the value of $\left| {\cos \alpha } \right|$ from equation (i) in equation (ii), we get

Since the point $P\left( {{x_1},{y_2}} \right)$ lies on the line $ax + by + c = 0$, then

Putting this value in equation (iii), we get

Example: Find the distance of the point $\left( {2, - 3} \right)$ from the line $7x - 5y + 9 = 0$.

Since the given point is $\left( {2, - 3} \right)$, so ${x_1} = 2,\,\,{y_1} = - 3$

Since the given line is $7x - 5y + 9 = 0$, so $a = 7,\,\,b = - 5,\,\,c = 9$

The required distance is
{"found_math": true, "script_math_tex": 24, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 35, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "http://www.emathzone.com/tutorials/geometry/distance-of-a-point-from-a-line.html", "fetch_time": 1508482733000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2017-43/segments/1508187823839.40/warc/CC-MAIN-20171020063725-20171020083725-00721.warc.gz", "warc_record_offset": 444008168, "warc_record_length": 11679, "token_count": 430, "char_count": 1256, "score": 4.6875, "int_score": 5, "crawl": "CC-MAIN-2017-43", "snapshot_type": "latest", "language": "en", "language_score": 0.8603026866912842, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00008-of-00064.parquet"}