Cauchy-Schwarz Inequality¶
Cauchy-Schwarz inequality is a popular inequality that can be derived from the idea of projections. This is the statement of the inequality:
Statement¶
If \(x\) and \(y\) are two vectors in \(\mathbb{R}^{n}\), then:
Projection¶
If \(y = 0\), then \(x^Ty = 0\) and \(||y||=0\). The inequality holds in this case. For the rest of the proof, we will assume that \(y \neq 0\).
First, let us look at the projection of \(x\) on \(y\). This is going to be some scalar multiple of \(y\) that we call \(ty\). Since the error vector is orthogonal to \(y\), we have:
Note that we have used the fact that \(y^Ty > 0\) in the last step. The projection of \(x\) on \(y\) is therefore:
Now that we have the projection, we can move to the inequality.
Inequality¶
The basic idea behind the inequality is that the length of the error vector, \(||e||\), is greater than or equal to zero. It is zero if and only if \(x\) is parallel to the vector \(y\):
Let us now substitute \(t = \cfrac{x^Ty}{y^Ty}\):
The equality occurs when \(x = ty\) or when \(x\) is parallel (anti-parallel) to \(y\).