Worked examples
Grade 12: a = (3, 4), b = (4, 3)
a·b = 24, |a| = |b| = 5, cos θ = 24/25, θ ≈ 16.3°
Grade 12: a = (1, 2, 2), b = (2, −1, 2)
a·b = 4, |a| = |b| = 3, cos θ = 4/9, cross product (6, 2, −5)
Grade 12: a = (1, 2), b = (2, −1)
a·b = 0, so perpendicular
How to use it
- First choose plane or space.
- Enter the x, y (and z) components of vectors a and b; negatives and fractions are fine.
- Read the dot product, magnitudes, angle, sum, difference and cross product.
What this calculates
A vector has a magnitude and a direction. For components (x, y, z) the magnitude is √(x² + y² + z²). The dot product a·b multiplies matching components and adds them, and a·b = |a||b|cos θ gives the angle θ; a dot product of 0 means perpendicular. In 3D the cross product a × b is a vector perpendicular to both, and its length equals the area of the parallelogram the two vectors span. It is taught in the plane and space vectors unit of upper secondary school.
The formulas
- Magnitude |a| = √(x² + y² + z²)
- Dot product a·b = a₁b₁ + a₂b₂ + a₃b₃ = |a||b|cos θ
- Angle cos θ = a·b ÷ (|a||b|)
- Cross product (3D) a × b = (a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁)
- Perpendicular and parallel perpendicular: a·b = 0, parallel: a × b = 0
Reference table
| Vectors | Result | |
|---|---|---|
| (3, 4), (4, 3) | 24 | 5 |
| (1, 2), (2, 1) | 4 | √5 |
| (2, 0), (0, 3) | 0 | 2 |
| (1, 1), (-1, 1) | 0 | √2 |
| (5, 12), (1, 0) | 5 | 13 |
Good to know
- For distance between points and section points, use the Space Coordinates Calculator.
- For the determinant behind the cross product, see the Matrix Determinant Calculator.
Sources
Frequently asked questions
Does a cross product exist in 2D?
In the plane only the z component remains, a single number a₁b₂ − a₂b₁, the signed area of the parallelogram the vectors span.
Does a zero dot product always mean perpendicular?
Yes if neither vector is the zero vector. If one is zero the angle is undefined even though the dot product is 0.
What if the angle is 0° or 180°?
The vectors are parallel, pointing the same way (0°) or opposite ways (180°); the cross product is 0.
What does a negative dot product mean?
The angle is larger than 90° (obtuse).
Can components be decimals?
Yes. Decimals and fractions are converted to exact fractions.
Are my numbers stored?
No. Everything is calculated in your browser and nothing is sent to a server or saved.
Last updated 2026-12-02 · For reference only; not investment, tax or legal advice.