直线方程一般式为:
$$ Ax + By + C = 0 \tag{1-1}$$
已知两个不同的点$P_{1}(x_{1},y_{1})$,$P_{2}(x_{2},y_{2})$
①$x_{1} = x_{2}$时,直线方程为$x=x_{1}$
②$y_{1} = y_{2}$时,直线方程为$y=y_{1}$
③$x_{1} \neq x_{2} \wedge y_{1} \neq y_{2}$ 时,由直线方程两点式$\frac{y-y_{1}}{x-x_{1}} = \frac{y_{2}-y_{1}}{x_{2}-x_{1}}$展开得到:
已知两直线 $$ A_{1}x + B_{1}y + C_{1} = 0 \tag{2-1}$$ $$ A_{2}x + B_{2}y + C_{2} = 0 \tag{2-2}$$
对(2-1)式乘A2
,对(2-2)式乘A1
得:
$$ A_{1}A_{2}x + A_{2}B_{1}y + A_{2}C_{1} = 0 $$
$$ A_{1}A_{2}x + A_{1}B_{2}y + A_{1}C_{2} = 0 $$
两式相减得: $$ y = \frac{A_{1}C_{2}-A_{2}C_{1}}{A_{2}B_{1}-A_{1}B_{2}}$$ 同理可得 $$ x = \frac{B_{1}C_{2}-B_{2}C_{1}}{A_{1}B_{2}-A_{2}B_{1}}$$
若$ A_{2}B_{1}-A_{1}B_{2} = 0 $则说明两条直线平行
已知线段由$P_{1}(x_{1},y_{1})$,$P_{2}(x_{2},y_{2})$两点构成,求点$P(x,y)$是否在线段$P_{1}P_{2}$上。
①