Skip to content
nonconvexcard

Equality in Cauchy–Schwarz

ProofBeginner⏱ 15 minFoundationscauchy-schwarzinner productequality case

Problem

Prove that for x,y∈Rdx,y \in \R^d,

∣⟨x,y⟩∣=∥x∥2∥y∥2|\langle x, y\rangle| = \|x\|_2\|y\|_2

if and only if xx and yy are linearly dependent. Then deduce that the cosine similarity cos⁡(x,y)=⟨x,y⟩/(∥x∥2∥y∥2)\cos(x,y) = \langle x,y\rangle/(\|x\|_2\|y\|_2) takes the value ±1\pm 1 exactly for parallel and anti-parallel vectors.

Write a complete argument. Every inequality you use should be one you could state precisely.

Hints

Hints — 0 of 3 revealed

Solution

Opening this before you have a real attempt on paper is the fastest way to feel like you understand something you cannot reproduce.

Related problems

All problems
SolvedProblemFieldTypeDifficultyTime
Equality in Jensen's inequalityFoundationsProofBeginner15 min
Bounding the spectral norm by row and column sumsFoundationsProofIntermediate30 min
Characterising orthogonal projectorsFoundationsProofIntermediate30 min
From distance preservation to inner-product preservationHigh-Dim ProbabilityProofIntermediate30 min
Implement power iteration and verify the convergence rate runFoundationsCodingIntermediate1 hour