Tutorials › Calculus III › Dot Products, Norms, and Cauchy-Schwarz

Dot Products and Projections · Tutorial 53 of 999

Dot Products, Norms, and Cauchy-Schwarz

Learn how a vector’s norm is determined by its dot product with itself, and why the dot product cannot exceed the product of the two norms in absolute value.

Beginner 8 min read

What You'll Learn

  • Define the Euclidean norm of a vector using its dot product with itself
  • Derive the component formula for a vector’s squared length
  • Prove Cauchy–Schwarz by expanding a nonnegative squared length
  • Handle the zero-vector case separately in the inequality proof
  • Check equality and apply the inequality to exact vector examples
  • Recognize common errors involving norms and absolute values

From Dot Products to Length

A dot product combines the components of two vectors into a single number. A particularly important case occurs when both inputs are the same vector. In that case, each component is multiplied by itself, so the result records the sum of the component squares. This connects the dot product directly to the length, or norm, of a vector.

That connection gives a practical way to compute lengths and supports a fundamental inequality: the absolute value of a dot product is no greater than the product of the two vector lengths. This inequality is useful even before we know the angle between the vectors; it gives a reliable numerical bound using only their components.

The Norm and the Self-Dot-Product Identity

For vectors in three-dimensional Euclidean space, write \(\mathbf{v}=(v_1,v_2,v_3)\). The dot product of \(\mathbf{u}=(u_1,u_2,u_3)\) and \(\mathbf{v}\) is \(u_1v_1+u_2v_2+u_3v_3\). The Euclidean norm \(\|\mathbf{v}\|\) is the vector’s nonnegative length.

Definition: For \(\mathbf{v}=(v_1,v_2,v_3)\), its Euclidean norm is $$ \|\mathbf{v}\|=\sqrt{v_1^2+v_2^2+v_3^2}. $$ The squared norm is \(\|\mathbf{v}\|^2\), which equals \(v_1^2+v_2^2+v_3^2\).

The definition of the dot product immediately gives the key identity. Set both input vectors equal to \(\mathbf{v}\), and each product is a component squared.

Identity: For every vector \(\mathbf{v}\), $$ \mathbf{v}\cdot\mathbf{v} =v_1^2+v_2^2+v_3^2 =\|\mathbf{v}\|^2. $$ In particular, \(\mathbf{v}\cdot\mathbf{v}\ge 0\), and it is zero exactly when \(\mathbf{v}=\mathbf{0}\).

To see the last statement, a sum of squares can equal zero only if each square equals zero. Thus \(v_1=v_2=v_3=0\). Conversely, all three components are zero for \(\mathbf{v}=\mathbf{0}\), so its self-dot-product is zero.

Worked Example: Find a Vector’s Norm from Its Components

Let \(\mathbf{v}=(3,-4,12)\). First compute the self-dot-product by multiplying corresponding components and adding:

$$ \mathbf{v}\cdot\mathbf{v} =(3)(3)+(-4)(-4)+(12)(12) =9+16+144 =169. $$

By the self-dot-product identity, \(\|\mathbf{v}\|^2=169\). The norm is nonnegative, so take the nonnegative square root:

$$ \|\mathbf{v}\|=\sqrt{169}=13. $$

Check by squaring the answer: \(13^2=169=\mathbf{v}\cdot\mathbf{v}\). The component formula gives the same check: \(\sqrt{3^2+(-4)^2+12^2}=\sqrt{9+16+144}=13\).

Cauchy–Schwarz Inequality

The self-dot-product identity says that every vector has a nonnegative squared length. Apply that fact not only to a given vector, but to a difference of vectors. The right choice of difference produces a quadratic expression whose nonnegativity bounds the dot product.

Theorem (Cauchy–Schwarz inequality): For any \(\mathbf{u},\mathbf{v}\in\mathbb{R}^3\), $$ |\mathbf{u}\cdot\mathbf{v}| \le \|\mathbf{u}\|\,\|\mathbf{v}\|. $$ No nonzero assumption is required. If either vector is zero, both sides are zero.

The absolute value is essential: a dot product may be negative, but its magnitude is bounded. The proof below first treats the case in which \(\mathbf{v}\ne\mathbf{0}\), so that \(\|\mathbf{v}\|^2\) is positive and division by it is permitted.

1
Choose a difference vector.
Assume \(\mathbf{v}\ne\mathbf{0}\), and set \(t=(\mathbf{u}\cdot\mathbf{v})/\|\mathbf{v}\|^2\). The vector \(\mathbf{u}-t\mathbf{v}\) has nonnegative squared norm.
2
Expand its squared norm.
Use the self-dot-product identity, symmetry, and linearity of the dot product to express the result in terms of the two norms and their dot product.
3
Rearrange the bound.
Substitute the chosen value of \(t\), multiply by the positive number \(\|\mathbf{v}\|^2\), and take nonnegative square roots.

Here is the complete calculation. Since a squared norm is nonnegative,

$$ 0\le \|\mathbf{u}-t\mathbf{v}\|^2 =(\mathbf{u}-t\mathbf{v})\cdot(\mathbf{u}-t\mathbf{v}). $$

Expand using symmetry and linearity of the dot product, and then use \(\mathbf{v}\cdot\mathbf{v}=\|\mathbf{v}\|^2\):

$$ \begin{aligned} 0 &\le \mathbf{u}\cdot\mathbf{u} -t(\mathbf{u}\cdot\mathbf{v}) -t(\mathbf{v}\cdot\mathbf{u}) +t^2(\mathbf{v}\cdot\mathbf{v})\\ &=\|\mathbf{u}\|^2-2t(\mathbf{u}\cdot\mathbf{v}) +t^2\|\mathbf{v}\|^2. \end{aligned} $$

Let \(d=\mathbf{u}\cdot\mathbf{v}\) and \(q=\|\mathbf{v}\|^2\), where \(q>0\) because \(\mathbf{v}\ne\mathbf{0}\). Substituting \(t=d/q\) gives

$$ \begin{aligned} 0 &\le \|\mathbf{u}\|^2-2\frac{d}{q}d +\left(\frac{d}{q}\right)^2q\\ &=\|\mathbf{u}\|^2-\frac{2d^2}{q}+\frac{d^2}{q}\\ &=\|\mathbf{u}\|^2-\frac{d^2}{q}. \end{aligned} $$

Multiplication by \(q>0\) preserves the inequality, so \(d^2\le \|\mathbf{u}\|^2\|\mathbf{v}\|^2\). Both norms are nonnegative. Taking square roots therefore yields \(|d|\le\|\mathbf{u}\|\|\mathbf{v}\|\), as required. If \(\mathbf{v}=\mathbf{0}\), then \(\mathbf{u}\cdot\mathbf{v}=0\) and \(\|\mathbf{v}\|=0\), so the inequality holds as equality. This proves the theorem in all cases.

When Does Equality Occur?

The proof also identifies equality. When \(\mathbf{v}\ne\mathbf{0}\), equality in Cauchy–Schwarz occurs exactly when the vector used in the proof has squared norm zero:

$$ \left\|\mathbf{u} -\frac{\mathbf{u}\cdot\mathbf{v}}{\|\mathbf{v}\|^2}\mathbf{v} \right\|^2=0. $$

A vector has zero norm exactly when it is the zero vector. Thus equality holds precisely when \(\mathbf{u}\) is a scalar multiple of \(\mathbf{v}\). If \(\mathbf{v}=\mathbf{0}\), equality also holds, since both sides vanish. This is a condition for equality in the bound; it does not say that the dot product must always equal the product of the norms.

Worked Example: Check Cauchy–Schwarz for Two Vectors

Take \(\mathbf{u}=(1,2,2)\) and \(\mathbf{v}=(2,0,-1)\). Their dot product is

$$ \mathbf{u}\cdot\mathbf{v} =(1)(2)+(2)(0)+(2)(-1) =2+0-2 =0. $$

Compute each norm from its components:

$$ \|\mathbf{u}\|=\sqrt{1^2+2^2+2^2} =\sqrt{1+4+4}=3, \qquad \|\mathbf{v}\|=\sqrt{2^2+0^2+(-1)^2} =\sqrt{4+0+1}=\sqrt{5}. $$

The two sides of the inequality are therefore

$$ |\mathbf{u}\cdot\mathbf{v}|=|0|=0, \qquad \|\mathbf{u}\|\,\|\mathbf{v}\|=3\sqrt{5}. $$

Since \(0\le 3\sqrt{5}\), the inequality is satisfied. Squaring provides another check: \(0^2=0\le (3\sqrt{5})^2=45\).

Worked Example: Use the Inequality to Bound a Dot Product

Let \(\mathbf{a}=(2,-1,2)\) and \(\mathbf{b}=(-1,3,0)\). Rather than calculate the dot product first, Cauchy–Schwarz gives a bound from the norms:

$$ \|\mathbf{a}\|=\sqrt{2^2+(-1)^2+2^2} =\sqrt{4+1+4}=3, \qquad \|\mathbf{b}\|=\sqrt{(-1)^2+3^2+0^2} =\sqrt{1+9+0}=\sqrt{10}. $$

Consequently,

$$ |\mathbf{a}\cdot\mathbf{b}|\le 3\sqrt{10}, \qquad -3\sqrt{10}\le\mathbf{a}\cdot\mathbf{b}\le3\sqrt{10}. $$

Now calculate the dot product to check this particular bound:

$$ \mathbf{a}\cdot\mathbf{b} =(2)(-1)+(-1)(3)+(2)(0) =-2-3+0=-5. $$

Indeed, \(|-5|=5\le 3\sqrt{10}\), since both sides are nonnegative and \(25\le90\). Thus the calculated dot product lies between \(-3\sqrt{10}\) and \(3\sqrt{10}\), as predicted.

Why the Inequality Is Useful

Cauchy–Schwarz converts information about lengths into a bound on a dot product. It can therefore be used when the dot product is unknown, difficult to calculate, or only needed within a range. The theorem also guarantees that calculations involving dot products remain controlled by the sizes of the vectors.

The proof’s method is as important as the inequality itself. The key is to start from a quantity known to be nonnegative, namely a squared norm, and choose its vector so that expansion produces the desired dot product. This approach works here because the dot product is symmetric and linear, and because the self-dot-product is the squared norm.

A Common Mistake: Dropping the Absolute Value

A frequent error is to treat the dot product as necessarily nonnegative. For example, let \(\mathbf{p}=(1,0,0)\) and \(\mathbf{q}=(-2,0,0)\). Then

$$ \mathbf{p}\cdot\mathbf{q} =(1)(-2)+(0)(0)+(0)(0)=-2. $$

The norms are \(\|\mathbf{p}\|=\sqrt{1}=1\) and \(\|\mathbf{q}\|=\sqrt{4}=2\). The incorrect claim \(\mathbf{p}\cdot\mathbf{q}\ge0\) would say \(-2\ge0\), which is false. Cauchy–Schwarz instead compares the absolute value with the product of norms:

$$ |\mathbf{p}\cdot\mathbf{q}|=|-2|=2 \le(1)(2)=2. $$

Another mistake is to add component magnitudes when finding a norm. For \((3,4,0)\), that incorrect procedure gives \(3+4+0=7\). The norm is instead \(\sqrt{3^2+4^2+0^2}=\sqrt{25}=5\). The norm comes from the square root of the sum of component squares, not the sum of component magnitudes.

Takeaway: The self-dot-product is the squared norm, and Cauchy–Schwarz bounds the absolute dot product by the product of the norms. Keep the square root in the norm definition and the absolute value in the inequality.

Check Your Understanding

Use component calculations and the definitions to answer these questions.

  1. For \(\mathbf{r}=(2,-3,6)\), compute \(\mathbf{r}\cdot\mathbf{r}\) and \(\|\mathbf{r}\|\).
  2. Why is \(\mathbf{v}\cdot\mathbf{v}\ge0\) for every vector \(\mathbf{v}\), and when is it zero?
  3. In the proof of Cauchy–Schwarz, why must the case \(\mathbf{v}=\mathbf{0}\) be treated separately before dividing by \(\|\mathbf{v}\|^2\)?
  4. For \(\mathbf{a}=(1,1,0)\) and \(\mathbf{b}=(1,-1,0)\), calculate the dot product and both norms, then verify Cauchy–Schwarz.
  5. State the equality condition in Cauchy–Schwarz, including the case where one vector is zero.