Dot Product vs Cross Product: Formulas, Meaning and Examples
Two vectors can be multiplied in two ways. The first gives a number; the second gives a new vector. Both have clear physical meanings: the dot product is used for work and angles, while the cross product is used for torque and area.
Cross: ∣a×b∣=∣a∣∣b∣sinθ → vector perpendicular to both, direction by the right-hand rule
Dot = 0 ⇒ perpendicular · Cross = 0 ⇒ parallel
A short comparison
Dot product a⋅b
Cross product a×b
Result
Scalar
Vector (3D)
Formula with the angle
∣a∣∣b∣cosθ
Magnitude ∣a∣∣b∣sinθ
Formula with components
axbx+ayby+azbz
Determinant with i,j,k
Geometric meaning
Projection of one vector onto the other × length
Area of the parallelogram the two vectors span
Swapping the order
Unchanged
Sign reverses
Equals zero when
Perpendicular
Parallel
Used to find
Work, angle, projection, real power
Torque, magnetic force, a perpendicular direction
Dot product (scalar product)
For a=(ax,ay,az) and b=(bx,by,bz), multiply the components along the same axis and add them.
a⋅b=axbx+ayby+azbz=∣a∣∣b∣cosθ
So the angle between the vectors follows from cosθ=∣a∣∣b∣a⋅b. A positive value means an acute angle, a negative value an obtuse angle.
Work example
A 50 N force at 30° to a 4 m displacement
W=F⋅d=∣F∣∣d∣cosθ=50×4×cos30∘
W=200×0.866≈173.2 J (only the component of the force parallel to the displacement does work)
Cross product (vector product)
The result is perpendicular to both a and b, with direction given by the right-hand rule: point your fingers along a and curl them toward b; your thumb points in the direction of a×b. With components it is calculated as follows.
A 0.3 m wrench with a 100 N force perpendicular to the handle
τ=r×F,∣τ∣=rFsin90∘=0.3×100×1
∣τ∣=30 N·m, with the torque direction along the axis of rotation of the nut. If the force is applied at a slant, the torque falls in proportion to sinθ.
The same example, computed both ways
Let a=(2,3,1) and b=(1,−1,4).
Dot product
a⋅b=2(1)+3(−1)+1(4)=3
Cross product
a×b=(3⋅4−1⋅(−1),1⋅1−2⋅4,2⋅(−1)−3⋅1)=(13,−7,−5)
The angle between the vectors, with ∣a∣=14, ∣b∣=18
cosθ=14183≈0.189⇒θ≈79.1∘
Check with the magnitude of the cross product, which must equal ∣a∣∣b∣sinθ
∣a×b∣=132+72+52=243≈15.59
14×18sin79.1∘≈15.87×0.982≈15.59 ✓ and a⋅(a×b)=2(13)+3(−7)+1(−5)=0 ✓ (the cross product is perpendicular to a)
How it is used in electrical engineering
Real power: treating the voltage and current phasors (RMS values) as vectors in a 2D plane, the real power P=VIcosφ is their dot product.
Force on a conductor:F=IL×B and the Lorentz force F=qv×B are cross products.
Motor torque:τ=r×F.
Keep learning in the library
The full lessons are in Thai, with English technical terms and the same formulas.
How do the results of the dot product and cross product differ?
The dot product gives a scalar (a single number). The cross product gives a vector perpendicular to both vectors, with its direction given by the right-hand rule. The cross product is defined only for 3D vectors.
What does it mean if the dot product is zero?
The two vectors are perpendicular (when neither is the zero vector). For example, a force perpendicular to the motion does zero work.
What does it mean if the cross product is the zero vector?
The two vectors are parallel or lie along the same line, because sinθ=0.
Why does the sign change when you swap the order of a cross product?
Because the direction of the result is set by the right-hand rule. Swapping the order, b×a, reverses the direction, so b×a=−a×b. The dot product is commutative.