logo

Inner product in Euclidean space 📂Vector Analysis

Inner product in Euclidean space

Definition

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

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

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

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

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

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

In particular, when $\mathbb{x} = (x_{1}, x_{2}, \cdots , x_{n})$ and $\mathbb{y} = (y_{1}, y_{2}, \cdots , y_{n})$,

$$ \left< \mathbb{x} , \mathbb{y}\right> = \mathbb{x} \cdot \mathbb{y} = x_{1} y_{1} + x_{2} y_{2} + \cdots + x_{n} y_{n} = \mathbb{x}^T \mathbb{y} $$

is defined as the dot product or Euclidean inner product.

Explanation

The concept of vector spaces itself can be generalized for any field $\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 $n$ dimensions, and loses its geometric properties, which can bring great confusion to the definitions of size or angle between vectors.

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

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

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

[4] When $\mathbb{x} \cdot \mathbb{y} = 0$, $\mathbb{x}$ and $\mathbb{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

$$ \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 $t \in \mathbb{R}$,

$$ ( t \mathbb{x} + \mathbb{y} ) ^2 = t^2 (\mathbb{x} \cdot \mathbb{x}) + 2t (\mathbb{x} \cdot \mathbb{y} )+ ( \mathbb{y} \cdot \mathbb{y} ) $$

Since $t$ is a real number, by the quadratic formula it must be $(\mathbb{x} \cdot \mathbb{y})^2 - ( \mathbb{x} \cdot \mathbb{x} )( \mathbb{y} \cdot \mathbb{y} ) \le 0$.

Generalized Pythagorean Theorem

Suppose two vectors $\mathbb{x}$ and $\mathbb{y}$ are perpendicular, then $\left\| \mathbb{x} \right\|^2 + \left\| \mathbb{y} \right\|^2 = \left\| \mathbb{x} +\mathbb{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

$$ \begin{align*} \left\| \mathbb{x} +\mathbb{y} \right\|^2 =& ( \mathbb{x} + \mathbb{y} ) ^2 \\ =& (\mathbb{x} \cdot \mathbb{x}) + 2 (\mathbb{x} \cdot \mathbb{y} )+ ( \mathbb{y} \cdot \mathbb{y} ) \\ &= \left\| \mathbb{x} \right\|^2 + 2 (\mathbb{x} \cdot \mathbb{y} ) + \left\| \mathbb{y} \right\|^2 \end{align*} $$

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

A More Generalized Pythagorean Theorem

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

$$ \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 $n$ vectors.

Proof

According to the above definition, the following holds:

$$ \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:

$$ \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, $\left< \mathbf{a}_i,\ \mathbf{a}_j \right>=\delta_{ij}$, so only the inner products of the same vectors remain, and the rest are $0$. Therefore,

$$ \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*} $$