# Slope, Intercept and Distance

## 斜率、截距以及点到直线的距离

Yao Yao on July 5, 2014

## 斜率（Slope）

In mathematics, the slope or gradient of a line is a number that describes both the direction and the steepness of the line. Slope is often denoted by the letter $m$. The direction of a line is either increasing, decreasing, horizontal or vertical.

## 直线方程（linear equation）

### 两点式

• 若 $x_1 = x_2$，则直线为 $x = x_1$
• 若 $x_1 \neq x_2$，则斜率 $m = \frac { y_2 - y_1}{x_2 - x_1}$，直线为 $y - y_1 = m(x - x_1)$

## 点到直线的距离（Distance）

$d = \frac{\lvert ax_0 + by_0 + c \rvert}{\sqrt{a^{2}+b^{2}}}$