Types of Inner Products
An inner product multiplies two vectors to give a number, which determines lengths and angles, and different inner products give different geometries. The dot product is the standard inner product on $\reals^n$. A weighted inner product $x\trans W y$ stretches some directions more than others, and the $L^2$ inner product does the same job for functions, with an integral in place of a sum.
Definitions
Consider two vectors $x = (x_1, \dots, x_n)$ and $y = (y_1, \dots, y_n)$ in $\reals^n$. The dot product of $x$ and $y$ is
\[x \cdot y = x_1 y_1 + x_2 y_2 + \dots + x_n y_n.\]Consider the vector space $\reals^n$, with vectors written as columns. The dot product is the standard inner product on $\reals^n$,
\[x \cdot y = x\trans y.\]Examples
-
$(x, y) \mapsto x_1 y_1 + x_2 y_2$ is the dot product on $\reals^2$.
Non-examplesThings that may be mistaken for examples of this term.
-
$(x, y) \mapsto 2 x_1 y_1 + x_2 y_2$ is not the dot product, because of the factor $2$.
Properties
- $x \cdot y = \norm{x} \norm{y} \cos \theta$, where $\theta$ is the angle between $x$ and $y$. In particular, $x \cdot y = 0$ exactly when $x$ and $y$ are perpendicular (or one of them is zero).
Consider a symmetric positive definite $n \times n$ matrix $W$. The weighted inner product with weight $W$ is the inner product on $\reals^n$ given by
\[\ip{x}{y}_W = x\trans W y.\]Properties
- With $W = I$, the weighted inner product is the dot product.
- Every inner product on $\reals^n$ is a weighted inner product for some symmetric positive definite $W$, namely the matrix $W = [w_{ij}]$ with the entries $w_{ij} = \ip{e_i}{e_j}$.
- Whether two vectors are orthogonal depends on the inner product: vectors that are perpendicular for the dot product need not be orthogonal for a weighted inner product.
Consider two real-valued functions $f$ and $g$ on an interval $[a, b]$ such that $\int_a^b f(t)^2 \dt$ and $\int_a^b g(t)^2 \dt$ are finite. The $L^2$ inner product of $f$ and $g$ is
\[\ip{f}{g} = \int_a^b f(t) g(t) \dt.\]Properties
- The $L^2$ inner product is the continuous analog of the dot product: the sum over entries becomes an integral over the interval.
- Its norm $\norm{f} = \sqrt{\int_a^b f(t)^2 \dt}$ measures the size of $f$ on average, and two functions that differ only at finitely many points have distance $0$.
- The functions $\sin(k t)$ for $k = 1, 2, \dots$ are orthogonal in the $L^2$ inner product on $[0, 2\pi]$, which is the basis of Fourier series.
Examples
Each cell is the inner product of the two vectors or functions in that row.
| Example | dot product | weighted inner product | L² inner product | Why |
|---|---|---|---|---|
Missing example: vectors_1_2_and_3_minus_1 | ||||
Missing example: vectors_1_0_and_0_1_with_weight | ||||
Missing example: functions_1_and_t_on_0_1 | ||||
Notes
- Each inner product gives a norm, $\norm{x} = \sqrt{\ip{x}{x}}$, and a distance, $\norm{x - y}$. The dot product gives the Euclidean norm.
- For complex vectors, the standard inner product is $\ip{x}{y} = \sum_i x_i \conj{y_i}$, with a complex conjugate, so that $\ip{x}{x}$ is a nonnegative real number.
- An inner product is defined only on a vector space, because the definition requires it to be linear in each argument. The dot product and weighted inner products need $\reals^n$ (or coordinates for a finite-dimensional space), and the $L^2$ inner product needs functions whose squares are integrable.