Given two $n$-dimensional basis vectors $e_0, e_1$ spanning a 2D plane embedded into an $n$-dimensional Euclidean space, how to compute the signed angle $\Omega \in [-\pi, \pi]$ between two vectors $u$ and $v$ on this plane?
Signed angle in n-dimensional space
1.5k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 2 best solutions below
On
According to this excellent proof, here is how to calculate that angle, called $\beta$ to distinguish it from $\alpha$, the unsigned version of the angle rotated in a certain direction from $\vec{a}$ to $\vec{b}$. Note that you must specify a vector $\vec{n}$ satisfying $\lVert\vec{n}\rVert = 1$ normal to the plane containing the two angles, which will point in one of the two possible directions:
$\beta = $atan2$\left(\left[(\vec{a} \times \vec{b}) \cdot \vec{n}\right], \left[\vec{a} \cdot \vec{b}\right]\right)$,
where atan2 is a function requiring entry of a fraction in the form $\frac{\sin{\beta}}{\cos{\beta}} \equiv \tan{\beta}$.
Adding images of source material for definitions of cross (skew/vector) and dot (direct/scalar) product from Chapter 5 of this book by J. Willard Gibbs:
Short answer: you can't.
Explanation: a signed angle makes sense only when the plane where the vectors live is endowed with an orientation (which is really the choice of one particular basis once and for all). A positive angle will then mean equivalently that the basis $(u,v)$ defines the same orientation as the one you fixed, which means that the change of basis from one to the other has a positive determinant.
In an $n$-dimensional space, there is no canonical choice of an orientation for each plane. In rough terms, you can look at your vectors from either side of the plane they span, and "see" two opposite angles.