logo

Inner product in Euclidean space 📂Vector Analysis

Inner product in Euclidean space

Definition

Let’s say V=RnV = \mathbb{R}^n for a vector space, and also x,y,zV\mathbf{x}, \mathbf{y}, \mathbf{z} \in V and kRk \in \mathbb{R}.

<,>:V2R\left< \cdot , \cdot \right> : V^2 \to \mathbb{R} is defined as the inner product on VV when it satisfies the following four conditions:

(1) Symmetry: <x,y>=<y,x>\left< \mathbf{x} , \mathbf{y} \right> = \left< \mathbf{y}, \mathbf{x} \right>

(2) Additivity: <x+y,z>=<x,z>+<y,z>\left< \mathbf{x} + \mathbf{y} , \mathbf{z} \right> = \left< \mathbf{x}, \mathbf{z} \right> + \left< \mathbf{y}, \mathbf{z} \right>

(3) Homogeneity: <kx,y>=k<x,y>\left< k \mathbf{x} , \mathbf{y} \right> = k \left< \mathbf{x}, \mathbf{y} \right>

(4) Positive-definiteness: <x,x>0\left< \mathbf{x} , \mathbf{x} \right> \ge 0 and <x,x>=0    x=0\left< \mathbf{x} , \mathbf{x} \right> =0 \iff \mathbf{x}=\mathbb{0}

In particular, when x=(x1,x2,,xn)\mathbf{x} = (x_{1}, x_{2}, \cdots , x_{n}) and y=(y1,y2,,yn)\mathbf{y} = (y_{1}, y_{2}, \cdots , y_{n}),

<x,y>=xy=x1y1+x2y2++xnyn=xTy \left< \mathbf{x} , \mathbf{y}\right> = \mathbf{x} \cdot \mathbf{y} = x_{1} y_{1} + x_{2} y_{2} + \cdots + x_{n} y_{n} = \mathbf{x}^T \mathbf{y}

is defined as the dot product or Euclidean inner product.

Explanation

The concept of vector spaces itself can be generalized for any field F\mathbb{F}. Naturally, the inner product can also be generalized, but in the basic level of linear algebra, it is common to deal only with Euclidean spaces.

However, the reason why inner product is confusing when learned in university is that it is sufficiently generalized compared to high school level. When considering the inner product by itself, if there exists a mapping that satisfies the conditions, there’s no particular reason to multiply components. The difference starts from ’the inner product we knew’ becoming ‘one of the inner products we learn in university’, which is the dot product. Not only that, it is generalized for nn dimensions, and loses its geometric properties, which can bring great confusion to the definitions of size or angle between vectors.

  • [1]: x=xx\left\| \mathbf{x} \right\| = \sqrt{ \mathbf{x} \cdot \mathbf{x} } is defined as the size or length of x\mathbf{x}.

[2] d(x,y)=xyd(\mathbf{x}, \mathbf{y} ) = \left\| \mathbf{x} - \mathbf{y} \right\| is defined as the distance between x\mathbf{x} and y\mathbf{y}.

[3] For θ[0,π]\theta \in [0 , \pi], cosθ=xyxy\displaystyle \cos \theta = {{ \mathbf{x} \cdot \mathbf{y} } \over { \left\| \mathbf{x} \right\| \left\| \mathbf{y} \right\|}} is defined as the angle between x\mathbf{x} and y\mathbf{y}.

[4] When xy=0\mathbf{x} \cdot \mathbf{y} = 0, x\mathbf{x} and y\mathbf{y} are perpendicular is defined.

While up to 3 dimensions, it’s possible to manually calculate and visualize to see these definitions align with intuition, from 4 dimensions it becomes impossible. However, this kind of transcendental generalization is exactly the charm and strength of mathematics, and these definitions alone make it easy to generalize several theorems. See the two examples below.

Generalized Cauchy-Schwarz Inequality

xy<x,y> \left\| \mathbf{x} \right\| \left\| \mathbf{y} \right\| \ge \left< \mathbf{x} , \mathbf{y} \right>


The Cauchy-Schwarz Inequality originally holds for four unknowns but can be easily generalized using the inner product.

Proof

For an arbitrary scalar tRt \in \mathbb{R},

(tx+y)2=t2(xx)+2t(xy)+(yy) ( t \mathbf{x} + \mathbf{y} ) ^2 = t^2 (\mathbf{x} \cdot \mathbf{x}) + 2t (\mathbf{x} \cdot \mathbf{y} )+ ( \mathbf{y} \cdot \mathbf{y} )

Since tt is a real number, by the quadratic formula it must be (xy)2(xx)(yy)0(\mathbf{x} \cdot \mathbf{y})^2 - ( \mathbf{x} \cdot \mathbf{x} )( \mathbf{y} \cdot \mathbf{y} ) \le 0.

Generalized Pythagorean Theorem

Suppose two vectors x\mathbf{x} and y\mathbf{y} are perpendicular, then x2+y2=x+y2\left\| \mathbf{x} \right\|^2 + \left\| \mathbf{y} \right\|^2 = \left\| \mathbf{x} +\mathbf{y} \right\|^2


The Pythagorean Theorem also was originally valid for triangles on the plane. To generalize it, one needs to use the Pythagorean Theorem of a lower dimension step by step as we go higher in dimension, but using inner product makes it much easier and concise.

Proof

x+y2=(x+y)2=(xx)+2(xy)+(yy)=x2+2(xy)+y2 \begin{align*} \left\| \mathbf{x} +\mathbf{y} \right\|^2 =& ( \mathbf{x} + \mathbf{y} ) ^2 \\ =& (\mathbf{x} \cdot \mathbf{x}) + 2 (\mathbf{x} \cdot \mathbf{y} )+ ( \mathbf{y} \cdot \mathbf{y} ) \\ &= \left\| \mathbf{x} \right\|^2 + 2 (\mathbf{x} \cdot \mathbf{y} ) + \left\| \mathbf{y} \right\|^2 \end{align*}

By the definition of the inner angle, (xy)=cosθx2y2(\mathbf{x} \cdot \mathbf{y} ) = \cos{\theta} \left\| \mathbf{x} \right\|^2 \left\| \mathbf{y} \right\|^2 and since x\mathbf{x} and y\mathbf{y} are perpendicular to each other cosθ=0\cos{\theta} = 0

A More Generalized Pythagorean Theorem

Let’s assume a1, a2, , an\mathbf{a}_1,\ \mathbf{a}_2,\ \cdots,\ \mathbf{a}_n are vectors perpendicular to each other. Then, the following formula holds:

a1+a2++an2=a12+a22++an2 \left\| \mathbf{a}_1+\mathbf{a}_2+\cdots+\mathbf{a}_n \right\|^2 = \left\| \mathbf{a}_1 \right\|^2 + \left\| \mathbf{a}_2 \right\|^2 +\cdots+ \left\| \mathbf{a}_n \right\|^2


This theorem is a generalization of the above for nn vectors.

Proof

According to the above definition, the following holds:

a1+a2++an2=<a1+a2++an, a1+a2++an> \left\| \mathbf{a}_1+\mathbf{a}_2+\cdots+\mathbf{a}_n \right\| ^2=\left< \mathbf{a}_1 + \mathbf{a}_2 + \cdots + \mathbf{a}_n,\ \mathbf{a}_1 + \mathbf{a}_2+\cdots+\mathbf{a}_n \right>

By the additivity of the inner product, breaking down the above inner products results in:

<a1, a1>+<a1, a2>++<a1, an>+<a2, a1>+<a2, a2>++<a2, an>++<an, a1>+<an, a2>++<an, an> \begin{array} {l} \left< \mathbf{a}_1,\ \mathbf{a}_1 \right>+\left< \mathbf{a}_1,\ \mathbf{a}_2 \right>+\cdots+\left< \mathbf{a}_1,\ \mathbf{a}_n \right> \\ + \left< \mathbf{a}_2,\ \mathbf{a}_1 \right> + \left< \mathbf{a}_2,\ \mathbf{a}_2 \right>+\cdots+\left< \mathbf{a}_2,\ \mathbf{a}_n \right> \\ +\cdots \\ + \left< \mathbf{a}_n,\ \mathbf{a}_1 \right>+\left< \mathbf{a}_n,\ \mathbf{a}_2 \right>+\cdots +\left< \mathbf{a}_n,\ \mathbf{a}_n \right> \end{array}

Because of the assumption, <ai, aj>=δij\left< \mathbf{a}_i,\ \mathbf{a}_j \right>=\delta_{ij}, so only the inner products of the same vectors remain, and the rest are 00. Therefore,

a1+a2++an2=<a1, a1>+<a2, a2>++<an, an>=a12+a22++an2 \begin{align*} \left\| \mathbf{a}_1+\mathbf{a}_2+\cdots+\mathbf{a}_n \right\|^2 =& \left< \mathbf{a}_1,\ \mathbf{a}_1 \right> + \left< \mathbf{a}_2,\ \mathbf{a}_2 \right>+\cdots+\left< \mathbf{a}_n,\ \mathbf{a}_n \right> \\ =& \left\| \mathbf{a}_1 \right\|^2 + \left\| \mathbf{a}_2 \right\|^2 +\cdots+\left\| \mathbf{a}_n \right\|^2 \end{align*}