Vector Product Calculator & Tutorial

An interactive guide to understanding and calculating the Dot Product, Cross Product, and angle between two 3D vectors, complete with a live 3D visualizer.

What is a Vector?

In physics and math, a vector is a quantity that has both magnitude (length or size) and direction. Think of it as an arrow pointing from a starting point to an ending point. This is different from a scalar, which only has magnitude (like temperature or speed). Vectors are essential for describing forces, velocity, and displacement in 3D space.

A Vector A

B Vector B

Click & Drag to Rotate | Scroll to Zoom

The 'Aha!' Moment: An Engineering Student's Story

Meet Alex, a first-year engineering student. In physics class, Alex is struggling with the concept of torque. The problem is: "A force vector F = ⟨4, 5, 0⟩ is applied to a wrench at a position vector r = ⟨0.2, 0.1, 0⟩ from the pivot point. What is the torque vector, and what is its magnitude?"

Remembering that torque is the cross product of r and F (τ = r x F), Alex opens the Vector Calculator. By entering Vector A as r = ⟨0.2, 0.1, 0⟩ and Vector B as F = ⟨4, 5, 0⟩, Alex instantly gets the torque vector and its magnitude.

The 3D visualization makes it click: the new green vector (torque) is perpendicular to both the wrench (r) and the force (F), showing exactly how the rotational force is generated. The abstract formula becomes a tangible, visual concept.

Geometric Interpretation of Vector Products

The Dot Product: A Measure of Alignment

The dot product (A · B) tells you how much two vectors point in the same direction. It results in a single number (a scalar).
• If A · B > 0, the vectors point in a similar direction (angle < 90°).
• If A · B = 0, the vectors are perfectly perpendicular (angle = 90°).
• If A · B < 0, the vectors point in opposite directions (angle > 90°).
Our visualization shows this as the projection of vector A onto vector B (the magenta arrow).

The Cross Product: The Perpendicular Vector

The cross product (A x B) creates a new vector that is perpendicular to the plane formed by the original two vectors.
• Its direction is determined by the "Right-Hand Rule".
• Its magnitude `|A x B|` is equal to the area of the parallelogram formed by vectors A and B. This is why if A and B are parallel, their cross product is the zero vector (area is zero).
Our visualization shows this as the green arrow.

Real-World Applications

Physics: Work and Torque

The dot product is used to calculate the work done by a force, which is `Work = F · d`. The cross product is essential for calculating torque (`τ = r x F`), which measures rotational force, and for understanding magnetic fields and angular momentum.

Computer Graphics & Game Dev

The dot product is used to determine lighting angles on 3D models (how much a surface is facing a light source). The cross product is used to calculate surface normals (the direction a surface is facing), which is critical for lighting, reflections, and "back-face culling" to optimize rendering performance.

Engineering & Mechanics

In structural engineering, vector products are used to analyze forces acting on beams and trusses. The dot product can determine the component of a force in a specific direction, while the cross product helps in analyzing the moments and rotational effects on structures.

Formulas in Detail

Dot Product

$$ \vec{A} \cdot \vec{B} = A_x B_x + A_y B_y + A_z B_z $$

Cross Product

$$ \vec{A} \times \vec{B} = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ A_x & A_y & A_z \\ B_x & B_y & B_z \end{vmatrix} $$

Vector Magnitude

$$ |\vec{A}| = \sqrt{A_x^2 + A_y^2 + A_z^2} $$

Angle Between Vectors

$$ \theta = \arccos\left(\frac{\vec{A} \cdot \vec{B}}{|\vec{A}| |\vec{B}|}\right) $$

Frequently Asked Questions

What does the 3D visualization show?

The interactive 3D plot shows your input vectors (A in blue, B in red), the resulting cross product vector (C in green), and the projection of A onto B (magenta). You can click and drag to rotate the view, and use the scroll wheel to zoom. The orange arc visually represents the angle between A and B.

What is the "Right-Hand Rule"?

The direction of the cross product vector (A x B) follows the right-hand rule. If you point your index finger in the direction of vector A and your middle finger in the direction of vector B, your thumb will point in the direction of the cross product.

Why is the dot product a scalar?

The dot product is a projection of one vector onto another, scaled by the magnitude of the second vector. This operation fundamentally results in a measure of "how much" they align, which is a scalar quantity (a single number), not a directional one.