Dot Product (A·B) Explained- Definition, Formula, and Geometric Meaning

What Is the Dot Product?

The dot product (also called the scalar product or inner product) is an operation that takes two vectors of the same dimension and returns a single number. It's written as A · B and pronounced "A dot B."

Unlike vector addition, which gives you another vector, the dot product collapses everything into one value. That value can be positive, negative, or zero depending on the angle between the two vectors.

The Formula

Component Form

If you have two vectors in 3D space:

A = (a₁, a₂, a₃) and B = (b₁, b₂, b₃)

Then the dot product is:

A · B = a₁b₁ + a₂b₂ + a₃b₃

For 2D vectors it's the same idea — just two terms instead of three. You multiply matching components and add them up. That's it.

Geometric Form

The dot product also has a geometric interpretation:

A · B = |A| |B| cos(θ)

Where |A| and |B| are the magnitudes (lengths) of the vectors, and θ is the angle between them. This form is useful when you know the angle but not the individual components.

Geometric Meaning

The dot product tells you how much one vector points in the same direction as another.

Think of it as a measure of projection. If you shine a light perpendicular to vector B, the dot product tells you how much of A you actually see along B's direction.

Key Properties

The dot product has several properties you should know:

Dot Product vs. Cross Product

Don't confuse these two. They're related but do completely different things.

Property Dot Product (A · B) Cross Product (A × B)
Result Scalar (number) Vector
Output dimension 1D 3D (or 2D in magnitude)
Angle info cos(θ) sin(θ)
Perpendicular vectors A · B = 0 |A × B| = |A||B|

How to Calculate the Dot Product

Here's a step-by-step example with vectors in 2D:

A = (3, 4) and B = (2, -1)

  1. Multiply matching components: 3 × 2 = 6, and 4 × (-1) = -4
  2. Add the results: 6 + (-4) = 2

A · B = 2

That's the dot product. Positive, so the angle between them is acute (less than 90°).

For the geometric form with magnitudes:

|A| = √(3² + 4²) = √25 = 5
|B| = √(2² + (-1)²) = √5

cos(θ) = (A · B) / (|A||B|) = 2 / (5 × √5) ≈ 0.179

θ ≈ 79.7° — which confirms the angle is acute.

Where the Dot Product Shows Up

This isn't just abstract math. The dot product appears everywhere:

Common Mistakes to Avoid

Quick Reference

Formula Type Equation
Component form (3D) A · B = a₁b₁ + a₂b₂ + a₃b₃
Geometric form A · B = |A| |B| cos(θ)
Cosine of angle cos(θ) = (A · B) / (|A| |B|)
Self-product A · A = |A|²

The dot product is one of those operations that looks simple on paper but shows up constantly in real work. Once you understand it's measuring directional alignment, everything else clicks into place.