Clarification on the Proof of $\cos \theta=\frac{a^{\mathrm{T}} b}{\|a\|\|b\|}$ for higher dimensions

168 Views Asked by At

Below is the proof given by Gilbert strang on pg 154 ,of the Cosine Formula :$\cos \theta=\frac{a^{\mathrm{T}} b}{\|a\|\|b\|}$

Before the proof, the only relevant thing the author defines is the inner product of two vectors $a, b$ given by $a^T.b$ and the orthogonality condition $a^Tb =0$

Authors proof:

enter image description here

Law of Cosines: $\quad\|b-a\|^{2}=\|b\|^{2}+\|a\|^{2}-2\|b\|\|a\| \cos \theta$

For angle $\theta$, the expression $\|b-a\|^{2}$ is $(b-a)^{T}(b-a)$, and above equation becomes $$ b^{\top} b-2 a^{\mathrm{T}} b+a^{\mathrm{T}} a=b^{\mathrm{T}} b+a^{\mathrm{T}} a-2\|b\|\|a\| \cos \theta $$ Canceling $b^{\top} b$ and $a^{\top} a$ on both sides of this equation, you recognize the formula for cosine: $a^{\top} b=\|a\|\|b\| \cos \theta .$ In fact, this proves the cosine formula in $n$ dimension since we only have to worry about the plane triangle $\mathrm{Oab}$

Question: How does this prove the cosine formula in $n$ dimensions ? The author assumes that the law of cosines works for all higher dimensional vectors without proving it .

Furthermore what does "we only have to worry about the plane triangle $\mathrm{Oab}$" mean in higher dimensions?

Can anyone please help me understand this? It has been a day but I'm not getting it, if you can only hint, I'd be glad.
Thank you

1

There are 1 best solutions below

10
On

What he means by "we only have to worry about the plane triangle Oab" is that the vectors a, b give rise to a 2D-triangle as in the picture. So we can just view the two vectors within the plane they span and not worry about the rest of the surrounding space.

In this light, it also makes sense that we can apply the law of cosines. As our vectors lie inside a 2D plane and we already know the law of cosines holds for triangles in 2D space, we can apply the law of cosines to the lengths of the vectors $a$, $b$ and $b - a$.