Sign up ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have the point $(x_1, y_1)$, the angle $0 \leq a < 360^o$ and the length $l > 0$.

How do I determine the end point $(x_2, y_2)$ if there is a line between $(x_1, y_1)$ and $(x_2, y_2)$ of length $l$ and with angle $a$?

share|cite|improve this question

2 Answers 2

up vote 2 down vote accepted

$$(x_2,y_2)=(x_1+l\cdot\cos(a),y_1+l\cdot\sin(a)) \; .$$

There is an ambiguity in your question though: what is the reference w.r.t. which the angle is measured? I assumed it's the X-axis, since that seemed the most natural without any further specifications.

share|cite|improve this answer
Maybe you should add a comment on how to make sure that the calculator/computer computes the sine and cosine with respect to $a$ in degrees as opposed to radians and how to convert if necessary. – t.b. May 16 '11 at 11:50
@Theo: OK, I'll wait a bit to see if the OP asks for it. I deliberately kept the answer to the point with not much details on derivation. It could be a homework question, just as it could be about programming something. – Raskolnikov May 16 '11 at 11:56

Knowing the length $l$ and the angle $a$ gives you a right triangle with base parallel to the $x$-axis and the hypotenuse is the line itself. From this you can calculate the length of the legs, using trigonometry: denote the length of the leg parallel to the $x$-axis by $X$, and the other one by $Y$. Then, by the law of sine you get: $\frac{X}{\cos a}=\frac{Y}{\sin a}=\frac{l}{\sin \frac{\pi}{2}}=l$. From here you can find $X,Y$. The the end-point will be $(x_2,y_2)=(x_1+X,y_1+Y)$.

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.