The product of two scalar quantities is a scalar, and the product of a scalar with a vector is a vector, but what about the product of two vectors? Is it a scalar, or another vector? The answer is, it could be either!
There are two ways to multiply vectors together. One is by taking their dot product, which yields a scalar, and the other is by taking their cross product, which yields another vector. Which product to use depends on the particular scenario and what quantity you are trying to find.
The dot product is sometimes referred to as the scalar product or inner product. Geometrically, you can think of the dot product between two vectors as a way of multiplying the vector values that only counts the same-direction contributions.
- Note: Dot products may be negative or positive, but that sign is not an indication of direction. Although in one dimension, vector direction is often indicated with sign, scalar quantities can also have signs associated with them that are not direction indicators. Debt is just one of many examples of this.
Definition of the Dot Product
The dot product of vectors a = (ax, ay) and b = (bx, by) in a standard Cartesian coordinate system is defined as follows:
When you take the dot product of a vector with itself, an interesting relationship emerges:
Where |a| is the magnitude (length) of a by the Pythagorean theorem.
Another dot product formula can be derived using the law of cosines. This is done as follows:
Consider non zero vectors a and b together with their difference vector a - b. Arrange the three vectors to form a triangle.
The law of cosines from trigonometry tells us that:
And using the definition of the dot product we get:
Setting both expressions equal and then simplifying, we get:
This formulation allows for our geometric intuition to come into play. The quantity |a|cos(θ) is the magnitude of the projection of vector a onto vector b.
So we can think of the dot product as the projection of one vector onto the other, and then the product of their values. In other words, it can be seen as the product of one vector with the amount of the other vector in the same direction as itself.
Properties of the Dot Product
The following are several properties of the dot product that you might find useful:
This is because cos(0) = 1.
This is because cos(180) = -1.
This is because cos(90) = 0.
- Note: For 0 <
< 90, the dot product will be positive, and for 90 <
< 180, the dot product will be negative.
This follows from applying the commutative law to the dot product definition.
How to Find the Dot Product
Example 1: In physics, work done by a force F on an object as it undergoes displacement d, is defined as:
Where θ is the angle between the force vector and the displacement vector.
The amount of work done by a force is an indication of how much that force contributed to the displacement. If the force is in the same direction as the displacement (cos(θ) = 0), it makes its maximum contribution. If it is perpendicular to the displacement (cos(Ѳ) = 90), it makes no contribution at all. And if it is opposite the displacement, (cos(θ) = 180), it makes a negative contribution.
Suppose a child pushes a toy train across a track by applying a force of 5 N at an angle of 25 degrees with respect to the line of the track. How much work does the child do on the train when she moves it 0.5 m?
Using the dot product definition of work, and plugging in values we then get:
From this concrete example, it should be even clearer that applying a force perpendicular to the direction of displacement does no work. If the child pushed the train at a right angle to the track the train will not move either forward or backwards along the track. It is also intuitive that the work done by the child on the train will increase as the angle decreases and the force and displacement are closer to alignment.
Example 2: Power is another example of a physical quantity that can be calculated using a dot product. In physics, power equals work divided by time, but it can also be written as the dot product of force and velocity as shown:
Where v is velocity.
Consider the previous example of the child playing with the train. If instead we are told the same force is applied causing the train to move at 2 m/s down the track, then the we can use the dot product to find the power:
Example 3: Another example where dot products are used in physics is in the case of magnetic flux. Magnetic flux is the amount of magnetic field passing through a given area. It is found as the dot product of the magnetic field B with the area A. (The direction of an area vector is normal, or perpendicular, to the surface of the area.)
Suppose a field of 0.02 Tesla passes through a wire loop of radius 10 cm, making an angle of 30 degrees with the normal. What is the flux?
When this flux changes, either by changing the field value, changing the loop area or changing the angle by rotating the loop or field source, current will be induced in the loop, generating electricity!
Again note how the angle is relevant in an intuitive way. If the angle was 90 degrees, this would mean the field would lie along the same plane as the area and no field lines would pass through the loop, resulting in no flux. The amount of flux then increases the closer the angle between the field and the normal gets to 0. The dot product allows us to determine how much of the field is in the direction normal to the surface, and is hence contributing to the flux.
Vector Projection and the Dot Product
In earlier sections, it was mentioned that the dot product can be thought of as a way of projecting one vector onto another and then multiplying their magnitudes. As such, it shouldn't be surprising that a formula for vector projection can be derived from the dot product.
In order to project vector a onto vector b, we take the dot product of a with a unit vector in the direction of b, and then multiply this scalar result by the same unit vector.
A unit vector is a vector of length 1 that lies in a particular direction. The unit vector in direction of vector b is simply vector b divided by its magnitude:
So this projection is then:
The Dot Product in Higher Dimension
Just as vectors exist in higher dimension, so too does the dot product. Imagine the example of the child pushing the train again. Suppose she pushes both downwards and at an angle to the side of the track. In a standard coordinate system, the force and displacement vectors would need to be represented as three-dimensional.
In n dimensions, the dot product is defined as follows:
All of the same dot product properties from before still apply, and the law of cosines once again gives the relationship:
Where the magnitude of each vector is found via the following, again consistent with the Pythagorean theorem:
How to Find the Dot Product in Three Dimensions
Example 1: The dot product is particularly useful when needing to find the angle between two vectors. For example, suppose we want to determine the angle between a = (2, 3, 2) and b = (1, 4, 0). Even if you sketch those two vectors in 3-space, it can be very difficult to wrap your head around the geometry. But the mathematics is fairly straightforward, using the fact that:
Then computing the dot product of a and b:
And computing the magnitudes of each vector:
And finally plugging everything in, we get:
Example 2: A positive charge sits at the coordinate point (3, 5, 4) in three-dimensional space. At what point along the line pointing in the direction of vector a = (6, 9, 5) is the electric field the greatest?
Solution: From our knowledge of how electric field strength relates to distance, we know that the point on the line that is closest to the positive charge is the location where the field will be the strongest. From our knowledge of dot products, we might guess that using the projection formula makes sense here. That formula should give us a vector whose tip is exactly at the point we are looking for.
We need to compute:
To do so, first, lets find |a|2:
Then the dot product:
Dividing this by |a|2 gives 83/142 = 0.585. Then multiplying this scalar by a gives:
Hence the point along the line where the field is the strongest is (3.51, 5.27, 2.93).
About the Author
Gayle Towell is a freelance writer and editor living in Oregon. She earned masters degrees in both mathematics and physics from the University of Oregon after completing a double major at Smith College, and has spent over a decade teaching these subjects to college students. Also a prolific writer of fiction, and founder of Microfiction Monday Magazine, you can learn more about Gayle at gtowell.com.