# 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$$."

• Comments are not for extended discussion; this conversation has been moved to chat. – Aloizio Macedo Jul 17 at 13:43

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. 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

• Does this proof even require $x, y$ to be linearly independent? It seems like it should go through as long as $x, y, x + y$ are all nonzero. – Rivers McForge Jul 15 at 2:31
• Right, the proof still works without that assumption. – Pythagoras Jul 15 at 3:03

One of the problems one faces in tackling this question is that three distinct points in $$\ \mathbb{R}^n\$$ always do in fact lie in a $$2$$-dimensional affine subspace. It therefore makes no sense to assume that they don't, and it's not clear to me what criteria a proof of the identity would have to satisfy to be reasonably said not to rely on that fact. At any rate here's my attempt to meet the specifications given in the question.

Let $$\ p, q, r\$$ be the coordinate (column) vectors in $$\ \mathbb{R}^n\$$ of the points $$\ P,Q,R\$$, respectively, and $$u=\frac{q-p}{\|q-p\|},\ v=\frac{r-q}{\|r-q\|},\ w=\frac{p-r}{\|p-r\|}\ .$$

• If $$\ \lambda=u^\top v=\pm 1\$$ (i.e. the triangle is degenerate), and hence $$\ v=\lambda u\$$, then \begin{align} p-r&=\frac{\|q-p\|+\lambda\|r-q\|}{\|q-p\|}(p-q)\ ,\\ \|p-r\|&= \|q-p\|+\lambda\|r-q\|\ ,\\ w&=\cases{-u& if \ \lambda=1\ or \ \|q-p\|>\|r-q\|\\ u&otherwise,}\\ v^\top w&= \cases{-\lambda& if \ \lambda=1\ or \ \|q-p\|>\|r-q\|\\ \lambda&otherwise,}\\ w^\top u&= \cases{-1 & if \ \lambda=1\ or \ \|q-p\|>\|r-q\|\\ 1&otherwise.} \end{align} In all cases, exactly two of the inner products $$\ -u^\top v,\ -v^\top w\$$ and $$\ -u^\top v\$$ are $$\ +1\$$ and the other is $$\ -1\$$. Thus, exactly two of the angles $$\ \cos^{-1}\left(-u^\top v\right),\ \cos^{-1}\left(-v^\top w\right)\$$ and $$\ \cos^{-1}\left(-w^\top v\right)\$$ are zero and the other is $$\ \pi\$$, and therefore their sum is $$\ \pi\$$.
• If $$\ \left|u^\top v\right|\ne1\$$, let $$\ h=\frac{v-u^Tv\,u}{\| v-u^Tv\,u\|}\$$. Then $$\ b_1=u\$$ and $$\ b_2=h\$$ are orthogonal unit vectors, so there exist $$\ b_3,b_4,\dots,b_n\in\mathbb{R}^n\$$ such that $$\ b_1,b_2,\dots,b_n\$$ form a basis. Let $$\ U(\theta): \mathbb{R}^n\rightarrow\mathbb{R}^n\$$ be the linear transformation defined by \begin{align} U(\theta)\left(\sum_{i=1}^nx_ib_i\right)&=\\ \left(x_1\cos\theta-\right.&\left.x_2\sin\theta\right)b_1+\left(x_1\sin\theta+x_2\cos\theta\right)b_2+ \sum_{i=3}^nx_ib_i\ . \end{align} Then $$\ U(\theta+\phi)=U(\theta)U(\phi)\$$, and $$\ U(\theta)=I\$$ if and only if $$\ \theta=2n\pi\$$ for some integer $$\ n\$$. If $$\theta_1=\cos^{-1}\left(u^\top v\right),\ \theta_2= \cos^{-1}\left(v^\top w\right),\ \text{and }\ \theta_3= \cos^{-1}\left(w^\top u\right)\ ,$$ then $$\ U(\theta_1)u=v\$$, $$\ U(\theta_2)v=w\$$, $$\ U(\theta_3)w=u\$$, and $$\ U(\theta_i)b_j=b_j\$$ for all $$\ i=1,2,3\$$ and $$\ j=3,4,\dots,n\$$. Therefore, \begin{align} U(\theta_1+\theta_2+\theta_3)\,u&=u\\ U(\theta_1+\theta_2+\theta_3)\,v&=v\ \text{ and hence}\\ U(\theta_1+\theta_2+\theta_3)\,b_i&=b_i\ \text{ for all }\ i\ . \end{align} Thus, $$\ U(\theta_1+\theta_2+\theta_3)\$$ is the identity, and so $$\ \theta_1+\theta_2+\theta_3=2n\pi\$$ for some integer $$\ n\$$. But since $$\ 0\le\theta_i\le\pi\$$, the only possibility is $$\ n=1\$$.
• Just to clarify, the question isn't asking to "Assume the three points don't lie in a 2D subspace". It's asking to give a proof that doesn't directly use that assumption in the proof. – Rivers McForge Jul 14 at 18:24
• Yes, I didn't believe you were asking for a proof which assumed the three points didn't lie in a plane. The problem arises from the the word "assumption" in your request not to "directly use that assumption in the proof". Here, of course, the word "assumption" refers to the *fact*—and it is a fact, not an assumption—that the three points do lie in a plane. You have no choice in the matter of whether or not you "assume" it. So it's not at all clear to me what it means to not "directly use that" fact in the proof. – lonza leggiera Jul 14 at 21:51
• Imagine you're teaching someone topology for the first time, specifically the concept of "connectedness". You are showing them a proof that $[0, 1]$ in the standard topology on $\mathbb{R}$ is connected. This is a fact whether or not you assume it, but you shouldn't directly use that assumption in the proof, because that would be circular. See the idea? I'm asking for a coordinate proof, as you would explain it to an alien who has never learned synthetic geometry or Euclid's postulates, and whose only ideas of angles and triangles come from vectors and dot products. – Rivers McForge Jul 15 at 1:55