Vectors: dot & cross product: practice problems with step-by-step solutions

Free Vectors: dot & cross product practice problems with diagrams, hints and full worked solutions. New values every time, at three levels: magnitude and components, dot product, cross product and moments.

Free practice problemEasy
xyza

Find the magnitude |a| of the vector a = (6, −5, 9).

a = (6, −5, 9)
Next problem →

What you practise

  1. Easymagnitude and components
  2. Mediumdot product
  3. Hardcross product and moments

How to solve Vectors: dot & cross product problems

  1. Write every vector in components; for a force given by a magnitude and an angle, use F·cos θ and F·sin θ.
  2. For lengths and directions use the magnitude √(x² + y² + z²) and the unit vector a/|a|.
  3. Use the dot product for angles, projections, perpendicularity and work: a·b = |a||b|cos θ.
  4. Use the cross product for perpendicular vectors, areas and moments: write the three components carefully, keeping the order a × b.

Common mistakes

  • Adding magnitudes instead of components.
  • Getting the sign of the middle (y) component of a cross product wrong.
  • Using the position of the point instead of r = A − O in a moment.
  • Taking arctan without checking the quadrant.

Key formulas

Magnitude
|a| = √(ax² + ay² + az²)
Unit vector
û = a/|a|
Components from an angle
Fx = F·cos θ, Fy = F·sin θ
Dot product
a·b = axbx + ayby + azbz = |a||b|cos θ
Scalar projection of a onto b
a·b/|b|
Work
W = F·d
Cross product
a × b = (aybz − azby, azbx − axbz, axby − aybx)
Areas
parallelogram |a × b|, triangle ½|a × b|
Moment about O
MO = r × F, r = A − O
Volume of a parallelepiped
V = |a·(b × c)|

Learn Vectors: dot & cross product from scratch

1What a vector is

Some quantities only need a number: a mass of 5 kg or a temperature of 20 °C. These are scalars.

Other quantities also need a direction. A force of 40 N pushing up is very different from 40 N pushing sideways. These are vectors.

You describe a vector by its components: how far it reaches along x, along y and along z. The vector a = (4, 3, 0) reaches 4 units along x, 3 along y and 0 along z.

xyaax​ = 4ay​ = 3θO

Forces, displacements and velocities are all vectors. Engineers use vector maths to add forces, find angles and calculate moments in three dimensions.

Vectors add component by component: (1, 2, 0) + (3, −1, 4) = (4, 1, 4). This is how you find the resultant of several forces.

Self-check What is the length of the vector a = (3, 4, 0)?
  1. 1
  2. 25
  3. 5
  4. 7

Answer: 5. The length is √(3² + 4² + 0²) = √25 = 5. Adding the components (7) is wrong because they are perpendicular, and 25 forgets the square root.

2Length, direction and components

The magnitude |a| is the length of the vector. It is Pythagoras in three dimensions:

|a| = √(ax² + ay² + az²)

A unit vector has length 1 and points in the same direction. You get it by dividing every component by the magnitude:

û = a / |a|

For a = (0, 3, 4) the magnitude is 5, so û = (0, 0.6, 0.8). Check: 0.6² + 0.8² = 1.

A force in the xy-plane is often given as a size F and an angle θ, measured anticlockwise from the positive x-axis. Its components are:

Fx = F·cos θ Fy = F·sin θ

The cosine and sine give the signs automatically. A force at 120° has a negative x-component because cos 120° = −0.5.

Going back from components to an angle, arctan(Ry/Rx) only gives answers between −90° and 90°. If Rx is negative, add 180°. If only Ry is negative, add 360°.

Self-check What is the y-component of the unit vector in the direction of a = (0, 3, 4)?
  1. 0.12
  2. 0.43
  3. 0.6
  4. 3

Answer: 0.6. Divide by the magnitude 5: 3/5 = 0.6. 3 forgets to divide, 0.12 divides by |a|² = 25, and 0.43 divides by the sum of the components (7).

3The dot product and the cross product

There are two ways to multiply two vectors. The dot product gives a number. The cross product gives a new vector.

a·b = axbx + ayby + azbz = |a|·|b|·cos θ

Here θ is the angle between the two vectors. The dot product measures how much the vectors point the same way. It is zero when they are perpendicular.

dFθ|F|·cos θ
  • The angle: cos θ = a·b / (|a|·|b|).
  • The scalar projection of a onto b (the part of a along b): a·b / |b|.
  • The work done by a constant force over a displacement: W = F·d.
  • Two vectors are perpendicular when a·b = 0.

The cross product a × b is a vector perpendicular to both a and b. Its length equals the area of the parallelogram the two vectors span.

a × b = (aybz − azby, azbx − axbz, axby − aybx)
aba × bA

For a = (1, 2, 0) and b = (3, 1, 0): a × b = (2·0 − 0·1, 0·3 − 1·0, 1·1 − 2·3) = (0, 0, −5). The parallelogram has area 5 and the triangle half of that, 2.5.

Order matters: b × a = −(a × b). The moment of a force F acting at point A about point O is M = r × F, with r = A − O.

Self-check For a = (2, 1, 0) and b = (1, 4, 0), what is the z-component of a × b?
  1. 6
  2. 7
  3. 9
  4. −7

Answer: 7. z-component = axby − aybx = 2·4 − 1·1 = 7. −7 is b × a (the order swapped), 6 is the dot product, and 9 adds the two products instead of subtracting.

4The method step by step

  1. Write every vector in components. For a force given by size and angle, use F·cos θ and F·sin θ.
  2. If the question gives points, build the vectors from them: the vector from A to B is B − A.
  3. Decide which tool you need. Lengths and directions: magnitude and unit vector. Angles, projections and work: dot product. Areas, perpendicular vectors and moments: cross product.
  4. Write the formula first, then put in the numbers one component at a time. Keep the signs in brackets.
  5. Check the result: a unit vector has length 1, a × b is perpendicular to a (so a·(a × b) = 0), and an angle between vectors lies between 0° and 180°.

For a unit vector perpendicular to two vectors, take n = a × b and divide it by its length. If the question wants a positive z-component and yours is negative, flip all the signs.

The volume of the box (parallelepiped) with edges a, b and c is |a·(b × c)|: first the cross product, then the dot product.

5A worked example

Follow every step. Try to predict the next one before you open it.

Worked example

A constant force F = (6, 2, −3) N pushes an object in a straight line from point A(1, 0, 2) to point B(3, 4, 2). Coordinates are in metres. Find the work W done by the force and the angle θ between the force and the displacement.

1

Build the displacement

The displacement is the vector from A to B: subtract the start from the end.

d = B − A = (3 − 1, 4 − 0, 2 − 2) = (2, 4, 0) m
2

Work with the dot product

Work is the dot product of force and displacement. Multiply matching components and add.

W = F·d = 6·2 + 2·4 + (−3)·0 = 12 + 8 + 0 = 20 J
3

The two magnitudes

|F| = √(6² + 2² + (−3)²) = √49 = 7 N
|d| = √(2² + 4² + 0²) = √20 ≈ 4.472 m
4

The angle

dFθ|F|·cos θ

Use the other form of the dot product, F·d = |F|·|d|·cos θ, and solve for cos θ.

cos θ = 20 / (7 · 4.472) = 0.6389
θ = arccos 0.6389 ≈ 50.3°
5

Check the answer

The work is positive, so the angle must be less than 90°. It is.

The part of the force along the motion is |F|·cos θ = 7 · 0.6389 ≈ 4.47 N. Times the distance 4.472 m this gives 20 J again.

Answer

W = 20 J and θ ≈ 50.3°.

6Common mistakes

  • Adding magnitudes instead of components. Two forces of 3 N and 4 N at right angles give 5 N, not 7 N.
  • Using the coordinates of the point instead of r = A − O in a moment.
  • Getting the sign of the middle (y) component of a cross product wrong. It is azbx − axbz, not the other way round.
  • Swapping the order in a cross product. b × a points the opposite way to a × b.
  • Taking arctan for a direction without checking which quadrant the vector is in.
  • Forgetting the ½ for the area of a triangle: it is half of |AB × AC|.
Self-check A force F = (0, 10, 0) N acts at point A(3, 0, 0) m. What is the size of its moment about O(1, 0, 0) m?
  1. 10 N·m
  2. 20 N·m
  3. 30 N·m
  4. 40 N·m

Answer: 20 N·m. r = A − O = (2, 0, 0) m, so M = r × F = (0, 0, 2·10) = (0, 0, 20) N·m. Using the point A itself as r gives 30 N·m, A + O gives 40 N·m, and O alone gives 10 N·m.

7How exam questions look

  • Easy: magnitude and components. The length of a vector, one component of a unit vector, a component of a force given by size and angle, or the size or direction of the resultant of two forces.
  • Medium: the dot product. A dot product, the angle between two vectors, a scalar projection, the work done by a force between two points, or the value of k that makes two vectors perpendicular.
  • Hard: the cross product and moments. One component of a × b, the area of a parallelogram or triangle, the moment of a force about a point, a unit normal vector, or the volume of a box from a triple product.

For a perpendicularity question, set a·b = 0. It gives one linear equation in k.

For a triangle with corners A, B and C, use the edge vectors AB = B − A and AC = C − A. The area is ½·|AB × AC|.

Learn it step by step in the appLearn it step by step in the app

Worked examples

Example 1Easy
xy135°F1​F2​

Two forces act at a point in the xy-plane: F₁ = 110 N at 0° and F₂ = 190 N at 135°, both measured anticlockwise from the positive x-axis. Find the direction φ of their resultant, measured anticlockwise from the positive x-axis (between 0° and 360°).

F1 = 110 N, θ1 = 0°F2 = 190 N, θ2 = 135°

Find φ (°)

Show hints
  1. Split each force into x- and y-components.
  2. Add the x-components and the y-components separately.
  3. Rₓ = −24.35 N, Ry = 134.4 N.
Show the answer and the step-by-step solution

Vectors: a vector a = (ax, ay, az) has magnitude |a| = √(ax² + ay² + az²), and the unit vector in its direction is û = a/|a|. A vector of magnitude F at an angle θ measured anticlockwise from the positive x-axis has components Fx = F·cos θ and Fy = F·sin θ. Vectors add component by component.

Components of the resultant

Rₓ = 110·cos 0° + 190·cos 135° = −24.35 N
Ry = 110·sin 0° + 190·sin 135° = 134.4 N

Direction

Rₓ is negative, so the resultant points into the second or third quadrant: add 180° to the calculator angle.

arctan(Ry/Rₓ) = arctan(134.4/−24.35) = −79.73°
φ = 100.3°

Answer

φ = 100.3°
Example 2Medium
xyzab

Find the value of k for which the vectors a = (−4, −4, 0) and b = (k, 6, 4) are perpendicular.

a = (−4, −4, 0)b = (k, 6, 4)

Find k

Show hints
  1. Perpendicular vectors have a dot product of zero.
  2. Write a·b = 0 with k as the unknown and solve the linear equation.
  3. (−4)·k + (−4)·6 + 0·4 = 0.
Show the answer and the step-by-step solution

Dot product: a·b = axbx + ayby + azbz = |a|·|b|·cos θ, a scalar. It gives the angle between two vectors, cos θ = a·b/(|a|·|b|), and it is zero when they are perpendicular. The scalar projection of a onto b is a·b/|b|, and a constant force F moving through a displacement d does work W = F·d.

Dot product equals zero

a·b = (−4)·k + (−4)·6 + 0·4 = 0
−24 + (−4)·k = 0

Solve for k

k = −(−24)/(−4) = −6

Answer

k = −6
Example 3Hard
xyzABC

Find the area A of the triangle with corners A(−3, −4, −1), B(−4, 3, −3) and C(1, 4, −4). Coordinates are in metres.

A(−3, −4, −1)B(−4, 3, −3)C(1, 4, −4)

Find A (m²)

Show hints
  1. Form two edge vectors from the same corner: AB = B − A and AC = C − A.
  2. The area is ½·|AB × AC|.
  3. AB × AC = (−5, −11, −36).
Show the answer and the step-by-step solution

Cross product: a × b = (aybz − azby, azbx − axbz, axby − aybx) is perpendicular to both vectors, and |a × b| = |a|·|b|·sin θ is the area of the parallelogram they span (the triangle has half of it). Order matters: b × a = −(a × b). The moment of a force F applied at point A about point O is MO = r × F, with r = A − O.

Edge vectors

AB = B − A = (−1, 7, −2)
AC = C − A = (4, 8, −3)

Cross product

(AB × AC)x = AByACz − ABzACy = 7·(−3) − (−2)·8 = −5
(AB × AC)y = ABzACx − ABxACz = (−2)·4 − (−1)·(−3) = −11
(AB × AC)z = ABxACy − AByACx = (−1)·8 − 7·4 = −36
|AB × AC| = √((−5)² + (−11)² + (−36)²) = 37.97

Area of the triangle

A = ½·37.97 = 18.99 m²

Answer

A = 18.99 m²

Questions and answers

What is Vectors: dot & cross product?

Some quantities only need a number: a mass of 5 kg or a temperature of 20 °C. These are scalars.

Other quantities also need a direction. A force of 40 N pushing up is very different from 40 N pushing sideways. These are vectors.

How do I solve Vectors: dot & cross product problems step by step?
  1. Write every vector in components; for a force given by a magnitude and an angle, use F·cos θ and F·sin θ.
  2. For lengths and directions use the magnitude √(x² + y² + z²) and the unit vector a/|a|.
  3. Use the dot product for angles, projections, perpendicularity and work: a·b = |a||b|cos θ.
  4. Use the cross product for perpendicular vectors, areas and moments: write the three components carefully, keeping the order a × b.
What are common mistakes in Vectors: dot & cross product?
  • Adding magnitudes instead of components.
  • Getting the sign of the middle (y) component of a cross product wrong.
  • Using the position of the point instead of r = A − O in a moment.
  • Taking arctan without checking the quadrant.
What do the Vectors: dot & cross product exercises cover?
  • Easy: magnitude and components
  • Medium: dot product
  • Hard: cross product and moments

Every problem has new values, so you learn the method instead of an answer. Stuck? Open a small hint first, and the full explanation only when you need it.

How practising works

  • Every problem has new values, so you learn the method instead of an answer.
  • Stuck? Open a small hint first, and the full explanation only when you need it.
  • Your progress, mistakes and saved problems are kept, so you can review before the exam.

Courses with this topic

More topics in Mathematics & statistics

Printable worksheet