交点坐标:
设
y1=a1x+b1
y2=a2x+b2
交点处:y1=y2=>a1x+b1=a2x+b2
=>x=(b2-b1)/(a1-a2)
=>y=(a1b2-b2a1)/(a1-a2)
因此交点是((b2-b1)/(a1-a2),(a1b2-b2a1)/(a1-a2))
距离:
要想两条直线有距离,需要直线平行,
=》a1=a2=a
距离就是:
(|b1-b2|)/根号(1+a^2)
交点坐标:
设
y1=a1x+b1
y2=a2x+b2
交点处:y1=y2=>a1x+b1=a2x+b2
=>x=(b2-b1)/(a1-a2)
=>y=(a1b2-b2a1)/(a1-a2)
因此交点是((b2-b1)/(a1-a2),(a1b2-b2a1)/(a1-a2))
距离:
要想两条直线有距离,需要直线平行,
=》a1=a2=a
距离就是:
(|b1-b2|)/根号(1+a^2)