# Thread: Two Ordered Pairs

1. ## Two Ordered Pairs

I need to know how to calculate the degree of an angle based on two ordered pairs x1, y1, x2, y2
x1 = 100
y1 = 100
x2 = 300
y2 = 300
How do I calculate the degrees??
Thanks,
Allen

2. Originally Posted by questforknowledge004
I need to know how to calculate the degree of an angle based on two ordered pairs x1, y1, x2, y2
x1 = 100
y1 = 100
x2 = 300
y2 = 300
How do I calculate the degrees??
Thanks,
Allen
Do you want angle a?

Code:
  /|\
|
|    +
|   /
|  /
| +_a____
<--|------------->
|
|
\|/
If so then you're looking for slope in degrees form.

It just so happens that the slope equals the tangent of angle a, so all you need to do is calculate the $\tan^{-1}$ of the slope.

For instance, your slope is 1, so the angle is: $\tan^{-1}(1)=45^{\circ}$

3. Originally Posted by questforknowledge004
I need to know how to calculate the degree of an angle based on two ordered pairs x1, y1, x2, y2
x1 = 100
y1 = 100
x2 = 300
y2 = 300
How do I calculate the degrees??
Thanks,
Allen
Which angle? The angle that the line joining the points (x1,y1) and (x2,y2)
makes with the horizontal? The angle between the vectors (x1,y1) and (x2,y2)? ...

RonL