Algebra

Vectors Explained: Magnitude, Dot Product and Cross Product

By Math Solving Space · · 1 min read

On this page
  1. Magnitude
  2. The dot product
  3. The angle between two vectors
  4. The cross product (3D only)
  5. Adding vectors
  6. Common mistakes
  7. Practice questions
  8. Frequently asked questions

A vector has a size (magnitude) and a direction, written with components like ⟨3,4⟩\langle 3, 4 \rangle. Its magnitude is found with Pythagoras. The dot product multiplies matching components and adds, and tells you the angle between vectors. The cross product of two 3D vectors gives a vector perpendicular to both.

Magnitude

∣a∣=a12+a22+a32|\mathbf{a}| = \sqrt{a_1^2 + a_2^2 + a_3^2}

∣⟨3,4⟩∣=9+16=5|\langle 3, 4 \rangle| = \sqrt{9 + 16} = 5.

The dot product

a⋅b=a1b1+a2b2+a3b3\mathbf{a}\cdot\mathbf{b} = a_1b_1 + a_2b_2 + a_3b_3

Example: ⟨3,4⟩⋅⟨1,2⟩=3+8=11\langle 3, 4 \rangle \cdot \langle 1, 2 \rangle = 3 + 8 = 11.

The angle between two vectors

cos⁡θ=a⋅b∣a∣∣b∣\cos\theta = \frac{\mathbf{a}\cdot\mathbf{b}}{|\mathbf{a}||\mathbf{b}|}

For the example: cos⁡θ=1155≈0.9839\cos\theta = \frac{11}{5\sqrt{5}} \approx 0.9839, so θ≈10.3∘\theta \approx 10.3^\circ.

The cross product (3D only)

a×b=⟨a2b3−a3b2,  a3b1−a1b3,  a1b2−a2b1⟩\mathbf{a}\times\mathbf{b} = \langle a_2b_3 - a_3b_2,\; a_3b_1 - a_1b_3,\; a_1b_2 - a_2b_1 \rangle

Example: ⟨1,2,3⟩×⟨4,5,6⟩=⟨12−15,  12−6,  5−8⟩=⟨−3,6,−3⟩\langle 1, 2, 3 \rangle \times \langle 4, 5, 6 \rangle = \langle 12 - 15,\; 12 - 6,\; 5 - 8 \rangle = \langle -3, 6, -3 \rangle.

The result is perpendicular to both vectors, and its length equals the area of the parallelogram they form.

Adding vectors

Add matching components: ⟨3,4⟩+⟨1,2⟩=⟨4,6⟩\langle 3, 4 \rangle + \langle 1, 2 \rangle = \langle 4, 6 \rangle. Geometrically, place the second vector at the tip of the first.

Common mistakes

  • Expecting the dot product to be a vector (it is a number).
  • Getting the order wrong in the cross product: b×a=−(a×b)\mathbf{b}\times\mathbf{a} = -(\mathbf{a}\times\mathbf{b}).
  • Using degrees and radians inconsistently for the angle.

Practice questions

  1. ∣⟨6,8⟩∣|\langle 6, 8 \rangle|
  2. ⟨1,2,3⟩⋅⟨4,−5,6⟩\langle 1, 2, 3 \rangle \cdot \langle 4, -5, 6 \rangle
  3. Are ⟨3,1⟩\langle 3, 1 \rangle and ⟨−1,3⟩\langle -1, 3 \rangle perpendicular?

Answers: 1) 10 2) 12 3) Yes, the dot product is 0

The vector calculator finds all of these at once and draws 2D vectors tip to tail. Distance between points uses the same idea; see the distance calculator and the Pythagorean theorem.

Frequently asked questions

What is a unit vector?

A vector of length 1, found by dividing a vector by its magnitude.

Can I take the cross product in 2D?

Not as a vector. In 2D, a₁b₂ − a₂b₁ gives the signed area of the parallelogram.

What does a negative dot product mean?

The angle between the vectors is more than 90°.

Open the calculator →

#vectors#linear algebra