Mathematics · Analytic Geometry / Vectors

Dot Product

The dot product of two vectors yields a number and measures angles and orthogonality.

AdvancedExam-relevant

Free · no credit card · in your study plan in 2 minutes

Formula

LaTeX: \vec{a} \cdot \vec{b} = a_{1}b_{1} + a_{2}b_{2} + a_{3}b_{3} = |\vec{a}| \cdot |\vec{b}| \cdot \cos\varphi
For geometric vectors: product of the length units · φ in degrees or radians
Diagram: two vectors a and b from the same point with enclosed angle φ; the projection of a onto b is marked as the segment |a|·cos φ.baφ|a|·cos φ
The scalar product measures the projection of a onto b: a·b = |a|·|b|·cos φ.

Variables & units – Dot Product

SymbolMeaningUnit
a⃗, b⃗Vectors with coordinates a₁..a₃, b₁..b₃length unit
|a⃗|, |b⃗|Magnitudes (lengths) of the vectorslength unit
φAngle enclosed between a⃗ and b⃗° or rad

Derivation & background – Dot Product

The dot product (Grassmann, Hamilton, around 1844) connects algebra and geometry: the coordinate form and the angle form describe the same number. Central consequence: a⃗ ⊥ b⃗ exactly when a⃗·b⃗ = 0. In addition a⃗·a⃗ = |a⃗|², which allows length calculations. The sign shows the angle class: positive means acute, negative obtuse.

Exam blueprint

Validity range

Applies to vectors of the same dimension; the angle form requires nonzero vectors. The result is always a number (scalar), not a vector.

Derivation steps

The law of cosines in the vector triangle connects coordinate form and angle form.

  1. 1|a⃗ − b⃗|² = |a⃗|² + |b⃗|² − 2|a⃗||b⃗|cos φ (law of cosines).
  2. 2Expanding |a⃗ − b⃗|² in coordinates and comparing gives a⃗·b⃗ = |a⃗||b⃗|cos φ.

Rearrangements

Compute the angle

Standard formula for angles between vectors, lines and planes.

Orthogonality

The most important special case for proofs.

Length of a vector

Self dot product = squared magnitude.

Task variant

Check whether a⃗ = (2|1|−2) and b⃗ = (1|2|2) are orthogonal.

a⃗·b⃗ = 2·1 + 1·2 + (−2)·2 = 2 + 2 − 4 = 0. Yes, the vectors are perpendicular.

Compute the angle between a⃗ = (1|0) and b⃗ = (1|1).

a⃗·b⃗ = 1. |a⃗| = 1, |b⃗| = √2. cos φ = 1/√2 ≈ 0.707, so φ = 45°.

Common mistakes

Giving a vector as the result, e.g. (a₁b₁|a₂b₂|a₃b₃).

The products are added; the result is a single number.

Confusing dot product and cross product.

Dot product: number (angle, orthogonality); cross product: vector (normal, area).

Forgetting to divide by the magnitudes for the angle.

cos φ = a⃗·b⃗/(|a⃗|·|b⃗|), otherwise values above 1 appear.

Exam context

  • Orthogonality proofs, angles between lines and planes, normal form, distance formulas.

These mistakes cost points in real exams. The set drills them until they stick.

Worked example

a⃗ = (1|2|2), b⃗ = (2|0|1): a⃗·b⃗ = 1·2 + 2·0 + 2·1 = 4. |a⃗| = √9 = 3, |b⃗| = √5. cos φ = 4/(3·√5) ≈ 0.596, so φ ≈ 53.4°.

Applications

Angles between vectors, lines and planes, orthogonality proofs, normal form of planes, physics (work W = F⃗·s⃗)

Quanta exam set

Curated exam set for "Dot Product":

Question (front)

Which formula describes Dot Product?

Answer in your set

Question (front)

How do you rearrange a⃗·b⃗ = a₁b₁ + a₂b₂ + a₃b₃ for Compute the angle?

Answer in your set

Question (front)

Which common mistake happens with Dot Product?

Answer in your set

+ 7 more cards: units, variables, derivation, example, exam task

These 10 cards are ready. One click and they sit in your deck, FSRS schedules the reviews until exam day.

Scientific sources

Common notations & search queries

a*b=a1b1+a2b2+a3b3a·b=|a||b|cos(phi)Skalarprodukt berechnenSkalarprodukt WinkelVektoren orthogonal Skalarprodukt 0inneres Produktdot product formulaPunktprodukt Vektoren

Related formulas

More Mathematics formulas

Frequently asked questions about Dot Product

How do I calculate the dot product of two vectors?+

In coordinate form you multiply the matching coordinates and add the products: a⃗·b⃗ = a₁b₁ + a₂b₂ + a₃b₃. Example: a⃗ = (1|2|2) and b⃗ = (2|0|1) give 1·2 + 2·0 + 2·1 = 4. The result is a single number, not a vector; that is exactly where the name scalar (dot) product comes from. In two dimensions it works identically with two summands. There is also the geometric form a⃗·b⃗ = |a⃗|·|b⃗|·cos φ with the enclosed angle φ; both forms give the same value and are used depending on the given data. In exams you almost always need the coordinate form for computing and the angle form for interpreting the result.

How do I prove orthogonality with the dot product?+

Two nonzero vectors are perpendicular exactly when their dot product is zero. The proof is thus a one-line calculation: a⃗ = (2|1|−2) and b⃗ = (1|2|2) give 2·1 + 1·2 + (−2)·2 = 2 + 2 − 4 = 0, so a⃗ ⊥ b⃗. The reason sits in the angle form: a⃗·b⃗ = |a⃗|·|b⃗|·cos φ becomes zero exactly when cos φ = 0, that is φ = 90°. This criterion is the workhorse of analytic geometry: orthogonality of lines via their direction vectors, line-plane relationships via the normal vector, perpendicular heights and feet in triangle tasks. Conversely you construct perpendicular vectors by setting the dot product to zero and choosing one coordinate freely.

How do I calculate the angle between two vectors?+

Rearrange the angle form for cos φ: cos φ = (a⃗·b⃗)/(|a⃗|·|b⃗|). So compute the dot product and both magnitudes, then apply arccos. Example: a⃗ = (1|2|2), b⃗ = (2|0|1): a⃗·b⃗ = 4, |a⃗| = 3, |b⃗| = √5, so cos φ = 4/(3√5) ≈ 0.596 and φ ≈ 53.4°. The sign of the dot product reveals the angle class in advance: positive means acute, zero means 90°, negative obtuse. Two cautions: if cos comes out beyond [−1; 1], you forgot to divide by the magnitudes. And for angles between lines you take the absolute value of the numerator, because direction vectors may be flipped and the intersection angle is at most 90°.

Why is the result of the dot product a number and not a vector?+

Because the dot product measures something different from a direction: it measures how strongly two vectors act in the same direction. Geometrically it projects b⃗ onto the direction of a⃗ and multiplies the projection length |b⃗|·cos φ by the length |a⃗|; the outcome is a measure of "aligned length times length", which is naturally a number. Physics makes this tangible: work is W = F⃗·s⃗, force component along the path times distance, a scalar without direction. Do not confuse it with the cross product, which really does yield a vector (perpendicular to both factors) and measures areas. Mnemonic: dot product → scalar (number) → angles and lengths; cross product → vector → normals and areas.

What does the dot product have to do with lengths and the Pythagorean theorem?+

The dot product of a vector with itself gives its squared magnitude: a⃗·a⃗ = a₁² + a₂² + a₃² = |a⃗|². So the length is |a⃗| = √(a⃗·a⃗), and this is exactly the Pythagorean theorem in space: the squares of the coordinates add up to the square of the length. Example: a⃗ = (1|2|2) has |a⃗| = √(1 + 4 + 4) = 3. The law of cosines is inside too: |a⃗ − b⃗|² = |a⃗|² + |b⃗|² − 2·a⃗·b⃗ follows by expanding with the binomial formula; for a⃗·b⃗ = 0 (right angle) the classical Pythagoras remains. This connection is used constantly for distances between points and for magnitudes in plane and sphere equations.

Retain Dot Product for exams

Create a curated FSRS exam set for a⃗·b⃗ = a₁b₁ + a₂b₂ + a₃b₃: formula recall, variables, derivation, rearrangement, worked example, common mistakes and exam context.

Free · curated formula set · LaTeX · FSRS spaced repetition

How do you calculate with Dot Product?

Here is how to work through a typical Dot Product (a⃗·b⃗ = a₁b₁ + a₂b₂ + a₃b₃) task step by step:

  1. 1

    Task

    Check whether a⃗ = (2|1|−2) and b⃗ = (1|2|2) are orthogonal.

    Solution path

    a⃗·b⃗ = 2·1 + 1·2 + (−2)·2 = 2 + 2 − 4 = 0. Yes, the vectors are perpendicular.

  2. 2

    Task

    Compute the angle between a⃗ = (1|0) and b⃗ = (1|1).

    Solution path

    a⃗·b⃗ = 1. |a⃗| = 1, |b⃗| = √2. cos φ = 1/√2 ≈ 0.707, so φ = 45°.