# What's the equation of a line that passes through (-4,1) and (0,5).?

Apr 7, 2018

$y = x + 5$

#### Explanation:

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

•color(white)(x)y=mx+b

$\text{where m is the slope and b the y-intercept}$

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

•color(white)(x)m=(y_2-y_1)/(x_2-x_1)

$\text{let "(x_1,y_1)=(-4,1)" and } \left({x}_{2} , {y}_{2}\right) = \left(0 , 5\right)$

$\Rightarrow m = \frac{5 - 1}{0 - \left(- 4\right)} = \frac{4}{4} = 1$

$\Rightarrow y = x + b \leftarrow \textcolor{b l u e}{\text{is the partial equation}}$

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

$\text{using "(0,5)" then}$

$5 = 0 + b \Rightarrow b = 5$

$\Rightarrow y = x + 5 \leftarrow \textcolor{red}{\text{equation in slope-intercept form}}$

Apr 7, 2018

$y + x - 5 = 0$

#### Explanation:

The formula to get the equation of a straight line knowing two points that lie on it is:
$\frac{y - {y}_{1}}{x - {x}_{1}} = \frac{{y}_{2} - {y}_{1}}{{x}_{2} - {x}_{1}}$

where the two points are $\left({x}_{1} , {y}_{1}\right)$ and$\left({x}_{2} , {y}_{2}\right)$ and you can pick any of the points to be one of them.

And by substituting you get:

$\frac{y - 5}{x - 0} = \frac{5 - 1}{- 4 - 0}$

And by simplifying you get:
$y - 5 = - x$
so the equation is $y + x - 5 = 0$