What Is The Scalar Product?
The scalar product of two vectors is an operation that combines them into a single scalar (a number), defined as the product of their magnitudes and the cosine of the angle between them. Because the result is a scalar rather than a vector, it is called the scalar product; because it is written with a dot, $\mathbf{a} \cdot \mathbf{b}$, it is equally called the dot product. The two names mean the same thing.
A quick refresher on the words: a vector is a quantity with both magnitude (length) and direction, like velocity or force. Its magnitude, written $|\mathbf{a}|$, is its length. The angle $\theta$ is the angle between the two vectors when drawn from a common starting point.
This is one of two ways to "multiply" vectors. The other, which produces a vector and measures something quite different, is the cross product — covered separately below and in multiplication of vectors. The scalar product is also treated, with more worked detail, in our dot product article; this page focuses on the scalar framing and the projection idea.
The Two Scalar Product Formulas
There are two equivalent formulas, and knowing when to use each is most of the skill.
Geometric form (magnitudes and angle):
$$\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}|,|\mathbf{b}|\cos\theta$$
Use this when you know the lengths of the vectors and the angle between them.
Component (algebraic) form:
For $\mathbf{a} = \begin{bmatrix} a_1 \ a_2 \ a_3 \end{bmatrix}$ and $\mathbf{b} = \begin{bmatrix} b_1 \ b_2 \ b_3 \end{bmatrix}$,
$$\mathbf{a} \cdot \mathbf{b} = a_1 b_1 + a_2 b_2 + a_3 b_3$$
Use this when you know the components. You multiply matching components and add — that is all.
The two forms always agree, which gives a bonus: set them equal and you can solve for the angle between two vectors:
$$\cos\theta = \frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{a}|,|\mathbf{b}|}$$
Properties of the scalar product
Commutative: $\mathbf{a} \cdot \mathbf{b} = \mathbf{b} \cdot \mathbf{a}$. Order does not matter.
Distributive over addition: $\mathbf{a} \cdot (\mathbf{b} + \mathbf{c}) = \mathbf{a} \cdot \mathbf{b} + \mathbf{a} \cdot \mathbf{c}$.
Scalar multiplication: $(k\mathbf{a}) \cdot \mathbf{b} = k(\mathbf{a} \cdot \mathbf{b})$ for any number $k$.
Orthogonality test: $\mathbf{a} \cdot \mathbf{b} = 0$ exactly when the vectors are perpendicular (since $\cos 90° = 0$). This is the single most-used property in practice.
How Does The Scalar Product Differ From The Cross Product?
This is the disambiguation students most need. The two products answer different questions:
Scalar (dot) product | Cross (vector) product | |
|---|---|---|
Result | A scalar (number) | A vector |
Formula | $\mathbf{a} \cdot \mathbf{b} = \lvert\mathbf{a}\rvert\lvert\mathbf{b}\rvert\cos\theta$ | $\lvert\mathbf{a} \times \mathbf{b}\rvert = \lvert\mathbf{a}\rvert\lvert\mathbf{b}\rvert\sin\theta$ |
Measures | How aligned two vectors are | The area they span, and a perpendicular direction |
Zero when | Vectors are perpendicular | Vectors are parallel |
Symbol | dot $\cdot$ | cross $\times$ |
The scalar product uses cosine and peaks when vectors point the same way; the cross product uses sine and peaks when they are perpendicular. They are near-opposites in that sense. The cross product gets its own full treatment in the cross product of two vectors article.
Examples of the Scalar Product
Six problems, easier to harder, switching between the two formulas as the given information dictates.
Example 1
Find $\mathbf{a} \cdot \mathbf{b}$ for $\mathbf{a} = \begin{bmatrix} 2 \ 3 \end{bmatrix}$ and $\mathbf{b} = \begin{bmatrix} 4 \ 1 \end{bmatrix}$.
Multiply matching components and add:
$\mathbf{a} \cdot \mathbf{b} = (2)(4) + (3)(1) = 8 + 3 = 11$
Final answer: $11$.
Example 2
Two vectors have magnitudes $|\mathbf{a}| = 5$ and $|\mathbf{b}| = 4$ with a $90°$ angle between them. Find $\mathbf{a} \cdot \mathbf{b}$.
A natural first move is to multiply the magnitudes: $5 \times 4 = 20$.
Why that is wrong. That ignores the angle entirely. The scalar product is $|\mathbf{a}||\mathbf{b}|\cos\theta$, and $\cos 90° = 0$, so the angle does the deciding work here.
The correct method.
$\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}||\mathbf{b}|\cos\theta = 5 \times 4 \times \cos 90°$
$= 5 \times 4 \times 0 = 0$
Final answer: $0$. A zero scalar product means the vectors are perpendicular — the magnitudes never even mattered.
Example 3
Find the scalar product of $\mathbf{a} = \begin{bmatrix} 1 \ -2 \ 3 \end{bmatrix}$ and $\mathbf{b} = \begin{bmatrix} 4 \ 0 \ -1 \end{bmatrix}$.
Multiply matching components, keeping signs:
$\mathbf{a} \cdot \mathbf{b} = (1)(4) + (-2)(0) + (3)(-1)$
$= 4 + 0 - 3 = 1$
Final answer: $1$.
Example 4
Vectors of magnitude $6$ and $8$ meet at a $60°$ angle. Find their scalar product.
Use the geometric form with $\cos 60° = \dfrac{1}{2}$:
$\mathbf{a} \cdot \mathbf{b} = 6 \times 8 \times \cos 60°$
$= 48 \times \frac{1}{2} = 24$
Final answer: $24$.
Example 5
Find the angle between $\mathbf{a} = \begin{bmatrix} 1 \ 0 \end{bmatrix}$ and $\mathbf{b} = \begin{bmatrix} 1 \ 1 \end{bmatrix}$.
First the scalar product: $\mathbf{a} \cdot \mathbf{b} = (1)(1) + (0)(1) = 1$.
Then the magnitudes: $|\mathbf{a}| = 1$ and $|\mathbf{b}| = \sqrt{1^2 + 1^2} = \sqrt{2}$.
Now solve for the angle:
$\cos\theta = \frac{\mathbf{a} \cdot \mathbf{b}}{|\mathbf{a}||\mathbf{b}|} = \frac{1}{1 \times \sqrt{2}} = \frac{1}{\sqrt{2}}$
So $\theta = 45°$.
Final answer: $45°$.
Example 6
A force $\mathbf{F} = \begin{bmatrix} 10 \ 5 \end{bmatrix}$ newtons moves an object along displacement $\mathbf{d} = \begin{bmatrix} 3 \ 0 \end{bmatrix}$ metres. Find the work done.
Work is the scalar product of force and displacement, $W = \mathbf{F} \cdot \mathbf{d}$:
$W = (10)(3) + (5)(0) = 30 + 0 = 30$
Final answer: $30$ joules. The sideways component of the force ($5$) does no work, because the object moves only horizontally — which is precisely what the scalar product captures.
Where the scalar product earns its keep
The scalar product exists because "how much do these two directions agree?" turns out to be one of the most useful questions in applied math.
Work in physics: Work equals force dotted with displacement. Push at an angle and only the aligned part counts — the scalar product extracts exactly that part.
Computer graphics and lighting: A surface looks bright when its normal vector aligns with the light direction; the scalar product of the two decides the shading, pixel by pixel.
Machine learning and search: "Cosine similarity" — how similar two documents or data points are — is a scalar product of their feature vectors, normalised. It is how search engines and recommendation systems measure closeness.
The vector notation that makes all this clean was developed largely by J. Willard Gibbs (1839–1903, USA), who shaped modern vector analysis. The enduring value of the scalar product is that it answers an alignment question with a single, easy-to-compute number.
Common Mistakes With the Scalar Product
Mistake 1: Expecting a vector as the answer
Where it slips in: Right after the operation. The memorizer who learned "multiply the vectors" expects a vector back.
Don't do this: Report $\mathbf{a} \cdot \mathbf{b} = \begin{bmatrix} 8 \ 3 \end{bmatrix}$ from Example 1.
The correct way: The scalar product is a scalar, a single number, $11$ — the clue is in the name. If your answer has components, you have computed something else. The confusion that fixes this: the scalar (dot) product gives a number; the cross product gives a vector. Keep those two outcomes apart and the rest follows.
Mistake 2: Forgetting the angle in the geometric form
Where it slips in: Using magnitudes without the cosine factor. The rusher multiplies the lengths and stops.
Don't do this: For magnitudes $5$ and $4$, write $\mathbf{a} \cdot \mathbf{b} = 20$ regardless of angle.
The correct way: $\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}||\mathbf{b}|\cos\theta$. The $\cos\theta$ is not optional — it is what makes the product zero for perpendicular vectors and largest for aligned ones. Always ask "what is the angle?" before reporting a geometric-form answer.
Mistake 3: Dropping signs in the component form
Where it slips in: Negative components. The second-guesser changes a sign, then changes it back.
Don't do this: For $(-2)(0) + (3)(-1)$, write $0 + 3 = 3$, losing the minus.
The correct way: $(-2)(0) + (3)(-1) = 0 - 3 = -3$. Carry every sign through the multiplication and the addition. A scalar product can be negative — that just means the vectors point partly opposite each other, the angle being obtuse. This is the same input-discipline that, at industrial scale, mattered when one mishandled quantity doomed NASA's Mars Climate Orbiter in 1999.
Conclusion
The scalar product (dot product) of two vectors returns a single number, not a vector.
Two equal formulas: $\mathbf{a} \cdot \mathbf{b} = |\mathbf{a}||\mathbf{b}|\cos\theta$ (geometric) and $a_1b_1 + a_2b_2 + a_3b_3$ (component).
A zero scalar product means the vectors are perpendicular; a negative one means an obtuse angle.
It differs from the cross product, which returns a vector and uses sine instead of cosine.
It powers work in physics, lighting in graphics, and similarity in machine learning.
Practice These to Solidify Your Understanding
Work through each, then revisit the linked section if you stall.
Find the scalar product of $\begin{bmatrix} 3 \ -1 \ 2 \end{bmatrix}$ and $\begin{bmatrix} 1 \ 4 \ -2 \end{bmatrix}$. (Revisit Example 3 and Mistake 3.)
Two vectors of magnitude $7$ and $2$ meet at $60°$. Find their scalar product. (Revisit Example 4.)
Find the angle between $\begin{bmatrix} 2 \ 0 \end{bmatrix}$ and $\begin{bmatrix} 0 \ 5 \end{bmatrix}$. (Revisit Example 5 and the orthogonality property.)
To work through more vector problems with a teacher, explore Bhanzu's algebra tutor or browse math classes online. Want a live Bhanzu trainer to walk through more scalar-product problems? Book a free demo class.
Read More
Vector equation — describing lines and planes with vectors.
Projection vector — the projection idea the scalar product computes, in full.
Matrices and determinants — the broader linear-algebra toolkit vectors live in.
Multiplication of matrices — how the row-times-column rule echoes the dot product.
Was this article helpful?
Your feedback helps us write better content