Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a formula to calculate the second point in a segment given a starting point, segment length, and slope?


share|cite|improve this question
up vote 1 down vote accepted

Try this:

$$ \begin{pmatrix} x_B \\ y_B \end{pmatrix} = \begin{pmatrix} x_A \\ y_A \end{pmatrix} + L_{AB} \begin{pmatrix} \cos \theta \\ \sin \theta \end{pmatrix} $$

where $L_{AB}$ is the length, and $\theta$ is the angle of the segment direction. If you know the $m= \frac{\Delta y}{\Delta x}$ slope then $m = \tan \theta$. In terms the slope the above is:

$$ \begin{pmatrix} x_B \\ y_B \end{pmatrix} = \begin{pmatrix} x_A \\ y_A \end{pmatrix} + L_{AB} \begin{pmatrix} \frac{1}{\sqrt{1+m^2}} \\ \frac{m}{\sqrt{1+m^2}} \end{pmatrix} $$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.