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$$
parametric form $$x = x_{0} + at$$ $$y = y_{0} + bt$$
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}$$
distance between a point and a line $$d \left( \left( x_{0},y_{0} \right), Ax + By + C \right) = \frac{\left\vert Ax_{0} + By_{0} + C \right\vert}{\sqrt{A^{2} + B^{2}}}$$

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}$$

General form to parametric form

Find a point \(P_{0}(x_{0},y_{0})\) on the line, choose convenient values for \(x\) or \(y\) and solve the equation. For example, if \(B \neq 0\), set \(x = 0\) and solve for \(y\), or if \(A \neq 0\), set \(y = 0\) and solve for \(x\).

A direction vector \( \vec{v} = (a,b) \) of the line can be obtained by swapping the coefficients \(A\) and \(B\) and changing the sign of one of them. A possible direction vector is \((b,-a)\) because it follows the directional relationship of the line.

Construct the parametric equations using the form:

$$x = x_{0} + Bt$$

$$y = y_{0} - At$$

where \((x_{0},y_{0})\) is the chosen point and \((a,b)\) is the direction vector.


See also

Conic sections