# Formulas

## Analytic Geometry # Straight Line in Plane

Point coordinates: $$x,$$ $${x_0},$$ $${x_1},$$ $${x_2},$$ $$y, \ldots$$
Real numbers: $$k,$$ $$a,$$ $$b,$$ $$p,$$ $$t,$$ $$A,$$ $$B,$$ $$C,$$ $${A_1},$$ $${A_2}, \ldots$$
Angle between two lines: $$\varphi$$
Angles: $$\alpha$$, $$\beta$$
Direction vectors: $$\mathbf{s}$$, $$\mathbf{b}$$
Normal vector: $$\mathbf{n}$$
Position vectors: $$\mathbf{a}$$, $$\mathbf{r}$$
Distance from a point to a line: $$d$$
1. General equation of a straight line in the Cartesian coordinate system:
$$Ax + By + C = 0$$,
where $$x$$, $$y$$ are the coordinates of a point on the line, $$A$$, $$B$$, $$C$$ are real numbers provided that $${A^2} + {B^2} \ne 0$$.
2. Normal vector to a straight line
Let the line be defined by the general equation
$$Ax + By + C = 0$$,
Then the vector $$\mathbf{n}\left( {A,B} \right)$$ whose coordinates are equal to the coefficients $$A,$$ $$B$$ is the normal vector to the straight line.
3. Explicit equation of a straight line (slope-intercept form)
$$y = kx + b.$$
Here the coefficient $$k = \tan\alpha$$ is called the slope of the straight line, and the number $$b$$ is the coordinate of intersection of the line with the $$y$$-axis.
4. The slope of a straight line is determined by the formula
$$k = \tan \alpha =$$ $${\large\frac{{{y_2} – {y_1}}}{{{x_2} – {x_1}}}\normalsize},$$
where $$A\left( {{x_1},{y_1}} \right)$$, $$B\left( {{x_2},{y_2}} \right)$$ are the coordinates of two points of the line.
5. Equation of a straight line given a point and a slope (point-slope form)
$$y = {y_0} + k\left( {x – {x_0}} \right)$$,
where $$k$$ is the slope, and the point $$P\left( {{x_0},{y_0}} \right)$$ lies on the straight line.
6. Equation of a straight line passing through two points (two-point form)
$${\large\frac{{y – {y_1}}}{{{y_2} – {y_1}}}\normalsize} = {\large\frac{{x – {x_1}}}{{{x_2} – {x_1}}}\normalsize}$$  or  $$\left| {\begin{array}{*{20}{c}} x & y & 1\\ {{x_1}} & {{y_1}} & 1\\ {{x_2}} & {{y_2}} & 1 \end{array}} \right| = 0.$$
7. Intercept form of a straight line equation
$${\large\frac{x}{a}\normalsize} + {\large\frac{y}{b}\normalsize} = 1$$,
where $$a$$ and $$b$$ are defined as $$x$$-intercept and $$y$$-intercept, respectively.
8. Normal form of a straight line equation
$$x\cos \beta + y\sin \beta$$ $$-\; p$$ $$= 0$$
Here $$\cos \beta$$ and $$\sin\beta =$$ $$\cos \left( {90^\circ – \beta} \right)$$ are the direction cosines of the normal vector. The parameter $$p$$ is equal to the distance between the straight line and the origin.
9. Point direction form of a straight line equation
$${\large\frac{{x – {x_1}}}{X}\normalsize} = {\large\frac{{y – {y_1}}}{Y}\normalsize}$$,
where the vector $$\mathbf{s}\left( {X,Y} \right)$$ is directed along the straight line, and the point $$P\left( {{x_1},{y_1}} \right)$$ lies on the line. This equation is also called the standard or canonical equation of the straight line.
10. Vertical line equation
$$x= a$$
11. Horizontal line equation
$$y= b$$
12. Vector equation of a straight line
$$\mathbf{r}= \mathbf{a} + t\mathbf{b}$$,
where the vector $$\mathbf{a}$$ is drawn from the origin to a known point $$A$$ lying on this line. The vector $$\mathbf{b}$$ determines the direction of the straight line. The vector $$\mathbf{r} = \mathbf{OX}$$ is the position vector directed from the origin to any point $$X$$ on this line. The number $$t$$ is a parameter that varies from $$– \infty$$ to $$\infty$$.
13. Equation of a straight line in parametric form
\left\{ \begin{aligned} x &= {a_1} + t{b_1} \\ y &= {a_2} + t{b_2} \end{aligned} \right.,
where $$\left( {{a_1},{a_2}} \right)$$ are the coordinates of a known point $$A$$ lying on this line, ($$\left( {x,y} \right)$$ are the coordinates of an arbitrary point of the line, $$\left( {{b_1},{b_2}} \right)$$ are the coordinates of a vector $$\mathbf{b}$$ parallel to the given straight line, $$t$$ is a parameter.
14. Distance from a point to a straight line
The distance $$d$$ from the point $$M\left( {{x_1},{y_1}} \right)$$ to the line $$Ax + By + C$$ $$= 0$$ is given by the formula
$$d = {\large\frac{{\left| {A{x_1} + B{y_1} + C} \right|}}{{\sqrt {{A^2} + {B^2}} }}\normalsize}.$$
15. Parallel lines
Two straight lines $$y = {k_1}x + {b_1}$$ and $$y = {k_2}x + {b_2}$$ are parallel if
$${k_1} = {k_2}$$.
Two straight lines $${A_1}x + {B_1}y + {C_1}$$ $$= 0$$ and $${A_2}x + {B_2}y + {C_2}$$ $$= 0$$ are parallel if
$${\large\frac{{{A_1}}}{{{A_2}}}\normalsize} = {\large\frac{{{B_1}}}{{{B_2}}}\normalsize}$$.
16. Perpendicular lines
Two straight lines $$y = {k_1}x + {b_1}$$ and $$y = {k_2}x + {b_2}$$ are perpendicular if
$${k_1} = – {\large\frac{1}{{{k_2}}}\normalsize}$$ or equivalently $${k_1}{k_2} = – 1$$.
Two straight lines $${A_1}x + {B_1}y + {C_1}$$ $$= 0$$ and $${A_2}x + {B_2}y + {C_2}$$ $$= 0$$ are perpendicular if
$${A_1}{A_2} + {B_1}{B_2} = 0$$.
17. Angle between straight lines
$$\tan \varphi = {\large\frac{{{k_2} – {k_1}}}{{1 + {k_1}{k_2}}}\normalsize},\;$$ $$\cos \varphi = {\large\frac{{{A_1}{A_2} + {B_1}{B_2}}}{{\sqrt {A_1^2 + B_1^2} \sqrt {A_2^2 + B_2^2} }}\normalsize}$$
18. Intersection of two lines
If the two straight lines $${A_1}x + {B_1}y + {C_1}$$ $$= 0$$ and $${A_2}x + {B_2}y + {C_2}$$ $$= 0$$ intersect, then the coordinates of the intersection point are
$${x_0} = {\large\frac{{ – {C_1}{B_2} + {C_2}{B_1}}}{{{A_1}{B_2} – {A_2}{B_1}}}\normalsize},\;$$ $${y_0} = {\large\frac{{ – {A_1}{C_2} + {A_2}{C_1}}}{{{A_1}{B_2} – {A_2}{B_1}}}\normalsize}.$$