23 lines
654 B
Markdown
23 lines
654 B
Markdown
---
|
||
title: Equation of a Line
|
||
localeTitle: 线的方程
|
||
---
|
||
## 线的方程
|
||
|
||
### 对于给定斜率和y截距(标准格式):
|
||
|
||
设`m`为线的斜率, `b`为y轴截距。 (注意,y轴截距是给定线与y轴交叉的点)。那么一条线的方程是:
|
||
|
||
`y = mx+b`
|
||
|
||
### 对于给定斜率和线路通过的一个点(斜坡形式):
|
||
|
||
设`m`为直线的斜率, `(x1, y1)`为给定直线通过的点的坐标。那么一条线的方程是:
|
||
|
||
`(y - y1) = m(x - x1)`
|
||
|
||
### 线路通过的两点:
|
||
|
||
令`(x1, y1)`和`(x2, y2)`是给定线通过的两个点的坐标。那么一条线的方程是:
|
||
|
||
`(y - y1)(x2 - x1) = (y2 - y1)(x - x1)` |