위키피디아 http://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line

A geometric proof[edit]

Diagram for geometric proof

This proof is valid only if the line is not horizontal or vertical.[4]

Drop a perpendicular from the point P with coordinates (x0y0) to the line with equation Ax + By + C = 0. Label the foot of the perpendicular R. Draw the vertical line through P and label its intersection with the given line S. At any point T on the line, draw a right triangle TVU whose sides are horizontal and vertical line segments with hypotenuse TU on the given line and horizontal side of length |B| (see diagram). The vertical side of ∆TVU will have length |A| since the line has slope -A/B.

SRP and ∆TVU are similar triangles since they are both right triangles and ∠PSR ≅ ∠VUT since they are corresponding angles of a transversal to the parallel lines PS and UV (both are vertical lines).[5] Corresponding sides of these triangles are in the same ratio, so:

\frac{|\overline{PR}|}{|\overline{PS}|} = \frac{|\overline{TV}|}{|\overline{TU}|}.

If point S has coordinates (x0,m) then |PS| = |y0 - m| and the distance from P to the line is:

 |\overline{PR} | = \frac{|y_0 - m||B|}{\sqrt{A^2 + B^2}}.

Since S is on the line, we can find the value of m,

m = \frac{-Ax_0 - C}{B},

and finally obtain:[6]

 |\overline{PR}| = \frac{|Ax_0 + By_0 + C|}{\sqrt{A^2 + B^2}}.







A vector projection proof[edit]

Diagram for vector projection proof

Let P be the point with coordinates (x0y0) and let the given line have equation ax + by + c = 0. Also, let Q = (x1y1) be any point on this line and n the vector (ab) starting at point Q. The vector n is perpendicular to the line, and the distance d from point P to the line is equal to the length of the orthogonal projection of \overrightarrow{QP} on n. The length of this projection is given by:

d = \frac{|\overrightarrow{QP} \cdot \mathbf{n}|}{\| \mathbf{n}\|}.

Now,

 \overrightarrow{QP} = (x_0 - x_1, y_0 - y_1), so  \overrightarrow{QP} \cdot \mathbf{n} = a(x_0 - x_1) + b(y_0 - y_1) and  \| \mathbf{n} \| = \sqrt{a^2 + b^2},

thus

 d = \frac{|a(x_0 - x_1) + b(y_0 - y_1)|}{\sqrt{a^2 + b^2}}.

Since Q is a point on the line, c = -ax_1 - by_1, and so,[7]

 d = \frac{|ax_0 + by_0 + c|}{\sqrt{a^2 + b^2}}.






두 직선 사이의 거리


When the lines are given by

ax+by+c_1=0\,
ax+by+c_2=0,\,

the distance between them can be expressed as

d = \frac{|c_2-c_1|}{\sqrt {a^2+b^2}}.



y = mx+b_1\,
y = mx+b_2\,,

d = \frac{|b_2-b_1|}{\sqrt{m^2+1}}\,.







점과 평면 사이의 거리




수학의 정석 - 기하와 벡터










수학의 샘 - 기하와 벡터





풍산자 - 기하와 벡터









'수1수2' 카테고리의 다른 글

종이접기4  (0) 2016.06.27
헤론의 공식  (0) 2016.06.27
행렬의 고유값  (0) 2016.06.27
부등식 예제 1  (0) 2016.06.27
연립방정식 예제  (0) 2016.06.27

+ Recent posts