Enter 2D or 3D vector components to instantly compute dot products, cross products, magnitudes, and the angle between vectors, with full step-by-step math.
Vector Operations
A
Vector A
Ax
Ay
Az
B
Vector B
Bx
By
Bz
Results
Scalar Output
Dot Product (A · B)
0
Scalar Output
Angle Between Vectors (theta)
--
Degrees
--
Radians
Scalar Outputs
Magnitudes
|A|
0
·
|B|
0
Euclidean length via Pythagorean theorem
Vector Output
Cross Product (A x B)
⟨0, 0, 0⟩
Show the Work
Dot Product Formula:
Cross Product (3x3 Determinant Expansion):
Magnitude of A:
Magnitude of B:
Angle (theta = arccos( A·B / |A||B| )):
Cross Product Matrix Cheat Sheet
The cross product A x B is found by expanding the 3x3 determinant with i, j, k unit vectors in the first row, A components in the second row, and B components in the third row:
A x B = det(M)
i
j
k
Ax
Ay
Az
Bx
By
Bz
Expanding along the first row: i * (Ay*Bz - Az*By)
- j * (Ax*Bz - Az*Bx)
+ k * (Ax*By - Ay*Bx)
Result: A x B = <(Ay*Bz - Az*By), -(Ax*Bz - Az*Bx), (Ax*By - Ay*Bx)>
Note: Swapping the order gives B x A = -(A x B). In 2D mode this calculator sets z = 0, so the result is a pure z-component vector pointing out of (or into) the xy-plane.
Advertisement
Key Terms Explained
Vector
A quantity with both magnitude and direction, written as ordered components like (x, y, z). Arrows in diagrams represent vectors, with the arrowhead showing direction and the length showing magnitude.
Scalar
A single plain number with no direction, such as temperature, mass, or speed. The dot product of two vectors always produces a scalar.
Dot Product
An operation that multiplies two vectors and returns a scalar. Formula: A · B = Ax*Bx + Ay*By + Az*Bz. It measures how much the two vectors point in the same direction.
Cross Product
An operation that multiplies two vectors and returns a new vector perpendicular to both. It is defined only in 3D space. The magnitude equals |A||B|sin(theta), representing the area of the parallelogram formed by the two vectors.
Magnitude
The length of a vector, calculated using the Pythagorean theorem: |A| = sqrt(Ax^2 + Ay^2 + Az^2). Also called the Euclidean norm or L2 norm.
Orthogonal
Two vectors are orthogonal (perpendicular) when their dot product equals zero. The angle between them is exactly 90 degrees. Orthogonality is the basis of coordinate systems, projection, and the Fourier transform.
Unit Vector
A vector with a magnitude of exactly 1, used to represent a pure direction. You create a unit vector by dividing a vector by its magnitude: u = A / |A|. The standard unit vectors i, j, k point along the x, y, and z axes.
Right-Hand Rule
A mnemonic for the direction of A x B: point the fingers of your right hand toward A, curl them toward B, and your thumb points in the direction of the cross product. Reversing the order (B x A) flips the result to the opposite direction.
Determinant
A scalar value computed from a square matrix that measures scaling and orientation change. The cross product uses a 3x3 determinant with i, j, k unit vectors in the first row to encode the result direction.
Parallel Vectors
Two vectors that point in the same direction (or exactly opposite). Parallel vectors have a cross product of zero because sin(0) = 0 and sin(180) = 0. Their dot product equals the product of their magnitudes (or its negative for anti-parallel).
The Complete Guide to Vector Dot and Cross Products
Vector multiplication is one of the most important operations in physics, engineering, and computer graphics. Unlike regular multiplication, multiplying two vectors has two completely different meanings depending on which product you use. The dot product collapses two vectors into a single number that captures alignment. The cross product converts two vectors into a third vector that captures perpendicularity and rotational effects. Understanding when to use each one is the foundation of classical mechanics, electromagnetism, 3D rendering, and more.
How to Use This Calculator
Select 3D or 2D mode using the toggle at the top. In 2D mode, the z-component fields are hidden and z is assumed to be 0. Enter your vector components in the fields for Vector A and Vector B. Decimals and negative numbers are fully supported. Leave any component blank to treat it as 0.
All results update the instant you type. The hero output boxes show the dot product (amber, scalar), cross product (green, vector), magnitudes, and the angle in both degrees and radians. The "Show the Work" panel below the results rewrites the full intermediate math using your actual numbers, so you can follow every step.
Use the Cross Product Matrix Cheat Sheet card for a quick reference to the determinant layout. This is the same formula used in every linear algebra textbook and is especially useful when doing homework or verifying manual calculations.
Frequently Asked Questions
What is the difference between a dot product and a cross product?
▼
The dot product multiplies two vectors to produce a single number (a scalar). It measures how much one vector points in the direction of another using the formula A · B = Ax*Bx + Ay*By + Az*Bz. A positive result means the vectors lean toward each other; a negative result means they lean away. The cross product multiplies two vectors to produce a new vector perpendicular to both. Its magnitude equals the area of the parallelogram the two vectors span. The dot product is used for projection, work (force times displacement), and computing angles. The cross product is used for torque, magnetic force, surface normals in 3D graphics, and finding vectors perpendicular to a plane.
What does it mean if the dot product of two vectors is zero?
▼
A dot product of zero means the two vectors are orthogonal, which is the formal word for perfectly perpendicular (90 degrees apart). This follows from the formula A · B = |A||B|cos(theta): when theta = 90 degrees, cos(90) = 0, so the entire product is zero regardless of how long the vectors are. Orthogonality is a key concept in linear algebra: it means the two vectors share no component in each other's direction. In physics, zero dot product appears when a force does no work on a moving object, for example when gravity acts perpendicular to horizontal motion.
What does it mean if the cross product of two vectors is zero?
▼
A zero cross product means the two vectors are parallel or anti-parallel, meaning they point in exactly the same direction or exactly opposite directions (0 or 180 degrees apart). This follows from the formula |A x B| = |A||B|sin(theta): sin(0) = 0 and sin(180) = 0. Intuitively, parallel vectors define no unique plane between them, so there is no perpendicular direction to point the cross product. In practice, this appears when a force vector and a lever arm point along the same line, producing zero torque, or when two edges of a triangle are collinear, meaning the triangle has collapsed to a line.
How do you find the angle between two vectors?
▼
Use the formula theta = arccos( (A · B) / (|A| * |B|) ). First compute the dot product A · B. Then divide by the product of the magnitudes to normalize the value to the range -1 to 1. Finally apply arccos to get the angle in radians. Multiply by (180 / pi) to convert to degrees. This formula always returns the angle between 0 and 180 degrees (the smaller of the two possible angles between the vectors). The calculation is undefined if either vector is the zero vector (zero magnitude), since division by zero is not defined. This calculator shows "undefined" in those cases.
What is the Right-Hand Rule and how is it used?
▼
The Right-Hand Rule is a physical memory technique for determining the direction of a cross product without computing the full formula. Point the fingers of your right hand in the direction of Vector A, then curl them toward Vector B (through the smaller angle). Your extended thumb points in the direction of A x B. If you reverse the order and compute B x A, the direction flips to opposite your thumb. The Right-Hand Rule appears constantly in physics: the magnetic force on a moving charge is F = q(v x B), the torque of a wrench is tau = r x F, and angular velocity follows a right-hand curl around the rotation axis. Any time a cross product appears in an equation, the Right-Hand Rule tells you which way the result points before you do any arithmetic.