I have $3$ points : $(x_1, y_1), (x_2, y_2)$ and $(x_3, y_3)$.
By joining these $3$ points I get $2$ lines meeting at $(x_2, y_2)$.
Now, I want to find the angle formed at the point $(x_2, y_2)$ when the lines intersect.
I have tried doing this by finding the slope $(m)$ of the two lines and then finding the angle by using the "$\tan \theta = \frac{m_1 – m_2 }{1+ m_1m_2}$" formula but I find that it doesn't work in some particular situations.
So is there any way by which I can convert the lines into vectors and then find the angle using $\cos \theta = \frac{v_1·v_2}{|v_1||v_2|}$ formula.
If not, could you please let me know any other way by which I can find the angle between the $2$ lines, even if I place the two lines in any direction.
The vector from $(a,b)$ to $(c,d)$ is $(c-a, d-b)$