Definition in Terms of Vector Magnitudes and Angles
The dot product of two vectors and is defined in terms of the vector magnitudes and as well as the angle between the vectors .
Definition of a Dot Product
This definition holds for vectors in any number of dimensions. Since and are positive, the sign of depends on the angle according to the following table.
| Sign of | Angle between and |
|---|---|
| acute () | |
| right () | |
| obtuse () |
Practice Problems
Problem 1
Let and be vectors in the -plane with magnitudes and angles measured counterclockwise from the positive -axis. The magnitude of is , and its angle is . The magnitude of is , and its angle is . Determine .
Solution 1
The angle between the two vectors is Hence (precalc students are often expected to recall this value from memory but it can also be found with a calculator). So, the dot product is
Problem 2
Fill in the multiplication table below for dot products between the 3D unit vectors and
Solution 2
Recall that and that and are all mutually perpendicular (meaning that they each have an angle of with each other). We can compute each dot product in the following fashion.
- etc.
This results in the table of values shown below.
Computation in Terms of Components
The dot product can also be very conveniently computed in terms of the two-dimensional components of and according to the following theorem.
Theorem: Computing a Dot Product in Terms of Vector Components (2D)
Why?
Let and be vectors with angles and defined with respect to the axis in the conventional manner as shown in the diagram below.
Note that from this we have the traditional formulas for the components of and
Based on the picture, we can see that the angle between the vectors is related to and through This allows us to rewrite in terms of the components of and by means of the cosine of a difference formula (see step marked ).
Practice Problems
Problem 1
Find the value of for which is perpendicular to the vector .
Solution 1
We know the dot product of perpendicular vectors vanishes. This can be used to set up an equation which can be solved for
Problem 2
Find all the numbers for which is perpendicular to the vector .
Solution 2
We know the dot product of perpendicular vectors vanishes. This can be used to set up an equation which can be solved for
Problem 3
For and , calculate the cosine of the angle between the two vectors.
Solution 3
Problem 4
Find the 2D vectors of magnitude perpendicular to . (Don’t worry about rationalizing denominators.)
Solution 4
Since the dot products of perpendicular vectors vanish, we want to find a vector such that . This yields the following equation, which is the equation of a line in the plane that passes through the origin.
We want to have magnitude , or in other words so
which is the equation of the circle in the plane centered at the origin with radius . From the equation of the line, we get , which can be substituted into the equation of the circle in order to find .
The corresponding components are given by .
The final result is thus as follows.
Problem 5
Consider the vectors and
(a) Determine if the angle between these two vectors is acute, right, or obtuse.
(b) State a 3D vector that is perpendicular to both
Solution 5
(a) Since
which is a positive value, we must have that the angle between these two vectors is
(b) We now seek a vector that is perpendicular to both and . The dot product with both and hence must vanish.
So, we need to state any vector that satisfies both of these equations. In order to do this, let’s eliminate one of the variables. For our purposes here, we will eliminate From the first equation, we have and substituting this into the second equation gives the following, which I simplified by solving for
Hence, and so any vector of the form
will work (you can pick any nonzero value of that you’d like and if you plug it into the above it will be perpendicular to both and ). As an example, pick , we get , but of course there are an infinite number of solutions, so yours may not match.
How can I check if my answer is correct? Does your answer satisfy and ? If so, then your example works!
Formula in three dimensions
The dot product can be computed in terms of the three-dimensional components of and
Theorem: Computing a Dot Product in Terms of Vector Components (3D)
Notice how elegantly this extends the two-dimensional formula into three dimensions. One of the big reasons why dot products have been established as their own object is due to the simplicity that is associated with their computation despite having nontrivial tie to the original vectors still given by
Practice Problem
Problem
Show that if , then .
Solution
Recalling that denotes the unit vector pointing in the direction, we know that According to the theorem,
Properties of Dot Products
Properties of Dot Products
Let and be arbitrary vectors and be any constant. Then, the commutative, distributive, and assosciative properties of dot products hold as described in the table below.
Property Details Commutative Property Distributive Property Assosciative Property
Computing Projections with Dot Products
The projection of on , denoted is the component of in the direction of .

The projection of a vector on a second vector , denoted as , can be found through a dot product by means of the following formula.
Projection of Vector on Vector .
Why?
If is the angle between and then . The direction of is the same as . The unit vector that points in the direction of is From this, we can construct the formula for .
Practice Problems
Problem 1
Compute if and
Solution 1
First, compute and .
Use these results to compute the projection vector.
Problem 2
Show that if , and neither or are the zero vector, then is perpendicular to .
Solution 2 Method 1
Based on the definition of , we have that This means that can be included in a vector diagram with and as follows.
From this diagram, it is clear that
Solution 2 Method 2
Let’s compute and expand using the formula for
Since and neither nor themselves have a magnitude of zero, we must have that .
Computing the Angle Between Vectors with Dot Products
From the definition given at the beginning of the article, one can rearrange the formula to solve for the angle between the two vectors and
Angle Between Two Vectors
This formula works for any two vectors and for which the dot product and magnitudes are known.
Practice Problem
Problem 1
Find the angle between the 2D vectors and
Solution 1
The angle can be found by means of the given formula and a calculator.
Problem 2
Find the angle between the 3D vectors and
Solution 2
The angle can be found by means of the given formula and a calculator.

