Skip to content
Tutorials Center
My learning

Topics

Lesson 9 of 47 · Vectors and Forces

Dot and cross products for forces

Learn the dot product for angles and projections and the cross product for perpendicular vectors and areas, with worked 3D examples and runnable checks.

There are two different ways to multiply vectors, and both matter in statics. The dot product turns two vectors into a number and answers "how much do these point the same way?" The cross product turns two vectors into a new vector perpendicular to both, and it is the mathematical heart of the moment of a force, which you will meet in Chapter 4. This lesson gives you both tools and shows what they mean geometrically.

What you will learn

  • How to compute and interpret the dot product.
  • How to find the angle between two vectors and the component of a force along a line.
  • How to compute a cross product with a determinant and with the right-hand rule.
  • What the length of a cross product means and why order matters.

Key terms

  • Dot (scalar) product: A·B = A B cos θ, a number.
  • Cross (vector) product: A×B, a vector perpendicular to A and B with length A B sin θ.
  • Projection: the length of the shadow of one vector on the line of another.
  • Orthogonal: perpendicular. Two vectors are orthogonal when their dot product is zero.
  • Right-hand rule: curl the fingers of your right hand from A toward B; the thumb points along A×B.
Left: two vectors A and B with the angle theta and the projection of B on A. Right: the parallelogram spanned by A and B with the cross product pointing out of the plane
Caption: the dot product measures overlap (a number); the cross product measures the area they span and points perpendicular to it.

The dot product

For two vectors with angle θ between them (0° ≤ θ ≤ 180°):

A · B = A B cos θ

In components, which is how you usually compute it:

A · B = Ax Bx + Ay By + Az Bz

Properties worth remembering: A·B = B·A; A·A = A²; and i·i = j·j = k·k = 1 while i·j = j·k = k·i = 0. The sign tells the story. A positive dot product means the angle is below 90°, zero means the vectors are perpendicular, negative means more than 90°.

Finding the angle between two vectors

Rearrange the definition: θ = cos⁻¹( A·B / (A B) ). For A = 2 i − j + 3 k and B = i + 4 j + 2 k:

  • A·B = 2 − 4 + 6 = 4
  • A = √14 = 3.742 and B = √21 = 4.583
  • cos θ = 4 / 17.15 = 0.2332, so θ = 76.5°

Projection: the component of a force along a line

If u is a unit vector along a line, then F · u is the component of the force along that line. It is the length of the force's "shadow" on the line, with sign. In statics you use this to find, for example, how much of a force pulls along a rod, or how much of a wind force pushes along a road.

For F = 150 i + 200 j + 600 k N along a line with unit vector u = 0.6 i + 0.8 k, the component along the line is F·u = 90 + 480 = 570 N. The remaining part, perpendicular to the line, is √(F² − 570²): with F = √(150² + 200² + 600²) = 650 N that equals √(422 500 − 324 900) = 312 N.

The cross product

The cross product of A and B is a vector C = A × B with:

  • Magnitude C = A B sin θ, which equals the area of the parallelogram spanned by A and B.
  • Direction perpendicular to both A and B, given by the right-hand rule.

Because the direction flips when you swap the factors, order matters: A × B = −(B × A). Also A × A = 0, and the unit vectors follow the cycle i × j = k, j × k = i, k × i = j.

In components, expand the determinant:

TEXT
        | i   j   k  |
A × B = | Ax  Ay  Az | = (Ay Bz − Az By) i − (Ax Bz − Az Bx) j + (Ax By − Ay Bx) k
        | Bx  By  Bz |

For the same vectors, A = (2, −1, 3) and B = (1, 4, 2):

  • i: (−1)(2) − (3)(4) = −14
  • j: −[(2)(2) − (3)(1)] = −1
  • k: (2)(4) − (−1)(1) = 9

So A × B = −14 i − j + 9 k. Check it: it must be perpendicular to both. A·C = −28 + 1 + 27 = 0 and B·C = −14 − 4 + 18 = 0. Its length is √278 = 16.67, and A B sin θ = 17.15 × 0.9724 = 16.68, matching to rounding.

Python Dot, cross, angle and projection with numpy

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The next demo shows the dot product and its projection geometrically.

Dot product and projection

At 90° the projection is zero and the dot product is zero. Beyond 90° both turn negative.

Why statics needs these

  • Dot product: angles between members, components along a bar or road, and the test for perpendicular directions. In Chapter 4 it will also project a moment vector onto an axis.
  • Cross product: the moment of a force about a point is M = r × F. The right-hand rule gives the sense of rotation, and |r × F| = r F sin θ is "force times perpendicular distance".

Common misconceptions

"A·B is a vector." The dot product is a scalar; the cross product is a vector.

"A×B = B×A." The cross product is anti-commutative: swapping the order flips the sign, which matters for the direction of a moment.

"Zero dot product means a zero vector." It only means the vectors are perpendicular. Zero cross product means they are parallel.

Check your understanding

Quick check · 5 questions

of 5 answered You scored / 5 · perfect!

  1. 1. A = 3 i + 4 j and B = 4 i − 3 j. What is A·B?

    3×4 + 4×(−3) = 0, so the vectors are perpendicular.
  2. 2. What is i × j?

    The unit vectors follow i × j = k, j × k = i, k × i = j.
  3. 3. What does |A × B| represent geometrically?

    |A × B| = A B sin θ is the parallelogram area.
  4. 4. F = 100 i + 100 j (N). What is the component of F along u = i?

    F·u = 100 N, the x component.
  5. 5. If A·B < 0, the angle between A and B is

    cos θ is negative for angles between 90° and 180°.

Summary

  • A·B = A B cos θ = Ax Bx + Ay By + Az Bz, a scalar used for angles and projections.
  • F·u gives the component of F along the direction u.
  • A × B is perpendicular to both, |A × B| = A B sin θ, order matters.
  • The moment M = r × F builds directly on the cross product.

Next: Chapter 2 review