Dot product vs. inner product vs. bilinear form
Bilinear forms, inner products, and the dot product are all ways of multiplying two vectors to get a number, from the most general to the most specific. The dot product is one particular inner product on $\reals^n$. An inner product is a bilinear form that is also symmetric and positive definite.
dot product ⊂ inner products ⊂ bilinear forms
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^{\top} y.\]Examples
-
$(x, y) \mapsto x_1 y_1 + x_2 y_2$ on $\reals^2$
$(x, y) \mapsto x_1 y_1 + x_2 y_2$ is the dot product on $\reals^2$.
Non-examples
-
$(x, y) \mapsto 2 x_1 y_1 + x_2 y_2$ on $\reals^2$
$(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).
An inner product is a way of multiplying two vectors to get a number, generalizing the dot product, that gives a way to measure lengths and angles.
Consider a real vector space $V$ and a function $\ip{\cdot}{\cdot} : V \times V \to \reals$. The function is an inner product if
- it is linear in its first argument: $\ip{a x + y}{z} = a \ip{x}{z} + \ip{y}{z}$ for all $x, y, z \in V$ and $a \in \reals$,
- it is symmetric: $\ip{x}{y} = \ip{y}{x}$ for all $x, y \in V$, and
- it is positive definite: $\ip{x}{x} > 0$ for for all $x \neq 0 in $V$.
Consider a vector space $V$ over $\mathbb{F}$, where $\mathbb{F}$ is $\reals$ or $\mathbb{C}$, and a sesquilinear form $\ip{\cdot}{\cdot}$ on $V$: a function $V \times V \to \mathbb{F}$ that is linear in its first argument and conjugate-linear in its second. The form is an inner product if, for all $x, y \in V$,
- it is Hermitian: $\ip{x}{y} = \overline{\ip{y}{x}}$, and
- it is positive definite: $\ip{x}{x} > 0$ for $x \neq 0$.
Over $\reals$, a sesquilinear form is a bilinear form, and Hermitian means symmetric.
Examples
-
$(x, y) \mapsto 2 x_1 y_1 + x_2 y_2$ on $\reals^2$
$(x, y) \mapsto 2 x_1 y_1 + x_2 y_2$ is an inner product, because it is symmetric and positive definite.
-
$(x, y) \mapsto x_1 y_1 + x_2 y_2$ on $\reals^2$
$(x, y) \mapsto x_1 y_1 + x_2 y_2$ is an inner product: the dot product on $\reals^2$.
Non-examples
-
$x \mapsto \abs{x_1} + \abs{x_2}$ on $\reals^2$
$x \mapsto \abs{x_1} + \abs{x_2}$ does not come from an inner product, because it fails the parallelogram law: with $x = (1, 0)$ and $y = (0, 1)$, $\norm{x + y}^2 + \norm{x - y}^2 = 8$, but $2 \norm{x}^2 + 2 \norm{y}^2 = 4$.
-
$(x, y) \mapsto x_1 y_1 - x_2 y_2$ on $\reals^2$
$(x, y) \mapsto x_1 y_1 - x_2 y_2$ is not an inner product, because it is not positive definite: $(0, 1)$ paired with itself gives $-1$.
Consider a vector space $V$. The function $B : V \times V \to \reals$ is a bilinear form on $V$ if $B$ is linear in each argument when the other is held fixed. It need not be symmetric or positive.
Examples
-
$(x, y) \mapsto 2 x_1 y_1 + x_2 y_2$ on $\reals^2$
$(x, y) \mapsto 2 x_1 y_1 + x_2 y_2$ is a bilinear form, because it is linear in $x$ and in $y$.
-
$(x, y) \mapsto x_1 y_1 - x_2 y_2$ on $\reals^2$
$(x, y) \mapsto x_1 y_1 - x_2 y_2$ is a bilinear form.
-
$(x, y) \mapsto x_1 y_1 + x_2 y_2$ on $\reals^2$
$(x, y) \mapsto x_1 y_1 + x_2 y_2$ on $\reals^2$ is an inner product and a bilinear form, because it is the dot product.
Properties
- Every bilinear form on $\reals^n$ has the form $B(x, y) = x^{\top} A y$ for a unique matrix $A$, and $B$ is symmetric if and only if $A$ is.
Examples
| Example | dot product | inner product | bilinear form | Why |
|---|---|---|---|---|
| $(x, y) \mapsto x_1 y_1 + x_2 y_2$ on $\reals^2$ | ✓ | ✓ | ✓ | |
| $(x, y) \mapsto 2 x_1 y_1 + x_2 y_2$ on $\reals^2$ | ✗ | ✓ | ✓ | |
| $(x, y) \mapsto x_1 y_1 - x_2 y_2$ on $\reals^2$ | – | ✗ | ✓ |
Notes
-
A bilinear form $B$ is symmetric if $B(x, y) = B(y, x)$, and positive definite if $B(x, x) > 0$ for every $x \neq 0$.
-
On a complex vector space, an inner product is conjugate symmetric and linear in only one argument (sesquilinear), so it is not a bilinear form.