# Thread: Finding a point on a line

1. ## Finding a point on a line

Seems I have forgotten how maths works. Perhaps you can help? I have two points, A and B, and an x value, and need to find the y value of a point that lies on a line between A and B.

Is there an equation for this? Or alternatively this is being used in a computer program, so if you prefer to express a solution as an algorithm that works too, but either way is fine.

Thanks a lot for any advice.
I'm sure I used to be able to do this, so perhaps a link to some site that might help me refresh my maths skills wouldn't go astray either.

2. ## Re: Finding a point on a line

Originally Posted by Mauris
Is there an equation for this? Or alternatively this is being used in a computer program, so if you prefer to express a solution as an algorithm that works too, but either way is fine.
Equation of the line through two points...:

$\displaystyle y-y_A=\frac{y_B-y_A}{x_B-x_A}(x-x_A)$