TITLE: Angle between two three-dimensional vectors
QUESTION [0 upvotes]: I am searching for an alternative method for solving for the angle between two vectors to verify my current solutions. the method I have currently used is the dot product, wondering if anyone knows?

REPLY [0 votes]: This approach also works in higher dimensional spaces.
Use the following:
Herons Formula
Law of sines
Normalize the two vectors $\vec a$ and $\vec b$.
Calculate the lengths, $a(=1)$, $b(=1)$ and $c$ of the three vectors $\vec a$, $\vec b$, and $\vec c = \vec b - \vec a$.
Calculate the area $T$ formed by these three vectors.
Setup the equation $sin(\gamma) = K$ and solve for $0 \lt \gamma \le \pi/2$ using arcsin.
If $c^2 \gt 2$, reset $\gamma$ to $\pi - \gamma$.
The angle between $\vec a$ and $\vec b$ is $\gamma$.

Another answer discussed problems that will occur calculating the arcsin of $1$. If the occurs then calculate one of the other angles of our isosceles triangle in order to get $\gamma$.
{"set_name": "stack_exchange", "score": 0, "question_id": 2385111}