Question:

Can someone explain Dot Product to me?

by  |  earlier

0 LIKES UnLike

I don't understand the concept of dot product. Can someone explain it to me? I have A=( 3, 2, 1) and B= (1, 0, 1). What is their dot product and what is the angle between the two vectors?

 Tags:

   Report

3 ANSWERS


  1. The simple conceptual idea of a dot product is that it is a way to multiply two vectors together when they are pointed in the same direction.  For example, we normally think of Work as being Force x Distance.  But if we are talking about vectors, we have to make sure Force and Distance are going in the same direction.

    For example, if a toy car is rolling on a flat surface and you push straight down on it, the car doesn't gain energy because you weren't pushing it in the direction it was moving.  If you push it from behind, it _will_ gain energy, though.

    So if Force and Distance are vectors, you see you can't just take their magnitudes and multiply them together.  You have to take their magnitudes and multiply them together, then throw a fudge factor in based on their difference in direction.  In other words, if |F| means the magnitude of a vector F, |F| * |D| would give you the work done only if F and D were pointed in the exact same direction.  If F and D were pointed perpendicular to each other, the work done would have to be zero.

    Of course, you see what I'm getting at.  If Θ = the angle between F and D, then

    Work = |F| * |D| * cos Θ

    See?  Then if Θ = 0, the work would just be the |F| * |D| like normal.  but if Θ = 90 deg, then Work = 0.  If Θ is somewhere in between, the amount |F| * |D| is reduced by an appropriate amount.

    I hope this conceptual gives you an idea of how the Dot Product is a way to multiply two vectors together--just multiply their magnitudes, and that's your answer if they happen to be pointed in the same direction.  If they point in different directions, the number is reduced by the right amount, and if they are perpendicular, the number is reduced to zero.  So in general

    A dot B = |A| * |B| * cos Θ

    Now, since vectors are typically given in a (x,y,z) format, this makes it harder to apply the math above.  Fortunately, we have Pythagoras to help us out, since

    |A| = sqr (x^2 + y^2 + z^2)

    And using trigonometry, we could figure out the angle Θ between A and B, but fortunately there is another way that gives us the same answer, namely

    A = (x,y,z)

    B = (a,b,c)

    A dot B = ax + by + cz

    Even better, we can use both these methods to easily determine the angle Θ

    A = (3,2,1)

    B = (1,0,1)

    A dot B = 3*1 + 2*0 + 1*1 = 4

    since |A| = sqr(3^2 + 2^2 + 1^2) = sqr(14)

    and |B| = sqr(1 ^2 + 0^2 + 1^2) = sqr(2)

    then |A| * |B| = 5.29

    and |A| * |B| * cos Θ = A dot B = 4

    and cos Θ = 4/5.29 = 0.756

    and Θ = 0.714 or about 41 degrees


  2. Note: ^ means there is an exponent (example 2^2 means 2 squared), and sqrt means take the square root.

    The dot product will be A*B= |A| |B| cosθ which than becomes

    cosθ = (A*B) / (|A||B|)

    To get A*B you simply take Ax*Bx+Ay*By+Az+Bz

    which means you have (3)(1)+(2)(0)+(1)(1) which is 3+0+1 which is 4.

    To get |A| you take sqrt(Ax^2+Ay^2+Az^2) which is  sqrt(3^2+2^2+1^2) which is then sqrt(9+4+1) which is sqrt(14)

    To get |B| you take sqrt(Bx^2+By^2+Bz^2) which is sqrt(1^2+0^2+1^2) which is sqrt(1+0+1) which is sqrt(2)

    So, you know have cosθ = (4)/ (sqrt(14) * sqrt (2))

    This means that θ = cos-1((4)/ (sqrt(14) * sqrt (2)))

    θ= 40.89 degrees.

    Note: The dot product can also be used to find parallel and perpendicular components of a vector.


  3. The dot product of two vectors (which may also be called inner product or scalar product) is defined in the following way:

    A = (a1, a2, a3)

    B = (b1, b2, b3)

    A·B = a1×b1 + a2×b2 + a3×b3

    So in your case:

    A·B = 3×1 + 2×0 + 1×1 = 4

    For some reasons beyond the scope of this answer, the angle between two vectors is related to the dot product.

    A·B = |A| |B| cos α

    Where |A| is the length of the vector A and α is the angle between A and B.

    So you can get the angle this way:

    α = acos (A·B / (|A|·|B|))

    So in your example:

    |A| = √(3² + 2² + 1²) = √14

    |B| = √2

    α = acos ( 4 / √28 ) ≈ 40.9°

Question Stats

Latest activity: earlier.
This question has 3 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions