Dot product vs cross product: formulas, geometry and differences
The dot product multiplies two vectors to yield a single number, measuring how parallel they are. The cross product multiplies two 3D vectors to yield a new perpendicular vector, measuring how orthogonal they are.
The short answer: use the dot product when you need a scalar that measures alignment, projection, or work. Use the cross product when you need a directed vector perpendicular to a plane, such as torque, angular momentum, or surface normals.
Core differences at a glance
Both operations take two vector inputs, but their mathematical structures, dimensional constraints, and geometric outputs differ completely.
Algebraic formulas and component calculations
When coordinates are known, both operations can be computed directly without finding angles first.
Geometric meaning: projection versus swept area
The dot product answers how much one vector travels along another. The cross product answers what area two vectors enclose and which direction stands perpendicular to both.
Dot product as directional projection
Dividing the dot product by the magnitude of vector b yields the scalar projection of a onto b. If the vectors point in the same general direction, the value is positive; if they face away, it is negative; if they form a right angle, the projection vanishes.
Cross product as parallelogram area and surface normal
The magnitude of the cross product equals the area of the parallelogram formed by the two vectors. Its direction points normal to that surface, determined by pointing the fingers of your right hand along a and curling them toward b.
The 2D pseudo-cross product
Strictly speaking, the cross product is undefined in two dimensions because there is no third axis for the output vector. Planar geometry computes the scalar term
a_x b_y - a_y b_x, which represents the signed area spanned by the two-dimensional vectors.
Why physics uses each product
Physical laws dictate which product applies based on whether the resulting quantity is a directional vector or a directionless scalar.
Work and energy (dot product)
Work measures energy transferred along a path. Because force applied perpendicular to motion produces no displacement in that direction, only the parallel component matters. The line integral of force dotted with displacement computes total mechanical work.
Torque and rotational motion (cross product)
Pushing directly outward along a door does not make it swing. Turning requires force applied at an angle to the lever arm. The cross product captures both the rotational leverage and the axis around which the hinge turns.
Magnetic force on a charge (cross product)
A charged particle moving parallel to a magnetic field experiences zero magnetic deflection. When it crosses field lines, the resulting Lorentz force acts perpendicular to both its velocity vector and the magnetic field.
Typesetting vector products in LaTeX and Typst
Both systems provide standard mathematical operators and matrix layouts for clean notation.
LaTeX dot product
Use
\cdotfor the multiplication dot. Avoid using\bulletor.in math mode, which produce incorrect sizing and vertical alignment.\[ \vec{a} \cdot \vec{b} = |\vec{a}| |\vec{b}| \cos\theta = a_x b_x + a_y b_y + a_z b_z \]LaTeX cross product and determinant
Use
\timesfor the cross operator. Determinant representations use thevmatrixenvironment from the amsmath package.\[ \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} \]Typst vector operations
Typst uses dot for scalar multiplication and times for vector products. Matrices use the built-in mat function with pipe delimiters.
$ vec(a) dot vec(b) = |vec(a)| |vec(b)| cos(theta) $ $ vec(a) times vec(b) = mat(delim: "|", hat(i), hat(j), hat(k); a_x, a_y, a_z; b_x, b_y, b_z ) $
Questions
Can you take the cross product of 2D vectors?
Not directly as a standard vector operation, because the true cross product is defined in three-dimensional space where an orthogonal axis exists. You can embed 2D vectors into 3D by adding a zero z-component, which produces a vector pointing purely along the z-axis, or use the 2D perp-dot product to get a signed scalar area.
Why is the dot product of perpendicular vectors zero?
The geometric formula depends on the cosine of the included angle. When two vectors are perpendicular, the angle between them is 90 degrees, and the cosine of 90 degrees is zero. Neither vector projects any magnitude along the other.
Why does changing order reverse the sign in a cross product?
Try your own paper in Texeno.
Start free, upload a project as a .zip and press Recompile. Upgrade when you need longer compiles.
Start writing