where ⟨⋅,⋅⟩{\displaystyle \langle \cdot ,\cdot \rangle } is the inner product. Examples of inner products include the real and complex dot product, see the examples in inner product. Equivalently, by taking the square root of both sides, and referring to the norms of the vectors, the inequality is written as

Moreover, the two sides are equal if and only if u{\displaystyle \mathbf {u} } and v{\displaystyle \mathbf {v} } are linearly dependent ( meaning they are parallel, one of the vector's magnitudes is zero, or one is a scalar multiple of the other).[4]:14

If u1,…,un∈C{\displaystyle u_{1},\ldots ,u_{n}\in \mathbb {C} } and v1,…,vn∈C{\displaystyle v_{1},\ldots ,v_{n}\in \mathbb {C} } have an imaginary component, the inner product is the standard complex inner product where the bar notation is used for complex conjugation and then the inequality may be restated more explicitly as

Let u{\displaystyle u} and v{\displaystyle v} be arbitrary vectors in a vector space over F{\displaystyle \mathbb {F} } with an inner product, where F{\displaystyle \mathbb {F} } is the field of real or complex numbers. We prove the inequality

and that equality holds only when either u{\displaystyle u} or v{\displaystyle v} is a multiple of the other.

If v=0{\displaystyle v=0}, it is clear that we have equality, and in this case u{\displaystyle u} and v{\displaystyle v} are also linearly dependent (regardless of u{\displaystyle u}). We henceforth assume that v{\displaystyle v} is nonzero. We also assume that ⟨u,v⟩≠0{\displaystyle \langle u,v\rangle \neq 0} otherwise the inequality is obviously true, because neither ∥u∥{\displaystyle \|u\|} nor ∥v∥{\displaystyle \|v\|} can be negative.

Therefore, z{\displaystyle z} is a vector orthogonal to the vector v{\displaystyle v} (Indeed, z{\displaystyle z} is the projection of u{\displaystyle u} onto the plane orthogonal to v{\displaystyle v} .) We can thus apply the Pythagorean theorem to

and, after multiplication by ∥v∥2{\displaystyle \|v\|^{2}}, the Cauchy–Schwarz inequality. Moreover, if the relation ≥{\displaystyle \geq } in the above expression is actually an equality, then ∥z∥2=0{\displaystyle \|z\|^{2}=0} and hence z=0{\displaystyle z=0}; the definition of z{\displaystyle z} then establishes a relation of linear dependence between u{\displaystyle u} and v{\displaystyle v}. This establishes the theorem.

Let u{\displaystyle u} and v{\displaystyle v} be arbitrary vectors in a vector space F{\displaystyle \mathbb {F} } with an inner product, where F{\displaystyle \mathbb {F} } is the field of real or complex numbers.

There are indeed many different proofs[5] of the Cauchy–Schwarz inequality other than the above two examples.[1][3] When consulting other sources, there are often two sources of confusion. First, some authors define ⟨⋅,⋅⟩{\displaystyle \langle \cdot ,\cdot \rangle } to be linear in the second argument rather than the first. Second, some proofs are only valid when the field is R{\displaystyle \mathbb {R} } and not C{\displaystyle \mathbb {C} }.[6]

where θ{\displaystyle \theta } is the angle between u{\displaystyle u} and v{\displaystyle v}.

The form above is perhaps the easiest in which to understand the inequality, since the square of the cosine can be at most 1, which occurs when the vectors are in the same or opposite directions. It can also be restated in terms of the vector coordinates v1,v2,u1{\displaystyle v_{1},v_{2},u_{1}} and u2{\displaystyle u_{2}} as

where equality holds if and only if the vector (u1,u2){\displaystyle (u_{1},u_{2})} is in the same or opposite direction as the vector (v1,v2){\displaystyle (v_{1},v_{2})}, or if one of them is the zero vector.

The Cauchy–Schwarz inequality proves that this definition is sensible, by showing that the right-hand side lies in the interval [−1, 1], and justifies the notion that (real) Hilbert spaces are simply generalizations of the Euclidean space. It can also be used to define an angle in complexinner product spaces, by taking the absolute value or the real part of the right-hand side,[11][12] as is done when extracting a metric from quantum fidelity.

An inner product can be used to define a positive linear functional. For example, given a Hilbert space L2(m),m{\displaystyle L^{2}(m),m} being a finite measure, the standard inner product gives rise to a positive functional ϕ{\displaystyle \phi } by ϕ(g)=⟨g,1⟩{\displaystyle \phi (g)=\langle g,1\rangle }. Conversely, every positive linear functional ϕ{\displaystyle \phi } on L2(m){\displaystyle L^{2}(m)} can be used to define an inner product ⟨f,g⟩ϕ:=ϕ(g∗f){\displaystyle \langle f,g\rangle _{\phi }:=\phi (g^{*}f)} where g∗{\displaystyle g^{*}} is the pointwisecomplex conjugate of g{\displaystyle g}. In this language, the Cauchy–Schwarz inequality becomes

Theorem (Kadison–Schwarz inequality,[18][19] named after Richard Kadison) If ϕ{\displaystyle \phi } is a unital positive map, then for every normal elementa{\displaystyle a} in its domain, we have ϕ(a∗a)≥ϕ(a∗)ϕ(a){\displaystyle \phi (a^{*}a)\geq \phi (a^{*})\phi (a)} and ϕ(a∗a)≥ϕ(a)ϕ(a∗){\displaystyle \phi (a^{*}a)\geq \phi (a)\phi (a^{*})}.

This extends the fact φ(a∗a)⋅1≥φ(a)∗φ(a)=|φ(a)|2{\displaystyle \varphi (a^{*}a)\cdot 1\geq \varphi (a)^{*}\varphi (a)=|\varphi (a)|^{2}}, when φ{\displaystyle \varphi } is a linear functional. The case when a{\displaystyle a} is self-adjoint, i.e. a=a∗,{\displaystyle a=a^{*},} is sometimes known as Kadison's inequality.

Theorem (Modified Schwarz inequality for 2-positive maps).[20] For a 2-positive map ϕ{\displaystyle \phi } between C*-algebras, for all a,b{\displaystyle a,b} in its domain,