Coordinate proof that the sum of a triangle's angles is $180^\circ$? I was answering a question about why the Penrose triangle is impossible when I realized I haven't seen a coordinate proof that the angles of a triangle in $\mathbb{R}^n$ add up to $180^\circ$. I know the synthetic geometry proof for $\mathbb{R}^2$ based on drawing a line through one corner parallel to the opposite base, but is there a 'nice' [non-computationally obnoxious] way of directly verifying the following vector identity:
Theorem: Let $P, Q, R$ be three distinct points in $\mathbb{R}^n$, and let $\vec{x} = \vec{PQ}$, $\vec{y} = \vec{QR}$, $\vec{z} = \vec{RP}$ (note order). Then
$$\cos^{-1}\left(-\frac{\vec{x} \cdot \vec{y}}{|\vec{x}||\vec{y}|}\right)+\cos^{-1}\left(-\frac{\vec{y} \cdot \vec{z}}{|\vec{y}||\vec{z}|}\right)+\cos^{-1}\left(-\frac{\vec{z} \cdot \vec{x}}{|\vec{z}||\vec{x}|}\right)=\pi,$$
or equivalently [since $\cos^{-1}(a) = \pi - \cos^{-1}(-a)$],
$$\cos^{-1}\left(\frac{\vec{x} \cdot \vec{y}}{|\vec{x}||\vec{y}|}\right)+\cos^{-1}\left(\frac{\vec{y} \cdot \vec{z}}{|\vec{y}||\vec{z}|}\right)+\cos^{-1}\left(\frac{\vec{z} \cdot \vec{x}}{|\vec{z}||\vec{x}|}\right)= 2\pi?$$
The closest I've seen is this argument, but it hinges on the multiplicative properties of $\mathbb{C}$, so it only works in 2 dimensions. [A quaternion-based proof in $\mathbb{R}^4$, or an octonion-based proof in $\mathbb{R}^8$, while not fully answering my question, would certainly be interesting to see!]
Remark: Obviously one could argue that any triangle "lives" in 2D, in the sense that there's a 2D plane passing through any 3 points in $\mathbb{R}^n$. However, rather than use this crutch from synthetic geometry as a jumping off point or deus ex machina, I'm asking for a coordinatized proof/vector algebra proof that is as explicit as possible in $n$ dimensions generally, as opposed to one that starts by establishing the 2D case, and then hand-waves that the general case is equivalent/reducible to the 2D one.
This specifically excludes arguments that begin, "Without loss of generality, suppose $P, Q, R \in \mathbb{R}^2 \times \{ \vec{0} \} \subset \mathbb{R}^n$...."
The other synthetic geometry assumption I would prefer to avoid directly relying on is: "Given a line $\ell$ in $\mathbb{R}^n$ and a point $P$ not on line $\ell$, there is exactly one line through $P$ parallel to $\ell$."
 A: By the assumption of $P,Q,R$, one has that $x,y,$ and $z=-x-y$ are nonzero vectors in ${\mathbb R}^n$. Then one checks that
$$|z|^2=(-x-y)\cdot(-x-y)=|x|^2+|y|^2+2x\cdot y,\quad (1)$$
and $$|x|^2|y|^2-(x\cdot y)^2=|y|^2|z|^2-(y\cdot z)^2=|z|^2|x|^2-(z\cdot x)^2.\quad (2)$$ Let $A,B,C$ be the angles you defined, namely $$A=\cos^{-1}\left(-\frac{x\cdot y}{|x||y|}\right),B=\cos^{-1}\left(-\frac{y\cdot z}{|y||z|}\right),C=\cos^{-1}\left(-\frac{z\cdot x}{|z||x|}\right).\quad (3)$$  By assumption $0<A+B+C<3\pi$. It follows that $$A+B+C=\pi$$ $$\Leftrightarrow \cos(A+B+C)=-1.\quad (4)$$ Therefore it suffices to show (4), but by trigonometric identities, one has $$\cos(A+B+C)=\cos(A)\cos(B)\cos(C)-\sum_{\rm cyc.}\sin(A)\sin(B)\cos(C)$$
$$=\left(\frac{-x\cdot y}{|x||y|}\right)\left(\frac{-y\cdot z}{|y||z|}\right)\left(\frac{-z\cdot x}{|z||x|}\right)-\sum_{\rm cyc.}\sqrt{1-\left(\frac{x\cdot y}{|x||y|}\right)^2}\sqrt{1-\left(\frac{y\cdot z}{|y||z|}\right)^2}\left(\frac{-z\cdot x}{|z||x|}\right),$$ which can be rewritten as (using (2) and factoring out the common factor)
$$\frac{-(x\cdot y)(y\cdot z)(z\cdot x)}{|x|^2|y|^2|z|^2}-\frac{|x|^2|y|^2-(x\cdot y)^2}{|x|^2|y|^2|z|^2}(-z\cdot x-x\cdot y-y\cdot z)$$
$$=\frac{(-x\cdot y)(|y|^2+x\cdot y)(|x|^2+x\cdot y)}{|x|^2|y|^2|z|^2}-\frac{|x|^2|y|^2-(x 
\cdot y)^2}{|x|^2|y|^2|z|^2}(|z|^2-x\cdot y)~(\because~z=-x-y)$$
$$=\frac{(-x\cdot y)[(|y|^2+x\cdot y)(|x|^2+x\cdot y)-(|x|^2|y|^2-(x\cdot y)^2)]-(|x|^2|y|^2-(x\cdot y)^2)|z|^2}{|x|^2|y|^2|z|^2}$$
$$=\frac{-(x\cdot y)^2(| x|^2+|y|^2+2x\cdot y)-|x|^2|y|^2|z|^2+(x\cdot y)^2|z|^2}{| x|^2|y|^2|z|^2}=-1,$$ since by (1) the first and the third terms in the numerator cancel. QED
