freeCodeCamp/guide/chinese/mathematics/equation-of-a-line/index.md

23 lines
654 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
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)`