Home›Math›Dot vs Cross Product

Dot Product vs Cross Product: What Is the Difference?

The dot product multiplies two vectors into a single number that measures alignment. The cross product multiplies two vectors into a third vector, perpendicular to both, whose length measures the area they span. This guide works both, side by side, with the angle, the torque, and the worked examples that separate them.

14 min readUpdated October 2026Cross Product Calculator

Two vectors can be multiplied in two ways, and the two multiplications answer different questions. The dot product answers: how much do these vectors point in the same direction? It returns a single number, positive when the vectors broadly agree, zero when they are perpendicular, negative when they broadly oppose. The cross product answers: what vector stands at right angles to both of these, and how large is the area they span together? It returns a vector, perpendicular to both inputs, whose length is the area of the parallelogram they form. Confusing the two is the most common error in vector arithmetic, and it is easy to make, because both are called products, both take two vectors, and both involve the angle between them. This guide keeps them apart, works each one by hand, and shows where each is used, so the right product is chosen before the arithmetic starts.

Key takeaways
  • The dot product is a scalar: multiply matching components and add. It equals the product of the lengths times the cosine of the angle between the vectors, and it is zero exactly when the vectors are perpendicular.
  • The cross product is a vector: its components come from the determinant pattern, its direction follows the right-hand rule, and its length equals the product of the lengths times the sine of the angle, which is the area of the parallelogram the vectors span.
  • The cross product exists in three dimensions. In two dimensions, the corresponding quantity is a single number, the z-component, which gives the signed area of the parallelogram. The dot product works in any number of dimensions.

The dot product: alignment as a number

The dot product of two vectors a and b, written a dot b, is the sum of the products of their matching components: the x components multiplied together, plus the y components multiplied together, plus the z components multiplied together, in three dimensions, and the same pattern in any number of dimensions. For a equal to 3, 4, 0 and b equal to 4, 3, 0, the dot product is 3 times 4 plus 4 times 3 plus 0 times 0, which is 12 plus 12, which is 24. The result is a single number, a scalar, with no direction attached. It is sometimes called the scalar product, for exactly that reason: the output is a scalar, even though the inputs are vectors.

Geometrically, the dot product equals the product of the lengths of the two vectors, multiplied by the cosine of the angle between them. The cosine is 1 when the angle is zero and the vectors point the same way, 0 when the angle is a right angle, and negative 1 when the vectors point in opposite directions, so the dot product is largest positive when the vectors agree, zero when they are perpendicular, and largest negative when they oppose. That is the sense in which the dot product measures alignment: it is the length of one vector times the projection of the other onto it, the shadow one vector casts on the other. A large dot product means strong agreement. A dot product of zero means no agreement at all, in the precise sense of perpendicularity.

The dot product is commutative: a dot b equals b dot a, because multiplication of matching components commutes and addition commutes. It is also the test for perpendicularity used throughout mathematics and physics: two non-zero vectors are perpendicular exactly when their dot product is zero. The hub calculator uses that test to prove its cross product result is perpendicular, by dotting the result against both parent vectors and showing zero in each case. The dot product appears wherever a projection is needed: the work done by a force, the component of a velocity along a direction, the similarity of two lists of numbers, and the angle between two vectors, which the next sections develop.

The cross product: a perpendicular vector

The cross product of two vectors a and b, written a cross b, is a vector, not a number, and it is defined only in three dimensions. Its components follow the determinant pattern: the x component is a-y times b-z minus a-z times b-y, the y component is a-z times b-x minus a-x times b-z, and the z component is a-x times b-y minus a-y times b-x. The y component is the one that breaks the pattern, with the subtraction reversed, and it is the most common source of sign errors, which the hub guide treats sign by sign in its determinant section. The pattern is worth memorising as a cyclic order: x from y and z, y from z and x, z from x and y, with the middle term always subtracted in the reversed order.

The direction of the cross product is perpendicular to both input vectors, and its sense follows the right-hand rule: point the fingers of the right hand from a toward b through the smaller angle, and the thumb points in the direction of a cross b. Reversing the order reverses the direction: b cross a equals negative a cross b. The cross product is anticommutative, the opposite of the dot product, and the order of the inputs is part of the answer, not a convenience. Its length equals the product of the lengths of the two vectors, multiplied by the sine of the angle between them. The sine is 0 when the vectors are parallel, so parallel vectors have a zero cross product, and 1 when they are perpendicular, so perpendicular vectors give the largest cross product for their lengths.

The length has a geometric meaning: it is the area of the parallelogram with the two vectors as adjacent sides. Two vectors of lengths 5 and 10 at right angles span a parallelogram of area 50, and their cross product has length 50. The same two vectors at a small angle span a thin parallelogram of small area, and the cross product is correspondingly short. The direction has a geometric meaning too: the cross product is the normal vector to the plane the two vectors span, and the unit vector in that direction, the cross product divided by its length, is the surface normal used in graphics, physics, and engineering. The hub calculator reports that unit vector alongside the cross product, because the direction, with the length divided out, is often the quantity actually needed.

Worked example: one pair, both products

Take a equal to 2, 3, 4 and b equal to 5, 6, 7, and work both products by hand. The dot product is 2 times 5 plus 3 times 6 plus 4 times 7, which is 10 plus 18 plus 28, which is 56. The cross product components are: x equals 3 times 7 minus 4 times 6, which is 21 minus 24, which is negative 3; y equals 4 times 5 minus 2 times 7, which is 20 minus 14, which is 6; z equals 2 times 6 minus 3 times 5, which is 12 minus 15, which is negative 3. The cross product is the vector negative 3, 6, negative 3. The two results sit side by side: a number, 56, and a vector, negative 3, 6, negative 3, and they answer different questions about the same pair.

Check the cross product by dotting it against both parents, which must give zero if it is truly perpendicular. Dotting negative 3, 6, negative 3 against a, 2, 3, 4, gives negative 6 plus 18 minus 12, which is 0. Dotting it against b, 5, 6, 7, gives negative 15 plus 36 minus 21, which is 0. Both checks pass, and the hub calculator performs exactly these checks, calling them the perpendicular proof. Check the length as well: the length of the cross product is the square root of 9 plus 36 plus 9, which is the square root of 54, about 7.35. The lengths of a and b are about 5.39 and 10.49, and their product is about 56.5, so the sine of the angle is about 7.35 divided by 56.5, about 0.13, and the angle is small, about 7.5 degrees, consistent with a dot product of 56 that is close to the product of the lengths. The two products agree about the geometry, from opposite sides.

One pair of vectors, both products, checked against each other.

QuantityFormulaThis exampleMeaning
Dot productSum of matching component products56Alignment: strongly positive, small angle
Cross productDeterminant pattern(-3, 6, -3)Perpendicular vector, length about 7.35
Cross product lengthProduct of lengths times sine of angleAbout 7.35Area of the parallelogram spanned
AngleCosine from dot, sine from crossAbout 7.5 degreesMeasured two independent ways

The angle, measured two ways

The angle between two vectors can be found from either product, and the two routes check each other. From the dot product, the cosine of the angle equals the dot product divided by the product of the lengths. From the cross product, the sine of the angle equals the length of the cross product divided by the product of the lengths. The cosine route is the more commonly used, and it is the one the hub calculator leads with, but it is less accurate for small angles, where the cosine changes slowly, and the sine route is less accurate near a right angle, where the sine changes slowly. Using both, as the hub calculator does by measuring the angle two ways, gives a result that is accurate across the whole range, and a disagreement between the two routes signals an arithmetic error in one of the products.

The angle is always taken as the smaller angle between the vectors, from 0 to 180 degrees, and it is unsigned: the angle from a to b is the same as the angle from b to a. The sign information that the angle discards lives in the cross product direction, which reverses when the order reverses. That division of labour is the cleanest way to remember the two products: the dot product carries the cosine and the alignment, the cross product carries the sine and the orientation, and together they carry the full relationship between the vectors. Neither alone carries all of it, which is why problems that need the angle and the orientation need both products, and why the hub calculator reports both.

Geometry: area, volume, and the unit vector

The area reading of the cross product extends naturally. The area of the parallelogram spanned by a and b is the length of a cross b. The area of the triangle spanned by the same two vectors, with a common vertex, is half of that, because a triangle is half a parallelogram on the same base and height. The volume of the parallelepiped spanned by three vectors a, b, and c is the absolute value of the scalar triple product, a dot the cross product of b and c, which is the area of the base parallelogram times the height in the normal direction. Work one: a equal to 1, 2, 3, b equal to 4, 0, 1, and c equal to 2, 1, 0. The cross product of b and c is negative 1, 2, 4, and dotting with a gives negative 1 plus 4 plus 12, which is 15, so the parallelepiped volume is 15 cubic units. A triple product of zero means the three vectors lie in one plane, and the volume collapses, which is the flatness test, just as a dot product of zero is the perpendicularity test.

The unit vector of the cross product, the cross product divided by its length, is the direction of the normal with the length removed, and it is the quantity used wherever only the orientation matters. In computer graphics, the normal decides how a surface is lit, and the unit normal is computed from the cross product of two edge vectors of each polygon. In physics, the normal decides the direction of a magnetic force or a torque axis. The unit vector is undefined when the cross product is zero, which happens exactly when the input vectors are parallel, because parallel vectors span no plane and have no unique normal. That edge case is not an error in the calculator. It is the geometry speaking: no plane, no normal.

Physics: work, torque, and turning

Work is the dot product in physics. The work done by a constant force F moving an object through a displacement d is F dot d, the component of the force along the displacement times the distance moved. A force perpendicular to the motion does no work, because its dot product with the displacement is zero, which is why a magnetic force, always perpendicular to the velocity, does no work on a charged particle, and why carrying a weight horizontally at constant speed does no work against gravity. A force aligned with the motion does maximum work. The dot product is the right product because work is a scalar: it has a size, positive or negative, and no direction, and only the aligned component contributes.

Torque is the cross product in physics. The torque of a force F applied at a position r from a pivot is r cross F, a vector along the axis of rotation, whose length is the turning effect and whose direction, by the right-hand rule, is the axis the rotation follows. A force applied along the line through the pivot gives no torque, because r and F are parallel and their cross product is zero, which is why pushing directly toward a door hinge does not turn the door. A force applied perpendicular to the lever arm gives maximum torque. The hub torque mode reads the same product as turning, and it is the same mathematics as the geometric cross product, with force and position in place of abstract vectors. Angular momentum follows the same pattern: r cross the linear momentum, a vector along the rotation axis, conserved when no torque acts.

The two products also divide the electromagnetic force. The electric force on a charge is a scalar multiple of the field, a matter of alignment and magnitude, while the magnetic force is a cross product of velocity and field, perpendicular to both, which is why magnetic forces curve paths instead of speeding particles up. The pattern is general: dot products extract the parallel part and produce scalars, cross products extract the perpendicular part and produce vectors, and a physical quantity that is a scalar comes from a dot product while a quantity that is an axial vector comes from a cross product. Choosing the product is choosing the kind of quantity the answer must be, and the kind of quantity decides the product, not the other way round.

Mistakes: order, sign, and dimension

The first mistake is order: treating the cross product as commutative. Reversing the inputs reverses the result, so a cross b and b cross a point in opposite directions, and a torque or a normal computed in the wrong order points the wrong way, with consequences for the sign of every quantity built on it. The dot product has no such trap: order does not matter, and the check is free. The second mistake is the y-component sign in the determinant pattern, the one subtraction that runs in the opposite direction. Work the pattern cyclically, check by dotting the result against both parents, and the sign error announces itself as a non-zero dot product where zero is required.

The third mistake is dimension: applying the cross product to two-dimensional vectors as if it returned a two-dimensional vector. In two dimensions, the cross product analogue is a single number, the z-component, a-x times b-y minus a-y times b-x, which is the signed area of the parallelogram, positive for a counterclockwise turn from a to b and negative for a clockwise turn. The hub calculator offers a 2D mode that reports exactly that number. The fourth mistake is confusing the cross product with two other uses of the word cross: the Cartesian product of two sets, which pairs every element of one set with every element of the other, and cross-multiplication of fractions, which is an arithmetic technique for comparing or solving proportions. Both are legitimate mathematics, and neither is the vector cross product. Name the product, check the dimension, and the confusion resolves.

Frequently asked questions

What is the dot product of two vectors?

The dot product is the sum of the products of matching components: for a equal to 2, 3, 4 and b equal to 5, 6, 7, it is 10 plus 18 plus 28, which is 56. Geometrically it equals the product of the lengths times the cosine of the angle between the vectors. It is a single number, a scalar, and it is zero exactly when the vectors are perpendicular.

What is the cross product of two vectors?

The cross product is a vector perpendicular to both inputs, computed by the determinant pattern, with length equal to the product of the lengths times the sine of the angle between them. For a equal to 2, 3, 4 and b equal to 5, 6, 7, it is the vector negative 3, 6, negative 3. Its length is the area of the parallelogram the vectors span, and its direction follows the right-hand rule.

What is the difference between dot product and cross product?

The dot product returns a scalar measuring alignment, is commutative, works in any dimension, and is zero for perpendicular vectors. The cross product returns a vector perpendicular to both inputs, is anticommutative, exists only in three dimensions, and is zero for parallel vectors. The dot product carries the cosine of the angle, the cross product carries the sine, and together they describe the full relationship.

How do you find the magnitude of a cross product?

The magnitude equals the product of the lengths of the two vectors times the sine of the angle between them, which is also the area of the parallelogram they span. From components, it is the square root of the sum of the squares of the three cross product components. For the worked example, the square root of 54, about 7.35. Dividing the cross product by its magnitude gives the unit normal vector.

What is the cross product of two unit vectors?

The cross product of two unit vectors is a vector perpendicular to both, with length equal to the sine of the angle between them, so its length is at most 1, reached when the vectors are perpendicular, and 0 when they are parallel. The standard basis vectors satisfy i cross j equals k, j cross k equals i, and k cross i equals j, with the reverse orders giving the negatives, which is the cyclic pattern the determinant formula encodes.

Can you take the cross product in 2D?

In two dimensions the cross product analogue is a single number, a-x times b-y minus a-y times b-x, which is the signed area of the parallelogram spanned by the two vectors. It is positive when the turn from the first vector to the second is counterclockwise and negative when clockwise. The full vector cross product, with three components, requires three dimensions, and the 2D number is its z-component.

Try it on the calculator

Enter your two vectors on the calculator and read the dot product, the cross product, and the angle together. The perpendicular checks prove the cross product; the two angle routes prove each other.

Open the Cross Product Calculator →
Related guides

Similar Posts