# Thread: Line equation from two points

1. ## Line equation from two points

Hi

How do I get the line equation from two points ?

The equation is $\displaystyle y = mx + c$

the two points are (1,2) and (5,5).

I know how to calculate m:

$\displaystyle m = (y2 - y1)/(x2 - x1) = 3/4$
but not y, x and c ....

so this is what I'v got

$\displaystyle y = (3/4)x + c$

Thanks

2. Originally Posted by carel_dutoit@yahoo.co.uk
Hi

How do I get the line equation from two points ?

The equation is $\displaystyle y = mx + c$

the two points are (1,2) and (5,5).

I know how to calculate m:

$\displaystyle m = (y2 - y1)/(x2 - x1) = 3/4$
but not y, x and c ....

so this is what I'v got

$\displaystyle y = (3/4)x + c$

Thanks
Take one of the points given and use it as
$\displaystyle (x_1,y_1)$, you found $\displaystyle m$ already, so just plug your values into the point-slope formula

$\displaystyle y - y_1 = m(x - x_1)$

and solve for $\displaystyle y$ to get the equation of the line

3. Hello, Carel!

You are that close to the answer . . .

How do I get the line equation from two points ?

The equation is $\displaystyle y \:= \:mx + c$

The two points are (1,2) and (5,5).

I know how to calculate $\displaystyle m\!:\;\;m \:= \:\frac{y_2 - y_1}{x_2 - x_1}\:= \:\frac{3}{4}$ . Right!

So this is what I've got: .$\displaystyle y \:= \:\frac{3}{4}x + c$ . . . . Good!

Since $\displaystyle (1,2)$ is on the line, .**
. . then $\displaystyle x = 1,\;y= 2$ must satisfy the equation.

Plug them into your equation: .$\displaystyle 2 \:=\:\frac{3}{4}(1) + c\quad\Rightarrow\quad c \,= \,\frac{5}{4}$ . . . see?

. . Therefore, the equation is: .$\displaystyle y \;=\;\frac{3}{4}x + \frac{5}{4}$

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

**

It doesn't matter which point we use; the answer will be the same.

Since $\displaystyle (5,5)$ is on the line,
. . then $\displaystyle x = 5,\;y= 5$ must satisfy the equation.

Plug them into your equation: .$\displaystyle 5 \:=\:\frac{3}{4}(5) + c\quad\Rightarrow\quad c \,= \,\frac{5}{4}$ . . . yay!

. . Therefore, the equation is: .$\displaystyle y \;=\;\frac{3}{4}x + \frac{5}{4}$

This is good way to check our answer.