The dot product is one of the basic operations used with vectors. It appears in mathematics, physics, engineering, computer science, and other subjects that work with direction and magnitude. If you are learning vectors for the first time, the dot product can seem confusing because multiplying two vectors does not give another vector. Instead, it gives a single number called a scalar.
The dot product can be used to multiply vectors, find the angle between them, check whether two vectors are perpendicular, and find the part of one vector that points in the direction of another. It also has practical uses, such as calculating work done by a force in physics.
What Is a Dot Product?
The dot product is an operation that takes two vectors and produces a scalar value. It is also called the scalar product. The name comes from the dot symbol used between two vectors, such as u · v.
Suppose we have two two-dimensional vectors:
u = ⟨u₁, u₂⟩
v = ⟨v₁, v₂⟩
Their dot is found by multiplying the matching components and then adding the results:
u · v = u₁v₁ + u₂v₂
For three-dimensional vectors, the same idea applies:
u = ⟨u₁, u₂, u₃⟩
v = ⟨v₁, v₂, v₃⟩
So:
u · v = u₁v₁ + u₂v₂ + u₃v₃
The result is a number, not a vector. This is the main difference between the dot product and operations such as the cross product.
For example, if u = ⟨2, 3⟩ and v = ⟨4, 5⟩, then:
u · v = (2)(4) + (3)(5)
= 8 + 15
= 23
Therefore, the dot product is 23.
Dot Product Formula
There are two main formulas you should know.
The first formula uses the components of the vectors:
u · v = u₁v₁ + u₂v₂ + u₃v₃
This is usually the easiest method when the coordinates of the vectors are given.
The second formula uses the magnitudes of the vectors and the angle between them:
u · v = |u||v| cos θ
Here, |u| represents the magnitude of vector u, |v| represents the magnitude of vector v, and θ is the angle between the two vectors.
The two formulas describe the same dot from different perspectives. The component formula is useful when you know the vector coordinates. The angle formula is useful when you know the magnitudes and the angle.
For example, if two vectors have magnitudes 5 and 4 and the angle between them is 60 degrees:
u · v = (5)(4)cos 60°
= 20 × 0.5
= 10
So the dot product is 10.
How to Calculate the Dot Product
Calculating a dot product from vector components involves three basic actions: match the components, multiply them, and add the products.
Consider:
a = ⟨3, 2⟩
b = ⟨5, 4⟩
Start by multiplying the first components:
3 × 5 = 15
Then multiply the second components:
2 × 4 = 8
Now add them:
15 + 8 = 23
Therefore:
a · b = 23
For three-dimensional vectors, the process is the same. Consider:
a = ⟨2, 1, 3⟩
b = ⟨4, 5, 2⟩
Calculate:
a · b = (2)(4) + (1)(5) + (3)(2)
= 8 + 5 + 6
= 19
The most common mistake is multiplying components that do not correspond. The first component should be multiplied by the first component, the second by the second, and so on.
Dot Product and the Angle Between Two Vectors
The dot product can help you find the angle between two nonzero vectors. Start with:
u · v = |u||v|cos θ
Rearrange the equation:
cos θ = (u · v) / (|u||v|)
Then use the inverse cosine function:
θ = cos⁻¹[(u · v) / (|u||v|)]
For example, take:
u = ⟨1, 2⟩
v = ⟨2, 1⟩
First calculate the dot product:
u · v = (1)(2) + (2)(1) = 4
The magnitudes are:
|u| = √(1² + 2²) = √5
|v| = √(2² + 1²) = √5
Therefore:
cos θ = 4 / (√5 × √5)
= 4/5
The angle is:
θ = cos⁻¹(4/5)
This gives an angle of about 36.87°. The product therefore gives a direct way to connect vector coordinates with the angle between vectors.
What Does the Dot Product Tell You?
The sign of a dot product gives useful information about the relationship between two nonzero vectors.
If the dot is positive, the angle between the vectors is less than 90 degrees. The vectors generally point in similar directions.
If the product is zero, the vectors are perpendicular, meaning the angle between them is 90 degrees.
If the dot product is negative, the angle is greater than 90 degrees and less than or equal to 180 degrees. The vectors point generally in opposite directions.
For example:
a = ⟨1, 0⟩
b = ⟨0, 1⟩
Their dot product is:
a · b = (1)(0) + (0)(1) = 0
Because the result is zero, these two nonzero vectors are perpendicular. This gives a quick mathematical test for perpendicular vectors.
Properties of the Dot Product
The dot product follows several important rules.
The first is the commutative property:
u · v = v · u
Changing the order does not change the result.
The dot is also distributive:
u · (v + w) = u · v + u · w
This means a vector can be dotted with each part of a vector sum separately.
Another useful rule involves scalar multiplication:
c(u · v) = (cu) · v = u · (cv)
Here, c is a scalar.
A vector dotted with itself gives the square of its magnitude:
v · v = |v|²
For example, if:
v = ⟨3, 4⟩
then:
v · v = 3² + 4² = 25
The magnitude of v is 5, so:
|v|² = 5² = 25
These properties are useful when simplifying vector expressions and solving larger mathematical problems.
Dot Product vs Cross Product
The dot product and cross product are both ways to combine two vectors, but their results and uses are different.
The dot product produces a scalar. For example:
u · v = 12
The answer is simply a number.
The cross product produces a vector. It is written as:
u × v
The resulting vector has a direction related to both original vectors.
The dot product is commonly used for finding angles, checking perpendicularity, projections, and calculating work. The cross product is used in areas such as rotational motion and torque.
A simple way to remember the difference is:
Dot product → scalar
Cross product → vector
Applications of the Dot Product
The dot product is not limited to classroom exercises. It has several practical uses.
In physics, work is calculated using the dot product of force and displacement:
W = F · s
or:
W = |F||s|cos θ
This matters because only the part of the force acting along the direction of displacement contributes to the work.

The dot product is also used to find vector projections. A projection describes how much of one vector lies in the direction of another vector. This idea appears in geometry, physics, engineering, and computer graphics.
In computer science and machine learning, vectors are used to represent data. Dot products can then be used in calculations involving vector similarity, linear models, and other mathematical operations.
Students also encounter the dot product when working with angles, coordinate systems, planes, and vector equations.
Common Dot Product Mistakes
One common mistake is adding the vector components instead of multiplying corresponding components first. For ⟨a, b⟩ · ⟨c, d⟩, the calculation is ac + bd, not a + b + c + d.
Another mistake is assuming that the dot product produces a vector. It does not. The standard dot product of two vectors produces a scalar.
Students also sometimes confuse the dot product with the cross product. Checking the symbol can help: · represents the dot product, while × is commonly used for the cross product.
When finding an angle, remember that the vectors must be nonzero because their magnitudes appear in the denominator.
Finally, a zero dot product between two nonzero vectors means they are perpendicular. The zero vector is a special case and does not have a defined direction.
Frequently Asked Questions About Dot Product
What is a dot product in simple words?
A dot product is a calculation that combines two vectors and produces a single number. You multiply corresponding components and add the results.
What is the formula for the dot product?
For two three-dimensional vectors, the component formula is u · v = u₁v₁ + u₂v₂ + u₃v₃. The geometric formula is u · v = |u||v|cos θ.
What does a zero dot product mean?
For two nonzero vectors, a zero dot product means the vectors are perpendicular. Their angle is 90 degrees.
Can a dot product be negative?
Yes. A negative dot product means the angle between two nonzero vectors is greater than 90 degrees and less than or equal to 180 degrees.
Is the dot product a scalar or a vector?
The dot product is a scalar. Its result is a single number rather than a vector.
What is the difference between dot product and cross product?
A dot product produces a scalar, while a cross product produces a vector. Their formulas and applications are also different.
How is the dot product used in physics?
One major use is calculating work. Work can be written as the dot product of force and displacement, which accounts for the direction of the applied force.
Conclusion
The dot product is a useful vector operation that produces a scalar value. You can calculate it by multiplying corresponding components and adding the results, or by using the magnitudes of two vectors and the cosine of the angle between them.

