Skip to main content
Mathematics
GEOMETRY · VECTORS

Dot product & cross product

When we pull a box along the floor with a rope held at an angle, only part of the pull acts along the direction of motion. That part is what counts when we calculate the work done by the force, the quantity behind the energy accounts on the pulley page. When a force turns something about a pivot, as on the levers and gears page, a different combination of the same two directions matters: how far from the pivot the force acts, and how much of the force is at right angles to the lever arm. Both situations combine two vectors, but they ask different questions. This page uses vectors and their projections; the vectors and projections page sets these out, and we begin here with the projection.

Both arrows have length and direction, so “multiply them” still leaves a question: what should the answer tell us? Think of one arrow as the sloping rope and the other as the direction the box moves. The part of the first arrow along that direction is its projection. Multiplying that signed length by the other arrow’s length gives the dot product. Turning an arrow lets us check why the result can shrink, reach zero or change sign. For turning effects we need different information; the area enclosed by the arrows will help explain the cross product. Each name belongs to a particular question we want to answer.

01Multiply a signed projection by a length.

An arrow here represents a displacement with a direction, called a vector. For example, (3,4)(3,4) means 3 units right and 4 units up, with length 32+42=5\sqrt{3^2+4^2}=5. Its horizontal component is 3, not its full length of 5. Now use the direction of another arrow uu in place of the horizontal direction and find the component of vv along it. This is the projection we will study. Start with two nonparallel vectors uu and vv. ∣u∣\lvert u\rvert and ∣v∣\lvert v\rvert mean their lengths; θ\theta is the angle between them, from 0° to 180°. Select either projection direction and play.

θuvOPurple segment = signed projection; dashed line is perpendicular.
0%
55°
2.2
1.8

A projection records the component along a chosen direction: drop a perpendicular onto that line. For an acute angle, cosine is adjacent side divided by hypotenuse, so the projected length divided by ∣v∣|v| is cos⁡θ\cos\theta. Multiplying by ∣v∣|v| gives the component. We keep a sign: along the chosen direction is positive; opposite is negative. Thus the signed component is ∣v∣cos⁡θ|v|\cos\theta even for an obtuse angle. Reverse the roles to obtain ∣u∣cos⁡θ|u|\cos\theta.

projected component=∣v∣cos⁡θ\text{projected component}=|v|\cos\theta
∣u∣(∣v∣cos⁡θ)≈2.271|u|(|v|\cos\theta)\approx2.271
Multiply the signed projected component by the length of the vector receiving the projection. The result is one number: a **scalar**.
vv onto uu, then × ∣u∣\times\,\lvert u\rvert1.032×2.2≈2.2711.032\times2.2\approx2.271
uu onto vv, then × ∣v∣\times\,\lvert v\rvert1.262×1.8≈2.2711.262\times1.8\approx2.271
u⋅v=∣u∣(∣v∣cos⁡θ)=∣v∣(∣u∣cos⁡θ)=v⋅uu\cdot v=|u|(|v|\cos\theta)=|v|(|u|\cos\theta)=v\cdot u

Both constructions multiply the same three numbers, so reversing the order gives the same scalar. This operation is the dot product; the centered dot · names the operation.

02A different product: a perpendicular vector.

Now enter three-dimensional space. Two linearly independent vectors are nonparallel; together they determine a plane. The cross product is a vector perpendicular to that plane, with a magnitude equal to their parallelogram area.

Drag the scene to orbit. Teal uu and orange vv lie in the same plane. Purple is the cross product, perpendicular to that plane. Here ∣u∣=2|u|=2 and ∣v∣=1.5|v|=1.5.

Parallelogram area2.598
Cross-product magnitude2.598
60.0°
u×v=∣u∣ ∣v∣sin⁡θ n^u\times v=|u|\,|v|\sin\theta\,\hat n
v×u=−(u×v)v\times u=-(u\times v)

n^\hat n means a unit normal: length 1 and perpendicular to the plane. Multiplying it by ∣u∣∣v∣sin⁡θ\lvert u\rvert \lvert v\rvert \sin \theta gives the cross product its magnitude. Of the two possible normal directions, the right-hand rule selects one.

Two nonparallel vectors span a plane: all combinations of their directions lie in it. The cross product points out of this plane.
Index → uMiddle → vThumb → u×vu \times v

Use your RIGHT hand. Order matters.

This hand demonstrates the 90° example: the index finger follows the first vector, the middle finger the second, and the thumb the cross product. Rotate the hand on screen to inspect the three directions. Swapping the order above rotates the same right hand so its thumb reverses.

For angles strictly between 0° and 180°, use the curl version: curl your right-hand fingers from the first vector towards the second through the smaller angle; your thumb gives the normal direction. The hand indicates direction, not vector magnitude.

θOVH|u| = 2|v| = 1.5h = 1.229STEP 1 / 4 · Drop a perpendicularA = 2.457
0%

Why is the magnitude an area?

Choose u as the base. From the tip of v, draw a line perpendicular to the base. Its foot is H; the vertical distance VH is the height hh.

VH=hVH=h
55°

This construction has its own angle control. Change the angle: the sloping side stays 1.5 long, while its vertical height changes.

03Two different ways to get zero.

Assume both input vectors are nonzero. A zero dot product means perpendicularity; a zero cross product means collinearity.

Dot product: perpendicular

θ=90∘⇒cos⁡θ=0⇒u⋅v=0\theta=90^\circ\Rightarrow \cos\theta=0\Rightarrow u\cdot v=0

Neither vector has a component along the other. The signed projection has zero length.

Cross product: collinear

θ=0∘ or 180∘⇒sin⁡θ=0⇒u×v=0\theta=0^\circ\text{ or }180^\circ\Rightarrow\sin\theta=0\Rightarrow u\times v=\mathbf0

The parallelogram collapses to a line, leaving no area. Same and opposite directions both give the zero vector.

If either input is the zero vector, both products are zero, but the angle of that vector is undefined. This is why the angle-based statements above specify nonzero inputs.

Stop here for now. Component calculations using unit vectors will be introduced in a later lesson.

Sign in to see more

Sign in to continue the rest of this lesson and keep your progress in sync.