# How do you write an equation of a line that passes through points (4,2), (-2,-4)?

May 16, 2017

$y = x - 2$

#### Explanation:

$\text{the equation of a line in "color(blue)"slope-intercept form}$ is.

$\textcolor{red}{\overline{\underline{| \textcolor{w h i t e}{\frac{2}{2}} \textcolor{b l a c k}{y = m x + b} \textcolor{w h i t e}{\frac{2}{2}} |}}}$
where m represents the slope and b, the t-intercept.

$\text{to calculate m use the "color(blue)"gradient formula}$

$\textcolor{red}{\overline{\underline{| \textcolor{w h i t e}{\frac{2}{2}} \textcolor{b l a c k}{m = \frac{{y}_{2} - {y}_{1}}{{x}_{2} - {x}_{1}}} \textcolor{w h i t e}{\frac{2}{2}} |}}}$
where $\left({x}_{1} , {y}_{1}\right) , \left({x}_{2} , {y}_{2}\right) \text{ are 2 coordinate points}$

$\text{the 2 points are } \left({x}_{1} , {y}_{1}\right) = \left(4 , 2\right) , \left({x}_{2} , {y}_{2}\right) = \left(- 2 , - 4\right)$

$\Rightarrow m = \frac{- 4 - 2}{- 2 - 4} = \frac{- 6}{- 6} = 1$

$\Rightarrow y = x + b \leftarrow \text{ partial equation}$

$\text{to find b, substitute either of the 2 given points into }$
$\text{the partial equation}$

$\text{using } \left(4 , 2\right)$

$2 = 4 + b \Rightarrow b = - 2$

$\Rightarrow y = x - 2 \leftarrow \textcolor{red}{\text{ in slope-intercept form}}$
graph{x-2 [-10, 10, -5, 5]}