logo

johzu

About

Line equations


Equations chart

Adjust the blue slider to modify \(m\) , the slope, and the red slider to change \(b\), the \(y\)-intercept.



Line characteristics

Move the points \(A\) and \(B\) to change the segment coordinates.


You can find the distance between points \(A \left(x_{1},y_{1}\right)\) and \(B \left(x_{2},y_{2}\right)\) by using the next equation:

$$D = \sqrt{ \left(x_{2} - x_{1}\right)^{2} + \left(y_{2} - y_{1}\right)^{2} }$$

Equations

name equation
slope intercept form $$y = mx + b$$
point-slope form $$y - y_{1} = m(x - x_{1})$$
two points form $$y - y_{1} = \frac{\left(y_{2} - y_{1}\right)}{\left(x_{2} - x_{1}\right)} \left(x - x_{1}\right)$$
general form $$Ax + By + C = 0$$
intercept form $$\frac{x}{a} + \frac{y}{b} = 1$$
determinant form (1) $$\left( x_{2} - x_{1} \right)\left( y - y_{1} \right) - \left(y_{2} - y_{1}\right)\left(x - x_{1}\right) = 0$$ $$\begin{vmatrix} x - x_{1} & y - y_{1} \\ x_{2} - x_{1} & y_{2} - y_{1} \end{vmatrix} = 0$$
determinant form (2) $$\left( y_{1} - y_{2} \right)x + \left( x_{2} - x_{1} \right)y + \left(x_{1}y_{2} - x_{2}y_{1}\right) = 0$$ $$\begin{vmatrix} x & y & 1 \\ x_{1} & y_{1} & 1 \\ x_{2} & y_{2} & 1 \end{vmatrix} = 0$$
distance $$D = \sqrt{ \left(x_{2} - x_{1}\right)^{2} + \left(y_{2} - y_{1}\right)^{2} }$$
slope $$m = \frac{y_{2} - y_{1}}{x_{2} - x_{1}}$$
angle between lines $$\theta = \arctan \left( \frac{m_{1} - m_{2}}{1 + m_{1}m_{2}} \right)$$
midpoint $$\begin{split}P_{m} &= \left(x_{m},y_{m}\right) \\ &= \left(\frac{x_{1} + x_{2}}{2},\frac{y_{1} + y_{2}}{2}\right)\end{split}$$

Calculations

Intercept form

To obtain the intercept form from the slope intercept form substitute \(m = -\frac{b}{a}\)

$$\begin{split} mx + b &= y \\ -\frac{b}{a} x + b &= y \\ \frac{b}{a}x + y &= b \\ \frac{x}{a} + \frac{y}{b} &= 1 \end{split}$$

General form to point-slope

The relationship between the general equation and the point-slope equation is:

$$\begin{split} Ax + By + C &= 0 \\ By &= Ax - C \\ \Rightarrow y &= -\frac{A}{B}x + \left( -\frac{C}{B} \right) \end{split}$$

So,

$$m = -\frac{A}{B}$$

$$b = -\frac{C}{B}$$

Point-slope form to general

To get the general form from the slope intercept form

$$\begin{split}y &= mx + b \\ 0 &= mx - y + b \end{split}$$


See also

Conic sections