0
$\begingroup$

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

$\endgroup$
1
$\begingroup$

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

$\endgroup$
10
  • $\begingroup$ How can you say that , two vectors say $[1,2,2,3,5]^T$and $[2,3,6,9,8]^T$ form a triangle? We can't visualise these vectors, then how come you say they form a triangle?? $\endgroup$
    – Kashmiri
    May 18 at 14:28
  • 2
    $\begingroup$ @Kashmiri The subspace spanned by two (non-parallel) vectors is a plane, regardless of the dimension of the ambient space. Yadeses has it right: you can forget the oddities of working in a "large" space and just pretend you're on a plane anyway. $\endgroup$ May 18 at 14:36
  • $\begingroup$ Hi Dear Cameron, How do I visualize a vector (1,1,1,1) ? $\endgroup$
    – Kashmiri
    May 18 at 14:43
  • $\begingroup$ If we consider two vectors in 3D space, we can see that the vectors span a 2D plane. This also holds in higher dimensions, so we can say that 2 5D vectors $v_1$ and $v_2$ form a 2D plane: namely the collection of all linear combinations of $v_1$ and $v_2$. $\endgroup$
    – Yadeses
    May 18 at 14:54
  • $\begingroup$ I do agree that 2 vectors form a subspace, but precisely how do you visualize (1,1,1,1) as a vector ? It's impossible to visualize it, and hence to say that there exists a triangle. $\endgroup$
    – Kashmiri
    May 18 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.