I need a formula to tell whether a trigonometry corner has an obtuse angle or not, given slopes value of each line connecting every two points respectively. Assuming I have three points
| X(1,3). . . . .
| . . . . Y(5,2).
| . . Z(3,1). . .
|________________
So, their slopes will be
XY : -1/4
XZ : -1
YZ : 1/2
So from given slopes as variables, we'll be able to tell that point Z has an obtuse angle. The rest are acute of course. But I can't figure out how to do it. Thank you in advance.
Take Origin = Point $Z$ , which means , we have to subtract the Co-ordinates from the other Points , to get :
$Z=(0,0)$
$X=(1-3,3-1)$
$Y=(5-3,2-1)$
We have to now get the Angle between the "vectors" $ZY$ & $ZX$
Standard Way is to calculate this with $\cos^{-1}([{X}\cdot{Y}]/[|X||Y|])$
Let the new "vectors" be $X=(x1,x2)$ & $Y=(y1,y2)$
Then the Angle between these two is $\cos^{-1}([x1y1+x2y2]/[\sqrt{x1^2+y1^2}\sqrt{x2^2+y2^2}])$
In this Method, we actually do not have to compute the $\cos^{-1}(\cdot)$ , we can simply check the SIGN of the argument : when it is Negative , we conclude that it is Obtuse & when it is Positive , we conclude that it is Acute.
More-over, we can avoid Squaring & Division because that will not change the SIGN.
We only have to calculate $[x1y1+x2y2]$ & Check the SIGN !
This Method is Very Efficient , requiring only Subtraction , Multiplication & Addition.
Check more on this with keywords : Dot Product & Normalization of vectors.
In given Example:
We get $\cos^{-1}([(-2)(+2)+(2)(1)]/[\sqrt{(-2)^2+(+2)^2}\sqrt{(+2)^2+(+1)^2}])$
$\cos^{-1}([-2]/[\sqrt{8}\sqrt{5}])$ , with Negative Argument , hence it has to be Obtuse Angle
$\cos^{-1}([-1]/[\sqrt{10}])=108$ (In Degrees)
Which is Indeed Obtuse Angle