Vectors are a Class 12 chapter and the language of mechanics and electromagnetism. Enter two vectors to get their dot and cross products, magnitudes, the angle between them and the projection.
Enter the components of vector a.
Enter the components of vector b.
Read the products and angle.
Dot: a·b = a₁b₁ + a₂b₂ + a₃b₃
Angle: cos θ = a·b ÷ (|a||b|)
A vector has both size and direction, like a force, a velocity or a displacement. This calculator takes two three-dimensional vectors a and b, entered as their x, y and z components, and returns the dot product, the cross product, both magnitudes, the angle between them, the scalar projection of a on b, and the area of the parallelogram they span.
Vectors are a full chapter in Class 12 mathematics and the everyday language of physics and engineering. Work done is a dot product of force and displacement. Torque and magnetic force are cross products. Computer graphics, robotics and navigation software perform these operations millions of times a second. For 2D problems, enter 0 as the z component.
1. Write both vectors in component form, a = (a₁, a₂, a₃) and b = (b₁, b₂, b₃).
2. Dot product: a·b = a₁b₁ + a₂b₂ + a₃b₃.
3. Magnitudes: |a| = √(a₁² + a₂² + a₃²), and the same for b.
4. Angle: cos θ = a·b ÷ (|a||b|), then θ = cos⁻¹ of that value.
5. Cross product: a × b = (a₂b₃ − a₃b₂, a₃b₁ − a₁b₃, a₁b₂ − a₂b₁), the expansion of the determinant with rows (i, j, k), a and b.
6. Projection of a on b: a·b ÷ |b|. Parallelogram area: |a × b|.
Geometrically, a·b = |a||b| cos θ. The component formula a₁b₁ + a₂b₂ + a₃b₃ gives the same number, which follows from applying the cosine rule to the triangle formed by a, b and a − b. The dot product is a single number, not a vector. It is positive when the angle is acute, zero when the vectors are perpendicular, and negative when obtuse. In physics, work equals force dot displacement, so only the component of force along the motion does work.
The cross product a × b is a vector perpendicular to both a and b, pointing in the direction given by the right-hand rule: curl the fingers from a to b and the thumb points along a × b. Its length is |a||b| sin θ, which equals the area of the parallelogram with sides a and b; half of it is the area of the triangle. Order matters: b × a = −(a × b). Parallel vectors have a zero cross product, which gives a quick test for collinearity.
The scalar projection a·b ÷ |b| is the length of the shadow a casts on the line of b, with a minus sign if a points partly backward. Multiplying it by the unit vector b ÷ |b| gives the vector projection. All of these need |b| to be non-zero. If either vector is the zero vector, the angle is undefined, because a zero vector has no direction, and the calculator shows a dash rather than a number. Rounding can push cos θ slightly beyond ±1, so the calculator clamps it before taking the inverse cosine.
A force of (4, 2, 1) newtons moves a block through a displacement of (3, 0, 5) metres. Pooja, a first-year engineering student, wants the work done, the angle between force and motion, and the cross product for her mechanics assignment.
Dot product: a·b = 4×3 + 2×0 + 1×5 = 17
Cross product: a×b = (2×5 − 1×0, 1×3 − 4×5, 4×0 − 2×3) = (10, -17, -6)
Magnitudes: |a| = 4.582576, |b| = 5.830952
Angle: cos θ = 17 ÷ (4.5826 × 5.831) = 0.636209 → θ = 50.4903°
Answer: Dot product a·b 17; Cross product a×b (10, -17, -6); Angle between 50.4903°
Swapping the order in the cross product, which reverses its direction.
Forgetting the minus sign on the middle (j) component when expanding the determinant.
Treating the dot product as a vector or the cross product as a number.
Confusing the scalar projection of a on b with the projection of b on a; they divide by different magnitudes.
Leaving out a zero component when entering a vector, which shifts the other components into the wrong places.
Computing work done by a constant force in physics.
Finding torque, angular momentum and magnetic force with cross products.
Class 12 problems on angles between lines, areas of triangles and parallelograms.
Computer graphics, where dot products drive lighting and cross products give surface normals.
Surveying and navigation, resolving displacements and velocities into components.
Can I use 2D vectors?
Yes, enter 0 as the z component.
How do I know if vectors are perpendicular?
Their dot product is zero.