freeCodeCamp/guide/chinese/mathematics/the-slope-of-a-straight-line/index.md

27 lines
1.1 KiB
Markdown
Raw Normal View History

---
title: The Slope of a Straight Line
localeTitle: 直线的斜率
---
## 直线的斜率
* 线的斜率是描述线的方向和陡度的数字。通常线的斜率用m表示。
* 线中的斜率m = 0的零值表示给定线是水平的。
* 具有未定义的斜率值的线表示给定的线是垂直的。
* 斜率为正值的线m> 0表示给定的线从左向右上升。
* 斜率为负值的线m <0)表示给定的线从右向左下降。
### 当给出线上两个点的坐标时,计算线的斜率
在这种情况下假设一条线l有两个坐标x 1 y 1 x 2 y 2 )点,那么一条线的斜率计算如下:
![](https://latex.codecogs.com/gif.latex?m&space;=&space;\frac{y_{2}&space;-&space;y_{1}}{x_{2}&space;-&space;x_{1}} "m = \ frac {y_ {2} - y_ {1}} {x_ {2} - x_ {1}}")
### 从线的方程计算线的斜率
将给定方程式从给定形式转换为形式![](https://latex.codecogs.com/gif.latex?y&space;=&space;mx&space;+&space;c "y = mx + c")
其中m是斜率 c是y截距。