Confused about dot product of a and b = |a||b| if theta = 0

In summary, you are calculating the dot product of two vectors, a and b, but the equation is not equal when the vectors are in the same direction and the angle between them is zero.
  • #1
annamal
387
33
TL;DR Summary
I am not sure what I am doing wrong but dot product of a and b =/= |a||b| when I am trying to calculate it
I am not sure what I am doing wrong but dot product of a and b =/= |a||b| when I am trying to calculate it. Theta = 0:
dot product(a and b) = ax*bx + ay*by
|a||b|= sqrt((ax^2+ay^2)*(ax^2 + by^2)) = sqrt((ax*bx)^2 + (ax*by)^2 + (ay*bx)^2 + (ay*by)^2) =/= ax*bx + ay*by

What am I doing wrong?
 
  • Like
Likes mcastillo356
Mathematics news on Phys.org
  • #2
These aren't supposed to be equal.
$$a\cdot b = ||a|| ||b|| \cos(\theta)$$
Where ##\theta## is the angle between ##a## and ##b##.
 
  • #3
Office_Shredder said:
These aren't supposed to be equal.
$$a\cdot b = ||a|| ||b|| \cos(\theta)$$
Where ##\theta## is the angle between ##a## and ##b##.
I'm not sure I get what you're saying.
a dot b = ||a|| ||b|| with theta = 0
 
  • #4
annamal said:
Summary:: I am not sure what I am doing wrong but dot product of a and b =/= |a||b| when I am trying to calculate it

I am not sure what I am doing wrong but dot product of a and b =/= |a||b| when I am trying to calculate it. Theta = 0:
dot product(a and b) = ax*bx + ay*by
|a||b|= sqrt((ax^2+ay^2)*(ax^2 + by^2)) = sqrt((ax*bx)^2 + (ax*by)^2 + (ay*bx)^2 + (ay*by)^2) =/= ax*bx + ay*by
If theta = 0, a and b are in the same direction, so ax/ay = bx/by.
 
  • Like
Likes annamal
  • #5
The theta referred to in the dot product definition is the angle between the vectors when placed next to each other with the tails touching.

As mentioned in earlier posts, you can’t just pick two vectors and declare that theta is zero unless you know the two vectors are parallel ie point in the same direction.
 
  • Like
Likes PeroK
  • #6
annamal said:
Summary:: I am not sure what I am doing wrong but dot product of a and b =/= |a||b| when I am trying to calculate it

dot product(a and b) = ax*bx + ay*by
There are two definitions for the dot product, assuming ##\vec a = <a_1, a_2>## and ##\vec b = <b_1, b_2>## .
Coordinate definition: ##\vec a \cdot \vec b = a_1b_1 + a_2b_2##
Coordinate-free definition: ##\vec a \cdot \vec b = |\vec a||\vec b|\cos(\theta)##, where ##\theta## is the angle between the two vectors, and ##|\vec a|, |\vec b|## are the magnitudes of the two vectors.
 
  • Like
Likes PeroK
  • #7
Office_Shredder said:
These aren't supposed to be equal.
$$a\cdot b = ||a|| ||b|| \cos(\theta)$$
Where ##\theta## is the angle between ##a## and ##b##.
Did you mean "are supposed to be equal"? The equation above is one of the definitions of the dot product.
 
  • #9
FactChecker said:
It is not a simple proof, even when the vectors are aligned. You can compare your steps to the proof in Case 2 here: https://proofwiki.org/wiki/Cosine_Formula_for_Dot_Product
On second thought, I think it should be simple. Since the theta is 0, one is a constant multiple of the other. Let ##b = ca##. Then
##a\cdot ca = a_xca_x+a_yca_y = c(a_x^2+a_y^2)##.
And ##|a||ca| = c|a|^2 = c(a_x^2+a_y^2)##.
 
Last edited:
  • Like
Likes mfb
  • #11
From post #1:
annamal said:
dot product(a and b) = ax*bx + ay*by
|a||b|= sqrt((ax^2+ay^2)*(ax^2 + by^2)) = sqrt((ax*bx)^2 + (ax*by)^2 + (ay*bx)^2 + (ay*by)^2) =/= ax*bx + ay*by

What am I doing wrong?
For one thing, there are typos in your equation that I don't think others have noticed. Also, it's unclear to me how your vectors are defined. I'm going to guess that ##\vec a = <a_x, a_y>## and ##\vec b = <b_x, b_y>##. If that's the case, then ##| \vec a| = \sqrt{a_x^2 + a_y^2}## and ##| \vec b| = \sqrt{b_x^2 + b_y^2}##.

Your expression |a||b|= sqrt((ax^2+ay^2)*(ax^2 + by^2)) has a typo. The second factor in your square root should be ##b_x^2 + b_y^2##, not ##a_x^2 + b_y^2##. This typo appears again in the equation I quoted.

mcastillo356 said:
I think your doubts come when unit vectors take place, and I think you are not asking about dot product, but vector product in components
I don't think either of the above is true. There's no indication that the vectors involve are unit vectors, nor is there any indication that I see that the vector product (AKA cross product) is intended, especially since the vectors are two-dimensional.
 
  • Like
  • Informative
Likes nasu and mcastillo356
  • #12
I figured it out guys.
|a||b|= sqrt((ax^2+ay^2)*(bx^2 + by^2)) = sqrt((ax*bx)^2 + (ax*by)^2 + (ay*bx)^2 + (ay*by)^2) = ax*bx + ay*by since axaxbyby + ayaybxbx = axaxbyby + (axby/bx)^2*bx^2 = axaxbyby + (axby)^2 = 2axaxbyby due to ay/ax = by/bx
Thanks though.
 
  • #13
If ##\theta =0##, then ##\vec b = \alpha \vec a##, for some ##\alpha > 0##. And$$\vec a \cdot \vec b = \alpha(\vec a \cdot \vec a) =\alpha|\vec a|^2 = |\vec a||\alpha \vec a| = |\vec a||\vec b| $$Where$$\vec a \cdot \vec a = a_x^2 + a_y^2 = |\vec a|^2$$
 
  • Like
Likes SammyS
  • #14
FactChecker said:
It is not a simple proof, even when the vectors are aligned. You can compare your steps to the proof in Case 2 here: https://proofwiki.org/wiki/Cosine_Formula_for_Dot_Product
The second case is poorly written. At a quick glance, case 2 looks like a complete proof, which it is not. At the top of the page it says that it is for vectors that are scalar multiples of each other. Within the case, it says that without loss of generality that they are scalar multiples of each other. It also uses that the vectors are scalar multiples of each other to equate sgn(c) and cosθ by implication.
 
Last edited:
  • #15
caz said:
The second case is poorly written. At a quick glance, case 2 looks like a complete proof, which it is not. At the top of the page it says that it is for vectors that are scalar multiples of each other. Within the case, it says that without loss of generality that they are scalar multiples of each other. It also uses that the vectors are scalar multiples of each other to equate sgn(c) and cosθ.
The OP stipulated that the vectors were at an angle ##\theta=0##. So they are scalar multiples of each other.
 
  • #16
FactChecker said:
The OP stipulated that the vectors were at an angle ##\theta=0##. So they are scalar multiples of each other.
I am talking about the website proof. It is poorly written.
 
  • #17
caz said:
The second case is poorly written. At a quick glance, case 2 looks like a complete proof, which it is not. At the top of the page it says that it is for vectors that are scalar multiples of each other. Within the case, it says that without loss of generality that they are scalar multiples of each other. It also uses that the vectors are scalar multiples of each other to equate sgn(c) and cosθ by implication.
It doesn't say "Proof 2", it says "Case 2", the second case is that the vectors are scalar multiples of each other. So I read it as: Given that the vectors are scalar multiples of each other, wolog let ##v = cw##, where ##c## is some scalar. I thought that was sufficiently well-stated.

EDIT: I guess a good practice would have been to restate what the conditions of Case 2 were at the beginning of Case 2. (Maybe as a sort of header.)
 

FAQ: Confused about dot product of a and b = |a||b| if theta = 0

What is the dot product of two vectors?

The dot product of two vectors is a mathematical operation that results in a single scalar value. It is calculated by multiplying the corresponding components of the two vectors and then adding them together.

How is the dot product related to the magnitude of the vectors?

The dot product of two vectors is equal to the product of their magnitudes if the angle between them is 0 degrees. In other words, if the two vectors are parallel, the dot product is equal to the product of their lengths.

Why is the dot product of two perpendicular vectors equal to 0?

When two vectors are perpendicular, their dot product is equal to 0 because the cosine of the angle between them is 0. This means that there is no component of one vector in the direction of the other, resulting in a dot product of 0.

What is the significance of the dot product in physics?

The dot product is commonly used in physics to calculate work, which is the product of the force applied to an object and the displacement of that object in the direction of the force. It is also used in calculating the angle between two vectors in three-dimensional space.

How is the dot product related to the concept of projection?

The dot product can be used to find the projection of one vector onto another. This means finding the component of one vector in the direction of the other. The dot product is used in this calculation because it takes into account the angle between the two vectors.

Similar threads

Replies
4
Views
5K
Replies
7
Views
1K
Replies
16
Views
4K
Replies
19
Views
2K
Replies
1
Views
1K
Replies
4
Views
2K
Replies
3
Views
2K
Back
Top