Logo
Published on

Vectors in Linear Algebra and the Cauchy-Schwarz Inequality

Authors
  • avatar
    Name
    Vu Hung
    Twitter

Problem Statement

In high school, we typically visualize vectors as arrows pointing in 2D or 3D space. However, in higher mathematics and computer science, vectors are generalized as finite sequences of real numbers, e.g., a=(a1,a2,,an)\mathbf{a} = (a_1, a_2, \dots, a_n). This generalisation forms the basis of Linear Algebra, where vectors are used to represent data, change coordinate systems, and perform complex statistical modelling.

One of the most important theoretical bridges between physical geometry and abstract algebra is the Cauchy-Schwarz Inequality. It stems directly from the geometric definition of the dot product and provides a fundamental upper bound for the multiplication of sequences.

Consider two non-zero vectors in 3D space: u=(u1,u2,u3)\mathbf{u} = (u_1, u_2, u_3) and v=(v1,v2,v3)\mathbf{v} = (v_1, v_2, v_3).

(a) State the geometric definition of the dot product uv\mathbf{u} \cdot \mathbf{v}.

(b) Using the fact that the maximum value of cosθ\cos\theta is 1, derive the vector form of the Cauchy-Schwarz inequality: uvuv|\mathbf{u} \cdot \mathbf{v}| \le |\mathbf{u}| |\mathbf{v}|.

(c) Expand this vector inequality into its algebraic form to show that for any real numbers u1,u2,u3u_1, u_2, u_3 and v1,v2,v3v_1, v_2, v_3: (u1v1+u2v2+u3v3)2(u12+u22+u32)(v12+v22+v32)(u_1v_1 + u_2v_2 + u_3v_3)^2 \le (u_1^2 + u_2^2 + u_3^2)(v_1^2 + v_2^2 + v_3^2)

(d) When does the equality hold true?


Hints

  • Part (a): The geometric definition links the dot product to the magnitudes of the vectors and the angle θ\theta between them.
  • Part (b): Start with the definition from (a). Take the absolute value of both sides. What is the maximum possible value for cosθ|\cos\theta|? Use this to establish a "less than or equal to" relationship.
  • Part (c): Take the inequality uvuv|\mathbf{u} \cdot \mathbf{v}| \le |\mathbf{u}| |\mathbf{v}| and square both sides. Then, substitute the algebraic definitions for the dot product (uv=u1v1+u2v2+u3v3\mathbf{u} \cdot \mathbf{v} = u_1v_1 + u_2v_2 + u_3v_3) and the square of the magnitudes (u2=u12+u22+u32|\mathbf{u}|^2 = u_1^2 + u_2^2 + u_3^2).
  • Part (d): Equality happens when cosθ=±1\cos\theta = \pm 1. What does this mean geometrically for the vectors u\mathbf{u} and v\mathbf{v}?

Solutions

Part (a): Geometric Definition

  1. The geometric definition of the dot product of two vectors u\mathbf{u} and v\mathbf{v} is: uv=uvcosθ\mathbf{u} \cdot \mathbf{v} = |\mathbf{u}| |\mathbf{v}| \cos\theta where θ\theta is the angle between the two vectors (0θπ0 \le \theta \le \pi).

Part (b): Deriving Vector Cauchy-Schwarz

  1. Start with the definition: uv=uvcosθ\mathbf{u} \cdot \mathbf{v} = |\mathbf{u}| |\mathbf{v}| \cos\theta
  2. Take the absolute value of both sides (since lengths are positive, we only need to apply it to the left side and the cosine term): uv=uvcosθ|\mathbf{u} \cdot \mathbf{v}| = |\mathbf{u}| |\mathbf{v}| |\cos\theta|
  3. We know from trigonometry that the cosine function is bounded between 1-1 and 11. Therefore, its absolute value is bounded by 11: cosθ1|\cos\theta| \le 1
  4. Substitute this maximum value into our equation to create an inequality: uvuv(1)|\mathbf{u} \cdot \mathbf{v}| \le |\mathbf{u}| |\mathbf{v}| (1) uvuv|\mathbf{u} \cdot \mathbf{v}| \le |\mathbf{u}| |\mathbf{v}| This is the vector form of the Cauchy-Schwarz inequality.

Part (c): Expanding to Algebraic Form

  1. Square both sides of the vector inequality to remove the absolute value and square root signs: (uv)2u2v2(\mathbf{u} \cdot \mathbf{v})^2 \le |\mathbf{u}|^2 |\mathbf{v}|^2
  2. Recall the algebraic definition of the dot product for 3D vectors: uv=u1v1+u2v2+u3v3\mathbf{u} \cdot \mathbf{v} = u_1v_1 + u_2v_2 + u_3v_3
  3. Recall the definition of the squared magnitude: u2=u12+u22+u32|\mathbf{u}|^2 = u_1^2 + u_2^2 + u_3^2 v2=v12+v22+v32|\mathbf{v}|^2 = v_1^2 + v_2^2 + v_3^2
  4. Substitute these algebraic definitions back into the squared inequality: (u1v1+u2v2+u3v3)2(u12+u22+u32)(v12+v22+v32)(u_1v_1 + u_2v_2 + u_3v_3)^2 \le (u_1^2 + u_2^2 + u_3^2)(v_1^2 + v_2^2 + v_3^2) This is the algebraic form of Cauchy-Schwarz for three variables. (This logic easily extends to nn variables!).

Part (d): Conditions for Equality

  1. Looking back at step (b), the inequality was formed because we replaced cosθ|\cos\theta| with its maximum value, 11.
  2. Therefore, the equality holds exactly when cosθ=1|\cos\theta| = 1.
  3. This occurs when θ=0\theta = 0 or θ=π\theta = \pi.
  4. Geometrically, this means the vectors are either pointing in the exact same direction or exact opposite directions. In other words, they are parallel (or collinear).
  5. Algebraically, equality holds when one vector is a scalar multiple of the other: u=kv\mathbf{u} = k\mathbf{v} for some real number kk.

Takeaways

  • Beyond Geometry: The Cauchy-Schwarz inequality is a perfect example of a theorem rooted in visual geometry (cosθ\cos\theta) that yields a profoundly powerful tool for pure algebra and inequalities.
  • Generalisation: While we proved it for 3D vectors, because a vector can be defined as an nn-dimensional sequence, this inequality holds true for any number of variables. This is heavily used in statistics and data science.
  • Equality Conditions: In inequality proofs, determining when the equality holds is just as important as the inequality itself. For Cauchy-Schwarz, it's always when the "vectors" are proportional.

Further Readings


Connect with me

If you want to master the bridge between vectors and algebraic inequalities, check out the comprehensive booklets on Vu's Maths Hub. I post detailed walkthroughs of tricky proofs on my YouTube channel. For more mathematical insights, follow me on Instagram and subscribe to my Substack.