# Finding the $Y$-intercept of a line, given two points

I'm not sure how best to ask this, so I'll try to explain.

Say I have a line drawn between the points $(-1,50)$ and $(2,30)$. How can I figure out the $Y$-value when the line crosses the $X$-value of $0$?

-

## 3 Answers

The slope of the line using the points $(-1,50)$ and $(2,30)$ is ${50-30\over -1-2 } =-{ 20\over 3}$.

The slope of the line using the points $(2,30)$ and $(0,y)$ is ${30-y\over 2-0}$.

Since the slope of a line does not depend on the two points used to compute it, we have

$$-{ 20\over 3}= {30-y\over 2};$$ whence, $$y=30+{40\over3}={130\over3}.$$

-
Unless I'm doing something incorrect, the result from your method is different from Lazar's. Edit: I see your correction to his equation now. – GoldenNewby Feb 7 '12 at 21:19
Yup, mistyped the first line which killed the whole process. Thanks for pointing out. – Lazar Ljubenović Feb 7 '12 at 21:28

You first find the equation of the line:

$$y-y_0=\frac{y_1-y_0}{x_1-x_0}\cdot(x-x_0)$$

where $A=(x_0,y_0)=(-1,50)$ and $B=(x_1,y_1)=(2,30)$ are coordinates of given points $A$ and $B$. In this case, you get:

$$y-50=\frac{30-50}{2+1}\cdot(x+1)$$ $$y-50=\frac{-20}{3}\cdot(x+1)$$ $$y-50=-\frac{20}{3}\cdot x -\frac{20}3$$ $$y=-\frac{20}{3}\cdot x -\frac{20}3+\frac{150}3$$ $$y=-\frac{20}{3}\cdot x +\frac{130}3$$

Now you just insert $x=0$ and you get solution for $y$: $$y=-\frac{20}{3}\cdot 0 +\frac{130}3$$ $$y=+\frac{130}3$$

-

First find the gradient of the line $m=\frac{50-30}{-1-2}=\frac{20}{-3}$, then substitute this and one point into the general equation for a 2d line $y- y_1 =m(x-x_1)$ to get:

$y - 30 = \frac{20}{-3}(x-2)$

$y = \frac{20x}{-3} + \frac{40}{3} + 30$

Substituting $x = 0$ into this gives:

$y = \frac{40}{3} + 30 = \frac{130}{3}$

So when the line passes through $x=0$ the y value is $\frac{130}{3}$

-