# Lesson Explainer: The Scalar Product of Two Vectors Physics

In this explainer, we will learn how to calculate the scalar product of two vectors using both the components of the vectors and the magnitudes of the two vectors and the angle between them.

The scalar product is an operation that can be applied to two vectors to produce a scalar.

Recall that while a vector has both a magnitude and a direction, a scalar just has a magnitude.

The scalar product is used in many different areas of physics. One calculation that it can be useful for is calculating the work done by a force on an object as that object moves by a certain displacement.

Consider a person pushing a box across the floor, as shown in the diagram below.

The force applied to the box is , and it moves by a displacement . The force acts in the same direction as the displacement. In this scenario, the work done by the force, , is simply equal to the magnitude of the force, , multiplied by the magnitude of the displacement, :

But what if the force did not act in the same direction as the displacement (perhaps because the person pushing the box also pushes slightly down on it), as shown in the diagram below?

In this scenario, we cannot use to calculate the work done by the force. Instead, we have to calculate the scalar product of and .

The scalar product is notated with a central dot between the two vectors:

Because of this, the scalar product is also called the dot product. It is also sometimes called the inner product.

There are two ways of defining the scalar product of two vectors. The first is the geometric approach.

### Definition: The Scalar Product of Two Vectors

Consider two vectors, and . The angle between the two vectors is . This is shown in the diagram below.

The scalar product of and is equal to the magnitude of multiplied by the magnitude of multiplied by the cosine of the angle between them, , which we can write as

Writing two straight lines on either side of a vector symbol, for example, , means taking the magnitude of the vector. We can write this definition in a simpler way if we just say that is the magnitude of and is the magnitude of :

We can think of this as being a measure of both how large the two vectors are and how much they point in the same direction. If either or is larger, the scalar product will be larger, and we can see how the scalar product varies with , the angle between the vectors, by looking at a graph of , which is shown below.

When is , is 1, which is the highest value the cosine function produces. So, when the two vectors point in the same direction, as shown in the diagram below, their scalar product is at its maximum value.

When is , is 0. So, when the two vectors are at a right angle to each other, as shown below, their scalar product is zero.

When is , is , which is the lowest value the cosine function produces. So, when the two vectors point in the opposite direction, as shown below, the scalar product has a value that is the same size as when is , but with a negative sign.

So, the smaller the angle between the vectors, the higher the value of the scalar product, and the larger the angle between the vectors, the lower the value of the scalar product.

Notice as well that since , , which means that . In other words, it does not matter which way around we do the scalar product; and produce the same value.

Let’s have a look at an example question.

### Example 1: Calculating the Scalar Product of Two Vectors from Their Magnitudes and the Angle between Them

Consider two vectors: with a magnitude of 12 and with a magnitude of 26. The angle between them, , is . What is the scalar product of and ? Give your answer to the nearest integer.

Since we are given the magnitudes of the two vectors, as well as the angle between them, we can use the formula to find the scalar product.

Substituting in the values, we get which to the nearest integer is 117.

This geometric approach is useful if we happen to know the magnitudes of the two vectors and the angle between them, but we may instead know the horizontal and vertical components of the two vectors. In this case, we can use the second way of defining the scalar product, which is the algebraic approach.

### Definition: The Scalar Product of Two Vectors

Let’s say that where and are the horizontal and vertical components of , and and are the horizontal and vertical components of . The scalar product of and is then given by

In other words, we multiply the -components of the vectors together and the -components of the vectors together and then sum the two numbers.

Notice again that it does not matter which way around we do the scalar product. Since and ,

So .

Let’s have a look at some example questions where we have to use this approach.

### Example 2: Calculating the Scalar Product of Two Vectors Given in Component Form

Consider two vectors and . Calculate .

Since we are given the two vectors in component form, we can use to find the scalar product. Let’s substitute in the values:

The scalar product of and is 24.

### Example 3: Calculating the Scalar Product of Two Vectors Given in Component Form

A constant force of acts on an object, causing it to move. After an amount of time, the displacement of the object from its initial position is . Calculate .

Since we are given the two vectors in component form, we can use to find the scalar product. Let’s substitute in the values:

The scalar product of and is 13 N⋅m. This is actually equal to the work done by the force on the object, and the units of newton-meters are equivalent to joules, so the answer is also 13 J.

### Example 4: Calculating the scalScalar Product of Two Vectors Shown on a Grid

The diagram shows two vectors, and . Each of the grid squares in the diagram has a side length of 1. Calculate .

Since the two vectors have been drawn on a grid, we can work out what their components are. Vector has a horizontal length of 3 grid squares and a vertical length of 3 grid squares, so we can write it as . Vector has a horizontal length of 6 grid squares, and a vertical length of 1 grid square, so we can write it as .

We can now use to find the scalar product. Let’s substitute in the values:

The scalar product of and is 21.

### Example 5: Calculating the Scalar Product of Two Vectors Shown on a Grid

The diagram shows two vectors, and . Each of the grid squares in the diagram has a side length of 1. Calculate .

There are two ways of reaching the answer to this question. The first is to calculate the scalar product from the components of the vectors.

Since the two vectors have been drawn on a grid, we can work out what their components are. Vector has a horizontal length of 5 grid squares and a vertical length of 0 grid squares, so we can write it as . Vector has a horizontal length of 0 grid squares and a vertical length of 4 grid squares, so we can write it as .

We can now use to find the scalar product. Let’s substitute in the values:

The scalar product of and is 0.

But a faster way of reaching the answer would be to recall that, for two vectors that are perpendicular, their scalar product is always zero. We can see from the diagram that these two vectors are perpendicular—vector points along the -axis and vector points along the -axis—so their scalar product is zero.

At first glance, it does not look like these two different methods of calculating the scalar product would produce the same result, but they actually do. Let’s apply both methods to the same example to show that they produce the same result.

The diagram below shows two vectors.

In component form, we can write as and as . We can now use the algebraic method to work out the scalar product:

We can use Pythagoras’s theorem to work out the lengths of the two vectors. Doing this, we find that the length of is exactly 17 and the length of is exactly 13. The angle between the vectors is . Let’s round this to for now. We can now use the geometric method to work out the scalar product:

Notice how this is not exactly 171—that is because we chose to round the value we had for . Doing so makes the number easier to use on a calculator but reduces the accuracy of the result. If we use the exact value for the angle in our calculation, the answer does come out as exactly 171. Alternatively, we could simply round the answer we get using , which rounds to 171.

### Key Points

• The scalar product is an operation that can be applied to two vectors to produce a scalar.
• The scalar product is also called the dot product or the inner product.
• If we know the length of each vector and the angle between them, we can use to find the scalar product.
• If we know the components of each vector, we can use to find the scalar product.