If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Vector dot product and vector length

Definitions of the vector dot product and vector length. Created by Sal Khan.

## Want to join the conversation?

• i still don't understand exactly, what IS a vector????
• More generally, a vector is just a collection of values. If the vector contains 3 values then we say that it's dimension is 3. In physics and geometry/trigonometry we talk about vectors having a magnitude and direction but you can also use vectors to hold other kinds of values. For example, if you were analyzing financial data, a vector might hold several characteristics of a company (e.g. Market Value, Number of Employees, Last Year Income, Last Year Profit, Number of years in business). See this video in the series:

starting at time to see the formal definition of a vector.
• How do you take the dot product of three vectors?
• You can't. When you take a dot product, it converts two vectors into a scalar. Attempting another dot product after that is impossible, because you would be trying to dot a scalar with a vector, which violates the definition of the dot product.
• is there any relation between the dot product of two vectors and cosine the angle between them?
• a · b = ‖a‖‖b‖cosθ so solving for the cosine of the angle θ:

cosθ = (a · b) / ‖a‖‖b‖

If a and b are unit vectors then the denominator simplifies to 1, therefore cosθ = a · b.
• Why is the dot product a•b = a1b1+a2b2+...+anbn?
Is it just randomly difined as such or is there a proof that it has to be this?
• I prefer to think of the dot product as a way to figure out the angle between two vectors.
If the two vectors form an angle A then you can add an angle B below the lowest vector, then use that angle as a help to write the vectors' x-and y-lengts in terms of sine and cosine of A and B, and the vectors' absolute values.
If you do that then you will end up with the equation a·b = |a|·|b|·cos(A).
• How do I find the component of a vector in a certain direction using dot product?
• This is where projections come in. If you have a vector a that you want to project onto a direction given by vector b, you use (a · b)b/(b · b) [that is a dot b over b dot b all multiplied by b]. Note that b · b is the square length of b, so we can write (a · b)b/b², or some might prefer the notation (a · b)b/||b||².

Later on in the Linear Algebra playlist, Sal goes through projections. I can't recommend this MIT lecture highly enough for projections though: http://www.youtube.com/watch?v=Y_Ac6KiQ1t0
• How is it possible for two quantities with direction to have a product that does not have one? If we take two vectors and multiply them using both dot and cross methods then will the solutions vary? Or should we use dot and cross products for different situations? If so, how do we figure out?
• You shouldn't think of the dot and cross product as "multiplication". Taking a dot product is taking a vector, projecting it onto another vector and taking the length of the resulting vector as a result of the operation. Simply by this definition it's clear that we are taking in two vectors and performing an operation on them that results in a scalar quantity.
We could have defined an operation that takes in two vectors and returns `true` if they are perpendicular, `false` otherwise. Then you'd have an operation that takes in two vectors and results in a boolean value. My point being that you can take any parameter types and return any desired type independently. I don't see how the types are related!
• What can you use the dot product for?
• One application is detecting orthogonality/perpendicularity of vectors if the dot product is zero.

If you divide the dot product by the lengths of the vectors, you're left with the cosine of the angle between the vectors, so the arc cosine of this will be the angle.
• This in no way explains what the dot product is. It gives you a number, sure, great, but what does that number mean? I looked it up elsewhere and am leaving this comment: The dot product of two vectors a and b, is equal to the product of the following three terms, (the length of a) squared, (the length of b) squared, and cosine theta. Where theta represents the angle between a and b. If you have 2 vectors, you could use the dot product to determine the angle between them.
• That definition is in this video, and he actually derived it on one of the other videos using the law of cosines.
(1 vote)
• Can you reduce the problem to the A-vector in the brakets squared, equal to simple A-vector ^2