How can I prove the law of cosines for vectors in R^2 using lengths and angles?

  • Thread starter smerhej
  • Start date
  • Tags
    Law
In summary, the law of cosines states that the length of two vectors is equal to the sum of their squared lengths.
  • #1
smerhej
20
0

Homework Statement



Prove the law of cosines: If v and w are vectors in R^2, then

|v-w|^2 = |v|^2 + |w|^2 - 2|v||w|cosθ

where θ is the angle between v and w.

2. Homework Equations /info

|x| refers to length, and not absolute value (If that doesn't make any sense then I must be wrong, but our prof. insisted on only using single lines to define a value as 'length', which can be confusing at times).

The Attempt at a Solution



I got blindsided by this question (missed the lecture..). Even just a starting point, or even an online resource would be greatly appreciated, and to go as far fully providing me with the solution would be extremely helpful (but I suppose possibly detrimental).

Also, the rest of the assignment deals with orthogonal projections, and cross products, as well as distances from points to planes, and lines - do these sort of questions involve the usage of the above law?
 
Physics news on Phys.org
  • #2
Do you mean you want to prove the following:

174462901_0a1de6a9d8_o.png
 
  • #3
Assuming you know the explicit form of the dot product ([itex]\vec a \cdot \vec b = |\vec a| |\vec b| \cos\theta[/itex] with [itex]\theta[/itex] the angle between them) you can just write it out using the properties of the dot product:
[tex]|v - w|^2 = (v - w) \cdot (v - w) = \cdots[/tex]
 
  • #4
Thanks for the reply!

Alright,

So I get:

v2 - 2vw +w2 = v2 + w2 - 2vwcosθ

Then:

-2vw = -2vwcosθ

so for that to be true cosθ needs to equal 1, meaning theta is 0.

..now what?
 
  • #5
Sorry, what?
Where is the left hand side coming from?
And what does "2vwcosθ" mean? v and w are vectors, vw is not a valid product.
Please try to be a bit more precise in your notation, it is important here!
 
  • #6
Right sorry,

So doing the dot product of the LHS gives us:

|v|2 + |w|2

Then, we substract the lengths |v|2 + |w|2 of the RHS from the lengths |v|2 + |w|2 of the LHS , which leaves

0 = 2 |v| |w| cosθ

I'm still confused as to where this is going. I really am sorry for being so clueless on this matter.
 
  • #7
Hold on.. If 0 = 2 |v| |w| cos (theta) then that means cos of theta has to equal 0 (so cos of 2 over pi) meaning the angle is 90 degrees, meaning the two vectors are perpendicular.

Right?
 
  • #8
Yes, I think you are missing my point.
The equality I wrote,
[tex]|v - w|^2 = (v - w) \cdot (v - w),[/tex]
is the definition of |v - w|, because the length of a vector is the square of the dot product with itself.
You can then work out the dot product, but note that wherever you get v . v, you don't really get v2, but you get |v|2 (again, by the same definition).
 
  • #9
smerhej said:
Hold on.. If 0 = 2 |v| |w| cos (theta) then that means cos of theta has to equal 0 (so cos of 2 over pi) meaning the angle is 90 degrees, meaning the two vectors are perpendicular.

Right?

Yep, and two arbitrary vectors aren't perpendicular, in general.
So there's a big clue something went wrong :-)
 
  • #10
Alright, so let me try again.

|v-w|2 = |v|2 + |w|2 - 2|v||w|cosθ

so,

2|v||w|cosθ = |v|2 + |w|2 - |v-w|2

" " = |v|2 + |w|2 - (|v|2 + |w|2 -2(v)(w))

" " = 2(v)(w)

|v||w|cosθ = (v)(w)

Yes? But is that saying that the dot product between v and w is equal to length of v times length of w times the cosinus of the angle between them? Does that make sense?..
 
  • #11
2emfntt.png


S=A + B
S2=(A+B)2
S.S=(A+B).(A+B)
... etc
 
  • #12
smerhej said:
Alright, so let me try again.

|v-w|2 = |v|2 + |w|2 - 2|v||w|cosθ

so,

2|v||w|cosθ = |v|2 + |w|2 - |v-w|2

" " = |v|2 + |w|2 - (|v|2 + |w|2 -2(v)(w))

" " = 2(v)(w)

|v||w|cosθ = (v)(w)

Yes? But is that saying that the dot product between v and w is equal to length of v times length of w times the cosinus of the angle between them? Does that make sense?..

Yes. That is how it is sometimes defined.

RGV
 
  • #13
smerhej said:
alright, so let me try again.

|v-w|2 = |v|2 + |w|2 - 2|v||w|cosθ

q.e.d.
 
  • #14
I can't tell if you just insulted me or told me that I finally arrived at the appropriate answer.. Either way thanks for all your help (everyone)!
 
  • #15
Nope, it was not meant as an insult.
I was just reminding you that what you've written there is what you told us in your first post is the thing you want to prove.

The conclusion is usually taken as the definition of the inner product, as Ray pointed out. So in a sense, you'd have to read your post backwards.

Am I correct in sensing that you are a bit confused about what the definitions are here, and what you want to prove, and how to write that down?
 
  • #16
Yes, very much so. :\
 

FAQ: How can I prove the law of cosines for vectors in R^2 using lengths and angles?

How is the law of cosines derived?

The law of cosines can be derived from the Pythagorean theorem and the law of sines.

What is the purpose of the law of cosines?

The law of cosines is used to solve triangles with known sides and angles, particularly when the triangle is not a right triangle.

Can the law of cosines be applied to any triangle?

Yes, the law of cosines can be applied to any triangle, regardless of its shape or size.

How is the law of cosines different from the law of sines?

The law of cosines is used to find the length of a side or measure of an angle in a triangle, while the law of sines is used to find the missing angles of a triangle.

Are there any real-life applications of the law of cosines?

Yes, the law of cosines is commonly used in surveying, navigation, and engineering to calculate distances and angles.

Similar threads

Replies
1
Views
2K
Replies
2
Views
1K
Replies
8
Views
2K
Replies
6
Views
5K
Replies
6
Views
1K
Replies
24
Views
4K
Back
Top