问:
△ABC的三个顶点的坐标分别为A(0,2),B(4,0),C(6,4),(1)求点B到直线AC的距离
答:
given:
A(0,2)
B(4,0)
C(6,4)
要求:(1)求点B到直线AC的距离
解:
1. 先求直线AC的方程。已知直线上两点A(0,2)和C(6,4),则直线AC的方程为:
y= (y2-y1)/(x2-x1) * (x-x1) + y1
= (4-2)/(6-0) * (x-0) + 2
= (2/6) * x + 2
= y = (1/3)x + 2
2. 将点B(4,0)代入上式,求出B到直线AC的垂直距离d:
0 = (1/3)*4 + 2
0 = 2
d = |0-2| = 2
3. 由斜率求直线AC的方向向量:
设直线AC的方向向量为<a, b>
斜率k = (y2-y1)/(x2-x1) = (4-2)/(6-0) = 1/3
则a = -b
由a2 + b2 = 1 ,求得a = √3/3 ,b = -√3/3
4. 求点B到直线AC的平行向量:<-2√3/3,2√3/3>
5. 则点B到直线AC的距离d为:
d = |<-2√3/3,2√3/3>| * 2 = 2*√3 = 约3.46
∴点B(4,0)到直线AC的距离为:
d = 3.46