Foundation lesson

Dot and cross products

The dot product of two arrows measures how much of one lies along the other, and it gives the part of a field along a boost. The cross product gives an arrow at right angles to both, as long as the area they span, and it gives the direction of the magnetic force on a moving charge.

Written for this edition, not translated from Einstein. Editorial review pending.

How much of one arrow lies along another, and which way does a magnetic force push?

The dot product multiplies two arrows into a single number: a⋅b=axbx+ayby+azbz\mathbf{a}\cdot\mathbf{b} = a_x b_x + a_y b_y + a_z b_z, which also equals the two lengths times the cosine of the angle between them. With an arrow of length 1 along a chosen direction, the dot product is how much of the other arrow lies along that direction: its projection. Arrows at right angles have a dot product of zero.

a⋅b=axbx+ayby+azbz=∣a∣ ∣b∣cos⁡θ\begin{aligned} \mathbf{a}\cdot\mathbf{b} &= a_x b_x + a_y b_y + a_z b_z \\ &= |\mathbf{a}|\,|\mathbf{b}|\cos θ \end{aligned}

a dot b equals a x b x plus a y b y plus a z b z, which equals the length of a times the length of b times the cosine of the angle between them.

For a boost along x, the part of an electric field along the motion is its dot product with an arrow of length 1 along x. A field of 5 units pointing 3 along x and 4 along y has 3 along the boost; that part is the same in both frames, and only the rest changes.

The cross product a×b\mathbf{a}\times\mathbf{b} is an arrow at right angles to both a and b. Its length is the area of the parallelogram they span, the two lengths times the sine of the angle between them, and its direction follows the right-hand rule: curl the fingers of the right hand from a toward b, and the thumb points along the product. Swapping the order reverses the arrow.

F=q v×B\mathbf{F} = q\,\mathbf{v}\times\mathbf{B}

The force F equals q times v cross B.

The magnetic force on a charge q moving with velocity v through a field B is q v×Bq\,\mathbf{v}\times\mathbf{B}. It is at right angles to the motion, so it changes the charge's direction and not its speed. For a positive charge moving along +x through a field along +z, v×B\mathbf{v}\times\mathbf{B} points along −y. In the frame moving with the charge the same push is electric: the relativity paper's §6 gives that frame an electric field along −y.

One combination of the two fields, E⋅B\mathbf{E}\cdot\mathbf{B}, comes out the same in every frame. That is a modern check on the field transformation, useful for catching an error in a calculation. It is not a premise of the 1905 argument, which derives the transformation from the equations of electrodynamics.

Worked example: A projection, a force direction and a quantity that stays put

  1. Projection: E=(3,4,0)\mathbf{E} = (3, 4, 0) and the boost direction (1,0,0)(1, 0, 0) give E⋅(1,0,0)=3\mathbf{E}\cdot(1, 0, 0) = 3, the part along the boost. The field's length is 32+42=5\sqrt{3^2 + 4^2} = 5.
  2. Direction: with v along +x and B along +z, (1,0,0)×(0,0,1)=(0,−1,0)(1, 0, 0)\times(0, 0, 1) = (0, -1, 0), so a positive charge is pushed along −y.
  3. Invariance, measuring fields so that c = 1: take E=(0,0.6,0.8)\mathbf{E} = (0, 0.6, 0.8) and B=(0,0,1)\mathbf{B} = (0, 0, 1), so E⋅B=0.8\mathbf{E}\cdot\mathbf{B} = 0.8.
  4. Seen from a frame moving at 0.6 along x, where γ = 1.25 (the factor 1/√(1 − v²/c²), which the relativity paper prints as β), the §6 rules give E′=(0,0,1)\mathbf{E}' = (0, 0, 1) and B′=(0,0.6,0.8)\mathbf{B}' = (0, 0.6, 0.8). Both fields changed, and E′⋅B′=1×0.8=0.8\mathbf{E}'\cdot\mathbf{B}' = 1 \times 0.8 = 0.8 did not.

Try it: a projection and an area

Arrow a is 4 long along x. Arrow b is 3 long; turn it and watch how much of it lies along a, and how much area the two arrows span.

Type an angle and press Enter, or drag the slider from −180° to 180°. A positive angle turns b counterclockwise from a.

ab

a·b = 4 × 3 × cos 60° = 6. b's projection on a is 1.5: that much of b lies along a.

a × b has size 10.392, the area of the parallelogram, and points out of the page.

What it shows, in words

The dot product 4 × 3 × cos φ measures how much of b lies along a: 6 at 60°, zero at 90°, −12 at 180°. The cross product has size 4 × 3 × sin φ, the area of the parallelogram the arrows span, largest at 90° and zero when they line up. By the right-hand rule it points out of the page when b is counterclockwise from a and into the page when it is clockwise; swapping the order of a and b reverses it. The figure shows a thick, b thinner, the parallelogram with a dashed outline, and a dotted line from b's tip to its projection on a.

Where this lesson stops

The dot product is how much of one arrow lies along another; the cross product is an arrow for the area two arrows span. This lesson stops at three dimensions.

If you came here from a passage, Back returns you to the exact place you left.

All foundation lessons · Read as Markdown