The dot product measures how much two vectors point the same way. It gives the work done by a force (W = F · d), tests perpendicularity (a · b = 0) and finds angles between directions.
How to use the Dot Product Calculator
- Vector type
- a: x
- a: y
- a: z
- b: x
- b: y
- b: z
Results update as you type, and everything is calculated in your browser.
How it works
Corresponding components are multiplied and added. Dividing by the product of the magnitudes gives cos α, from which the angle follows.
Inputs explained
| Field | What to enter |
|---|---|
| Vector type | Choose one: 2D, 3D |
| a: x | A number |
| a: y | A number |
| a: z | A number |
| b: x | A number |
| b: y | A number |
| b: z | A number |
Example values
How the main result changes when a: x changes and everything else stays at the example values above:
| a: x | a · b |
|---|---|
| 0.5 | 10 |
| 0.75 | 11 |
| 1 | 12 |
| 1.25 | 13 |
| 1.5 | 14 |
| 2 | 16 |
Formula
a · b = a_x b_x + a_y b_y + a_z b_z = |a||b| cos α
Worked example
Inputs: Vector type: 3D; a – x: 1; a – y: 2; a – z: 3; b – x: 4; b – y: -5; b – z: 6.
Results: a · b = 12; |a| = 3.74165739; |b| = 8.77496439; Angle α between the vectors = 68.5624 °.
Key terms
- Dot product
- The scalar product of two vectors.
Frequently asked questions
What does a dot product of zero mean?
The vectors are perpendicular (orthogonal).
Is the dot product a vector?
No, it is a scalar (a single number).
Is a · b = b · a?
Yes, the dot product is commutative.
How do I find the angle?
cos α = (a · b)/(|a||b|).