# How do you write an equation of a line going through (-5,-2), (-3,8)?

Mar 7, 2017

$\left(y + \textcolor{red}{2}\right) = \textcolor{b l u e}{5} \left(x + \textcolor{red}{5}\right)$

Or

$\left(y - \textcolor{red}{8}\right) = \textcolor{b l u e}{5} \left(x + \textcolor{red}{3}\right)$

Or

$y = \textcolor{red}{5} x + \textcolor{b l u e}{23}$

#### Explanation:

First, we need to determine the slope of the line. The slope can be found by using the formula: $m = \frac{\textcolor{red}{{y}_{2}} - \textcolor{b l u e}{{y}_{1}}}{\textcolor{red}{{x}_{2}} - \textcolor{b l u e}{{x}_{1}}}$

Where $m$ is the slope and ($\textcolor{b l u e}{{x}_{1} , {y}_{1}}$) and ($\textcolor{red}{{x}_{2} , {y}_{2}}$) are the two points on the line.

Substituting the values from the points in the problem gives:

$m = \frac{\textcolor{red}{8} - \textcolor{b l u e}{- 2}}{\textcolor{red}{- 3} - \textcolor{b l u e}{- 5}} = \frac{\textcolor{red}{8} + \textcolor{b l u e}{2}}{\textcolor{red}{- 3} + \textcolor{b l u e}{5}} = \frac{10}{2} = 5$

Now, we can use the point-slope formula to find an equation for the line. The point-slope formula states: $\left(y - \textcolor{red}{{y}_{1}}\right) = \textcolor{b l u e}{m} \left(x - \textcolor{red}{{x}_{1}}\right)$

Where $\textcolor{b l u e}{m}$ is the slope and $\textcolor{red}{\left(\left({x}_{1} , {y}_{1}\right)\right)}$ is a point the line passes through.

Substituting the slope we calculated and the first point from the problem gives:

$\left(y - \textcolor{red}{- 2}\right) = \textcolor{b l u e}{5} \left(x - \textcolor{red}{- 5}\right)$

$\left(y + \textcolor{red}{2}\right) = \textcolor{b l u e}{5} \left(x + \textcolor{red}{5}\right)$

Or, we can substitute the slope we calculated and the second point from the problem giving:

$\left(y - \textcolor{red}{8}\right) = \textcolor{b l u e}{5} \left(x - \textcolor{red}{- 3}\right)$

$\left(y - \textcolor{red}{8}\right) = \textcolor{b l u e}{5} \left(x + \textcolor{red}{3}\right)$

Or, we can solve for $y$ and put the equation into the slope-intercept form. The slope-intercept form of a linear equation is: $y = \textcolor{red}{m} x + \textcolor{b l u e}{b}$

Where $\textcolor{red}{m}$ is the slope and $\textcolor{b l u e}{b}$ is the y-intercept value.

$y - \textcolor{red}{8} = \left(\textcolor{b l u e}{5} \times x\right) + \left(\textcolor{b l u e}{5} \times \textcolor{red}{3}\right)$

$y - \textcolor{red}{8} = 5 x + 15$

$y - \textcolor{red}{8} + 8 = 5 x + 15 + 8$

$y - 0 = 5 x + 23$

$y = \textcolor{red}{5} x + \textcolor{b l u e}{23}$