
In mathematics, an inner product space (or, rarely, a Hausdorff pre-Hilbert space) is a real vector space or a complex vector space with an operation called an inner product. The inner product of two vectors in the space is a scalar, often denoted with angle brackets such as in . Inner products allow formal definitions of intuitive geometric notions, such as lengths, angles, and orthogonality (zero inner product) of vectors. Inner product spaces generalize Euclidean vector spaces, in which the inner product is the dot product or scalar product of Cartesian coordinates. Inner product spaces of infinite dimension are widely used in functional analysis. Inner product spaces over the field of complex numbers are sometimes referred to as unitary spaces. The first usage of the concept of a vector space with an inner product is due to Giuseppe Peano, in 1898.


An inner product naturally induces an associated norm, (denoted and in the picture); so, every inner product space is a normed vector space. If this normed space is also complete (that is, a Banach space) then the inner product space is a Hilbert space. If an inner product space H is not a Hilbert space, it can be extended by completion to a Hilbert space This means that is a linear subspace of the inner product of is the restriction of that of and is dense in for the topology defined by the norm.
Definition
In this article, F denotes a field that is either the real numbers or the complex numbers
A scalar is thus an element of F. A bar over an expression representing a scalar denotes the complex conjugate of this scalar. A zero vector is denoted
for distinguishing it from the scalar 0.
An inner product space is a vector space V over the field F together with an inner product, that is, a map
that satisfies the following three properties for all vectors and all scalars
.
- Conjugate symmetry:
As
if and only if
is real, conjugate symmetry implies that
is always a real number. If F is
, conjugate symmetry is just symmetry.
- Linearity in the first argument:
- Positive-definiteness: if
is not zero, then
(conjugate symmetry implies that
is real).
If the positive-definiteness condition is replaced by merely requiring that for all
, then one obtains the definition of positive semi-definite Hermitian form. A positive semi-definite Hermitian form
is an inner product if and only if for all
, if
then
.
Basic properties
In the following properties, which result almost immediately from the definition of an inner product, x, y and z are arbitrary vectors, and a and b are arbitrary scalars.
is real and nonnegative.
if and only if
This implies that an inner product is a sesquilinear form.where
denotes the real part of its argument.
Over , conjugate-symmetry reduces to symmetry, and sesquilinearity reduces to bilinearity. Hence an inner product on a real vector space is a positive-definite symmetric bilinear form. The binomial expansion of a square becomes
Notation
Several notations are used for inner products, including ,
,
and
, as well as the usual dot product.
Convention variant
Some authors, especially in physics and matrix algebra, prefer to define inner products and sesquilinear forms with linearity in the second argument rather than the first. Then the first argument becomes conjugate linear, rather than the second. Bra-ket notation in quantum mechanics also uses slightly different notation, i.e. , where
.
Examples
Real and complex numbers
Among the simplest examples of inner product spaces are and
The real numbers
are a vector space over
that becomes an inner product space with arithmetic multiplication as its inner product:
The complex numbers are a vector space over
that becomes an inner product space with the inner product
Unlike with the real numbers, the assignment
does not define a complex inner product on
Euclidean vector space
More generally, the real -space
with the dot product is an inner product space, an example of a Euclidean vector space.
where
is the transpose of
A function is an inner product on
if and only if there exists a symmetric positive-definite matrix
such that
for all
If
is the identity matrix then
is the dot product. For another example, if
and
is positive-definite (which happens if and only if
and one/both diagonal elements are positive) then for any
As mentioned earlier, every inner product on
is of this form (where
and
satisfy
).
Complex coordinate space
The general form of an inner product on is known as the Hermitian form and is given by
where
is any Hermitian positive-definite matrix and
is the conjugate transpose of
For the real case, this corresponds to the dot product of the results of directionally-different scaling of the two vectors, with positive scale factors and orthogonal directions of scaling. It is a weighted-sum version of the dot product with positive weights—up to an orthogonal transformation.
Hilbert space
The article on Hilbert spaces has several examples of inner product spaces, wherein the metric induced by the inner product yields a complete metric space. An example of an inner product space which induces an incomplete metric is the space of continuous complex valued functions
and
on the interval
The inner product is
This space is not complete; consider for example, for the interval [−1, 1] the sequence of continuous "step" functions,
defined by:
This sequence is a Cauchy sequence for the norm induced by the preceding inner product, which does not converge to a continuous function.
Random variables
For real random variables and
the expected value of their product
is an inner product. In this case,
if and only if
(that is,
almost surely), where
denotes the probability of the event. This definition of expectation as inner product can be extended to random vectors as well.
Complex matrices
The inner product for complex square matrices of the same size is the Frobenius inner product . Since trace and transposition are linear and the conjugation is on the second matrix, it is a sesquilinear operator. We further get Hermitian symmetry by,
Finally, since for
nonzero,
, we get that the Frobenius inner product is positive definite too, and so is an inner product.
Vector spaces with forms
On an inner product space, or more generally a vector space with a nondegenerate form (hence an isomorphism ), vectors can be sent to covectors (in coordinates, via transpose), so that one can take the inner product and outer product of two vectors—not simply of a vector and a covector.
Basic results, terminology, and definitions
Norm properties
Every inner product space induces a norm, called its canonical norm, that is defined by With this norm, every inner product space becomes a normed vector space.
So, every general property of normed vector spaces applies to inner product spaces. In particular, one has the following properties:
- Absolute homogeneity
-
for every
and
(this results from
).
- Triangle inequality
-
for
These two properties show that one has indeed a norm.
- Cauchy–Schwarz inequality
-
for every
with equality if and only if
and
are linearly dependent.
- Parallelogram law
-
for every
The parallelogram law is a necessary and sufficient condition for a norm to be defined by an inner product.
- Polarization identity
-
for every
The inner product can be retrieved from the norm by the polarization identity, since its imaginary part is the real part of
- Ptolemy's inequality
-
for every
Ptolemy's inequality is a necessary and sufficient condition for a seminorm to be the norm defined by an inner product.
Orthogonality
- Orthogonality
- Two vectors
and
are said to be orthogonal, often written
if their inner product is zero, that is, if
This happens if and only iffor all scalars
and if and only if the real-valued function
is non-negative. (This is a consequence of the fact that, if
then the scalar
minimizes
with value
which is always non positive).
For a complex inner product spacea linear operator
is identically
if and only if
for every
This is not true in general for real inner product spaces, as it is a consequence of conjugate symmetry being distinct from symmetry for complex inner products. A counterexample in a real inner product space is
a 90° rotation in
, which maps every vector to an orthogonal vector but is not identically
.
- Orthogonal complement
- The orthogonal complement of a subset
is the set
of the vectors that are orthogonal to all elements of C; that is,
This set
is always a closed vector subspace of
and if the closure
of
in
is a vector subspace then
- Pythagorean theorem
- If
and
are orthogonal, then
This may be proved by expressing the squared norms in terms of the inner products, using additivity for expanding the right-hand side of the equation.
The name Pythagorean theorem arises from the geometric interpretation in Euclidean geometry. - Parseval's identity
- An induction on the Pythagorean theorem yields: if
are pairwise orthogonal, then
- Angle
- When
is a real number then the Cauchy–Schwarz inequality implies that
and thus that
is a real number. This allows defining the (non oriented) angle of two vectors in modern definitions of Euclidean geometry in terms of linear algebra. This is also used in data analysis, under the name "cosine similarity", for comparing two vectors of data. Furthermore, if
is negative, the angle
is larger than 90 degrees. This property is often used in computer graphics (e.g., in back-face culling) to analyze a direction without having to evaluate trigonometric functions.
Real and complex parts of inner products
Suppose that is an inner product on
(so it is antilinear in its second argument). The polarization identity shows that the real part of the inner product is
If is a real vector space then
and the imaginary part (also called the complex part) of
is always
Assume for the rest of this section that is a complex vector space. The polarization identity for complex vector spaces shows that
The map defined by for all
satisfies the axioms of the inner product except that it is antilinear in its first, rather than its second, argument. The real part of both
and
are equal to
but the inner products differ in their complex part:
The last equality is similar to the formula expressing a linear functional in terms of its real part.
These formulas show that every complex inner product is completely determined by its real part. Moreover, this real part defines an inner product on considered as a real vector space. There is thus a one-to-one correspondence between complex inner products on a complex vector space
and real inner products on
For example, suppose that for some integer
When
is considered as a real vector space in the usual way (meaning that it is identified with the
dimensional real vector space
with each
identified with
), then the dot product
defines a real inner product on this space. The unique complex inner product
on
induced by the dot product is the map that sends
to
(because the real part of this map
is equal to the dot product).
Real vs. complex inner products
Let denote
considered as a vector space over the real numbers rather than complex numbers. The real part of the complex inner product
is the map
which necessarily forms a real inner product on the real vector space
Every inner product on a real vector space is a bilinear and symmetric map.
For example, if with inner product
where
is a vector space over the field
then
is a vector space over
and
is the dot product
where
is identified with the point
(and similarly for
); thus the standard inner product
on
is an "extension" the dot product . Also, had
been instead defined to be the symmetric map
(rather than the usual conjugate symmetric map
) then its real part
would not be the dot product; furthermore, without the complex conjugate, if
but
then
so the assignment
would not define a norm.
The next examples show that although real and complex inner products have many properties and results in common, they are not entirely interchangeable. For instance, if then
but the next example shows that the converse is in general not true. Given any
the vector
(which is the vector
rotated by 90°) belongs to
and so also belongs to
(although scalar multiplication of
by
is not defined in
the vector in
denoted by
is nevertheless still also an element of
). For the complex inner product,
whereas for the real inner product the value is always
If is a complex inner product and
is a continuous linear operator that satisfies
for all
then
This statement is no longer true if
is instead a real inner product, as this next example shows. Suppose that
has the inner product
mentioned above. Then the map
defined by
is a linear map (linear for both
and
) that denotes rotation by
in the plane. Because
and
are perpendicular vectors and
is just the dot product,
for all vectors
nevertheless, this rotation map
is certainly not identically
In contrast, using the complex inner product gives
which (as expected) is not identically zero.
Orthonormal sequences
Let be a finite dimensional inner product space of dimension
Recall that every basis of
consists of exactly
linearly independent vectors. Using the Gram–Schmidt process we may start with an arbitrary basis and transform it into an orthonormal basis. That is, into a basis in which all the elements are orthogonal and have unit norm. In symbols, a basis
is orthonormal if
for every
and
for each index
This definition of orthonormal basis generalizes to the case of infinite-dimensional inner product spaces in the following way. Let be any inner product space. Then a collection
is a basis for
if the subspace of
generated by finite linear combinations of elements of
is dense in
(in the norm induced by the inner product). Say that
is an orthonormal basis for
if it is a basis and
if
and
for all
Using an infinite-dimensional analog of the Gram-Schmidt process one may show:
Theorem. Any separable inner product space has an orthonormal basis.
Using the Hausdorff maximal principle and the fact that in a complete inner product space orthogonal projection onto linear subspaces is well-defined, one may also show that
Theorem. Any complete inner product space has an orthonormal basis.
The two previous theorems raise the question of whether all inner product spaces have an orthonormal basis. The answer, it turns out is negative. This is a non-trivial result, and is proved below. The following proof is taken from Halmos's A Hilbert Space Problem Book (see the references).[citation needed]
Proof Recall that the dimension of an inner product space is the cardinality of a maximal orthonormal system that it contains (by Zorn's lemma it contains at least one, and any two have the same cardinality). An orthonormal basis is certainly a maximal orthonormal system but the converse need not hold in general. If is a dense subspace of an inner product space
then any orthonormal basis for
is automatically an orthonormal basis for
Thus, it suffices to construct an inner product space
with a dense subspace
whose dimension is strictly smaller than that of
Let
be a Hilbert space of dimension
(for instance,
). Let
be an orthonormal basis of
so
Extend
to a Hamel basis
for
where
Since it is known that the Hamel dimension of
is
the cardinality of the continuum, it must be that
Let
be a Hilbert space of dimension
(for instance,
). Let
be an orthonormal basis for
and let
be a bijection. Then there is a linear transformation
such that
for
and
for
Let
and let
be the graph of
Let
be the closure of
in
; we will show
Since for any
we have
it follows that
Next, if
then
for some
so
; since
as well, we also have
It follows that
so
and
is dense in
Finally,
is a maximal orthonormal set in
; if
for all
then
so
is the zero vector in
Hence the dimension of
is
whereas it is clear that the dimension of
is
This completes the proof.
Parseval's identity leads immediately to the following theorem:
Theorem. Let be a separable inner product space and
an orthonormal basis of
Then the map
is an isometric linear map
with a dense image.
This theorem can be regarded as an abstract form of Fourier series, in which an arbitrary orthonormal basis plays the role of the sequence of trigonometric polynomials. Note that the underlying index set can be taken to be any countable set (and in fact any set whatsoever, provided is defined appropriately, as is explained in the article Hilbert space). In particular, we obtain the following result in the theory of Fourier series:
Theorem. Let be the inner product space
Then the sequence (indexed on set of all integers) of continuous functions
is an orthonormal basis of the space
with the
inner product. The mapping
is an isometric linear map with dense image.
Orthogonality of the sequence follows immediately from the fact that if
then
Normality of the sequence is by design, that is, the coefficients are so chosen so that the norm comes out to 1. Finally the fact that the sequence has a dense algebraic span, in the inner product norm, follows from the fact that the sequence has a dense algebraic span, this time in the space of continuous periodic functions on with the uniform norm. This is the content of the Weierstrass theorem on the uniform density of trigonometric polynomials.
Operators on inner product spaces
Several types of linear maps between inner product spaces
and
are of relevance:
- Continuous linear maps:
is linear and continuous with respect to the metric defined above, or equivalently,
is linear and the set of non-negative reals
where
ranges over the closed unit ball of
is bounded.
- Symmetric linear operators:
is linear and
In mathematics an inner product space or rarely a Hausdorff pre Hilbert space is a real vector space or a complex vector space with an operation called an inner product The inner product of two vectors in the space is a scalar often denoted with angle brackets such as in a b displaystyle langle a b rangle Inner products allow formal definitions of intuitive geometric notions such as lengths angles and orthogonality zero inner product of vectors Inner product spaces generalize Euclidean vector spaces in which the inner product is the dot product or scalar product of Cartesian coordinates Inner product spaces of infinite dimension are widely used in functional analysis Inner product spaces over the field of complex numbers are sometimes referred to as unitary spaces The first usage of the concept of a vector space with an inner product is due to Giuseppe Peano in 1898 Geometric interpretation of the angle between two vectors defined using an inner productScalar product spaces over any field have scalar products that are symmetrical and linear in the first argument Hermitian product spaces are restricted to the field of complex numbers and have Hermitian products that are conjugate symmetrical and linear in the first argument Inner product spaces may be defined over any field having inner products that are linear in the first argument conjugate symmetrical and positive definite Unlike inner products scalar products and Hermitian products need not be positive definite An inner product naturally induces an associated norm denoted x displaystyle x and y displaystyle y in the picture so every inner product space is a normed vector space If this normed space is also complete that is a Banach space then the inner product space is a Hilbert space If an inner product space H is not a Hilbert space it can be extended by completion to a Hilbert space H displaystyle overline H This means that H displaystyle H is a linear subspace of H displaystyle overline H the inner product of H displaystyle H is the restriction of that of H displaystyle overline H and H displaystyle H is dense in H displaystyle overline H for the topology defined by the norm DefinitionIn this article F denotes a field that is either the real numbers R displaystyle mathbb R or the complex numbers C displaystyle mathbb C A scalar is thus an element of F A bar over an expression representing a scalar denotes the complex conjugate of this scalar A zero vector is denoted 0 displaystyle mathbf 0 for distinguishing it from the scalar 0 An inner product space is a vector space V over the field F together with an inner product that is a map V V F displaystyle langle cdot cdot rangle V times V to F that satisfies the following three properties for all vectors x y z V displaystyle x y z in V and all scalars a b F displaystyle a b in F Conjugate symmetry x y y x displaystyle langle x y rangle overline langle y x rangle As a a textstyle a overline a if and only if a displaystyle a is real conjugate symmetry implies that x x displaystyle langle x x rangle is always a real number If F is R displaystyle mathbb R conjugate symmetry is just symmetry Linearity in the first argument ax by z a x z b y z displaystyle langle ax by z rangle a langle x z rangle b langle y z rangle Positive definiteness if x displaystyle x is not zero then x x gt 0 displaystyle langle x x rangle gt 0 conjugate symmetry implies that x x displaystyle langle x x rangle is real If the positive definiteness condition is replaced by merely requiring that x x 0 displaystyle langle x x rangle geq 0 for all x displaystyle x then one obtains the definition of positive semi definite Hermitian form A positive semi definite Hermitian form displaystyle langle cdot cdot rangle is an inner product if and only if for all x displaystyle x if x x 0 displaystyle langle x x rangle 0 then x 0 displaystyle x mathbf 0 Basic properties In the following properties which result almost immediately from the definition of an inner product x y and z are arbitrary vectors and a and b are arbitrary scalars 0 x x 0 0 displaystyle langle mathbf 0 x rangle langle x mathbf 0 rangle 0 x x displaystyle langle x x rangle is real and nonnegative x x 0 displaystyle langle x x rangle 0 if and only if x 0 displaystyle x mathbf 0 x ay bz a x y b x z displaystyle langle x ay bz rangle overline a langle x y rangle overline b langle x z rangle This implies that an inner product is a sesquilinear form x y x y x x 2Re x y y y displaystyle langle x y x y rangle langle x x rangle 2 operatorname Re langle x y rangle langle y y rangle where Re displaystyle operatorname Re denotes the real part of its argument Over R displaystyle mathbb R conjugate symmetry reduces to symmetry and sesquilinearity reduces to bilinearity Hence an inner product on a real vector space is a positive definite symmetric bilinear form The binomial expansion of a square becomes x y x y x x 2 x y y y displaystyle langle x y x y rangle langle x x rangle 2 langle x y rangle langle y y rangle Notation Several notations are used for inner products including displaystyle langle cdot cdot rangle displaystyle left cdot cdot right displaystyle langle cdot cdot rangle and displaystyle left cdot cdot right as well as the usual dot product Convention variant Some authors especially in physics and matrix algebra prefer to define inner products and sesquilinear forms with linearity in the second argument rather than the first Then the first argument becomes conjugate linear rather than the second Bra ket notation in quantum mechanics also uses slightly different notation i e displaystyle langle cdot cdot rangle where x y y x displaystyle langle x y rangle left y x right ExamplesReal and complex numbers Among the simplest examples of inner product spaces are R displaystyle mathbb R and C displaystyle mathbb C The real numbers R displaystyle mathbb R are a vector space over R displaystyle mathbb R that becomes an inner product space with arithmetic multiplication as its inner product x y xy for x y R displaystyle langle x y rangle xy quad text for x y in mathbb R The complex numbers C displaystyle mathbb C are a vector space over C displaystyle mathbb C that becomes an inner product space with the inner product x y xy for x y C displaystyle langle x y rangle x overline y quad text for x y in mathbb C Unlike with the real numbers the assignment x y xy displaystyle x y mapsto xy does not define a complex inner product on C displaystyle mathbb C Euclidean vector space More generally the real n displaystyle n space Rn displaystyle mathbb R n with the dot product is an inner product space an example of a Euclidean vector space x1 xn y1 yn xTy i 1nxiyi x1y1 xnyn displaystyle left langle begin bmatrix x 1 vdots x n end bmatrix begin bmatrix y 1 vdots y n end bmatrix right rangle x textsf T y sum i 1 n x i y i x 1 y 1 cdots x n y n where xT displaystyle x operatorname T is the transpose of x displaystyle x A function Rn Rn R displaystyle langle cdot cdot rangle mathbb R n times mathbb R n to mathbb R is an inner product on Rn displaystyle mathbb R n if and only if there exists a symmetric positive definite matrix M displaystyle mathbf M such that x y xTMy displaystyle langle x y rangle x operatorname T mathbf M y for all x y Rn displaystyle x y in mathbb R n If M displaystyle mathbf M is the identity matrix then x y xTMy displaystyle langle x y rangle x operatorname T mathbf M y is the dot product For another example if n 2 displaystyle n 2 and M abbd displaystyle mathbf M begin bmatrix a amp b b amp d end bmatrix is positive definite which happens if and only if detM ad b2 gt 0 displaystyle det mathbf M ad b 2 gt 0 and one both diagonal elements are positive then for any x x1 x2 T y y1 y2 T R2 displaystyle x left x 1 x 2 right operatorname T y left y 1 y 2 right operatorname T in mathbb R 2 x y xTMy x1 x2 abbd y1y2 ax1y1 bx1y2 bx2y1 dx2y2 displaystyle langle x y rangle x operatorname T mathbf M y left x 1 x 2 right begin bmatrix a amp b b amp d end bmatrix begin bmatrix y 1 y 2 end bmatrix ax 1 y 1 bx 1 y 2 bx 2 y 1 dx 2 y 2 As mentioned earlier every inner product on R2 displaystyle mathbb R 2 is of this form where b R a gt 0 displaystyle b in mathbb R a gt 0 and d gt 0 displaystyle d gt 0 satisfy ad gt b2 displaystyle ad gt b 2 Complex coordinate space The general form of an inner product on Cn displaystyle mathbb C n is known as the Hermitian form and is given by x y y Mx x My displaystyle langle x y rangle y dagger mathbf M x overline x dagger mathbf M y where M displaystyle M is any Hermitian positive definite matrix and y displaystyle y dagger is the conjugate transpose of y displaystyle y For the real case this corresponds to the dot product of the results of directionally different scaling of the two vectors with positive scale factors and orthogonal directions of scaling It is a weighted sum version of the dot product with positive weights up to an orthogonal transformation Hilbert space The article on Hilbert spaces has several examples of inner product spaces wherein the metric induced by the inner product yields a complete metric space An example of an inner product space which induces an incomplete metric is the space C a b displaystyle C a b of continuous complex valued functions f displaystyle f and g displaystyle g on the interval a b displaystyle a b The inner product is f g abf t g t dt displaystyle langle f g rangle int a b f t overline g t mathrm d t This space is not complete consider for example for the interval 1 1 the sequence of continuous step functions fk k displaystyle f k k defined by fk t 0t 1 0 1t 1k 1 ktt 0 1k displaystyle f k t begin cases 0 amp t in 1 0 1 amp t in left tfrac 1 k 1 right kt amp t in left 0 tfrac 1 k right end cases This sequence is a Cauchy sequence for the norm induced by the preceding inner product which does not converge to a continuous function Random variables For real random variables X displaystyle X and Y displaystyle Y the expected value of their product X Y E XY displaystyle langle X Y rangle mathbb E XY is an inner product In this case X X 0 displaystyle langle X X rangle 0 if and only if P X 0 1 displaystyle mathbb P X 0 1 that is X 0 displaystyle X 0 almost surely where P displaystyle mathbb P denotes the probability of the event This definition of expectation as inner product can be extended to random vectors as well Complex matrices The inner product for complex square matrices of the same size is the Frobenius inner product A B tr AB displaystyle langle A B rangle operatorname tr left AB dagger right Since trace and transposition are linear and the conjugation is on the second matrix it is a sesquilinear operator We further get Hermitian symmetry by A B tr AB tr BA B A displaystyle langle A B rangle operatorname tr left AB dagger right overline operatorname tr left BA dagger right overline left langle B A right rangle Finally since for A displaystyle A nonzero A A ij Aij 2 gt 0 displaystyle langle A A rangle sum ij left A ij right 2 gt 0 we get that the Frobenius inner product is positive definite too and so is an inner product Vector spaces with forms On an inner product space or more generally a vector space with a nondegenerate form hence an isomorphism V V displaystyle V to V vectors can be sent to covectors in coordinates via transpose so that one can take the inner product and outer product of two vectors not simply of a vector and a covector Basic results terminology and definitionsNorm properties Every inner product space induces a norm called its canonical norm that is defined by x x x displaystyle x sqrt langle x x rangle With this norm every inner product space becomes a normed vector space So every general property of normed vector spaces applies to inner product spaces In particular one has the following properties Absolute homogeneity ax a x displaystyle ax a x for every x V displaystyle x in V and a F displaystyle a in F this results from ax ax aa x x displaystyle langle ax ax rangle a overline a langle x x rangle Triangle inequality x y x y displaystyle x y leq x y for x y V displaystyle x y in V These two properties show that one has indeed a norm Cauchy Schwarz inequality x y x y displaystyle langle x y rangle leq x y for every x y V displaystyle x y in V with equality if and only if x displaystyle x and y displaystyle y are linearly dependent Parallelogram law x y 2 x y 2 2 x 2 2 y 2 displaystyle x y 2 x y 2 2 x 2 2 y 2 for every x y V displaystyle x y in V The parallelogram law is a necessary and sufficient condition for a norm to be defined by an inner product Polarization identity x y 2 x 2 y 2 2Re x y displaystyle x y 2 x 2 y 2 2 operatorname Re langle x y rangle for every x y V displaystyle x y in V The inner product can be retrieved from the norm by the polarization identity since its imaginary part is the real part of x iy displaystyle langle x iy rangle Ptolemy s inequality x y z y z x x z y displaystyle x y z y z x geq x z y for every x y z V displaystyle x y z in V Ptolemy s inequality is a necessary and sufficient condition for a seminorm to be the norm defined by an inner product Orthogonality OrthogonalityTwo vectors x displaystyle x and y displaystyle y are said to be orthogonal often written x y displaystyle x perp y if their inner product is zero that is if x y 0 displaystyle langle x y rangle 0 This happens if and only if x x sy displaystyle x leq x sy for all scalars s displaystyle s and if and only if the real valued function f s x sy 2 x 2 displaystyle f s x sy 2 x 2 is non negative This is a consequence of the fact that if y 0 displaystyle y neq 0 then the scalar s0 x y y 2 displaystyle s 0 tfrac overline langle x y rangle y 2 minimizes f displaystyle f with value f s0 x y 2 y 2 displaystyle f left s 0 right tfrac langle x y rangle 2 y 2 which is always non positive For a complex inner product space H displaystyle H a linear operator T V V displaystyle T V to V is identically 0 displaystyle 0 if and only if x Tx displaystyle x perp Tx for every x V displaystyle x in V This is not true in general for real inner product spaces as it is a consequence of conjugate symmetry being distinct from symmetry for complex inner products A counterexample in a real inner product space is T displaystyle T a 90 rotation in R2 displaystyle mathbb R 2 which maps every vector to an orthogonal vector but is not identically 0 displaystyle 0 Orthogonal complementThe orthogonal complement of a subset C V displaystyle C subseteq V is the set C displaystyle C bot of the vectors that are orthogonal to all elements of C that is C y V y c 0 for all c C displaystyle C bot y in V langle y c rangle 0 text for all c in C This set C displaystyle C bot is always a closed vector subspace of V displaystyle V and if the closure clV C displaystyle operatorname cl V C of C displaystyle C in V displaystyle V is a vector subspace then clV C C displaystyle operatorname cl V C left C bot right bot Pythagorean theoremIf x displaystyle x and y displaystyle y are orthogonal then x 2 y 2 x y 2 displaystyle x 2 y 2 x y 2 This may be proved by expressing the squared norms in terms of the inner products using additivity for expanding the right hand side of the equation The name Pythagorean theorem arises from the geometric interpretation in Euclidean geometry Parseval s identityAn induction on the Pythagorean theorem yields if x1 xn displaystyle x 1 ldots x n are pairwise orthogonal then i 1n xi 2 i 1nxi 2 displaystyle sum i 1 n x i 2 left sum i 1 n x i right 2 AngleWhen x y displaystyle langle x y rangle is a real number then the Cauchy Schwarz inequality implies that x y x y 1 1 textstyle frac langle x y rangle x y in 1 1 and thus that x y arccos x y x y displaystyle angle x y arccos frac langle x y rangle x y is a real number This allows defining the non oriented angle of two vectors in modern definitions of Euclidean geometry in terms of linear algebra This is also used in data analysis under the name cosine similarity for comparing two vectors of data Furthermore if x y displaystyle langle x y rangle is negative the angle x y displaystyle angle x y is larger than 90 degrees This property is often used in computer graphics e g in back face culling to analyze a direction without having to evaluate trigonometric functions Real and complex parts of inner products Suppose that displaystyle langle cdot cdot rangle is an inner product on V displaystyle V so it is antilinear in its second argument The polarization identity shows that the real part of the inner product is Re x y 14 x y 2 x y 2 displaystyle operatorname Re langle x y rangle frac 1 4 left x y 2 x y 2 right If V displaystyle V is a real vector space then x y Re x y 14 x y 2 x y 2 displaystyle langle x y rangle operatorname Re langle x y rangle frac 1 4 left x y 2 x y 2 right and the imaginary part also called the complex part of displaystyle langle cdot cdot rangle is always 0 displaystyle 0 Assume for the rest of this section that V displaystyle V is a complex vector space The polarization identity for complex vector spaces shows that x y 14 x y 2 x y 2 i x iy 2 i x iy 2 Re x y iRe x iy displaystyle begin alignedat 4 langle x y rangle amp frac 1 4 left x y 2 x y 2 i x iy 2 i x iy 2 right amp operatorname Re langle x y rangle i operatorname Re langle x iy rangle end alignedat The map defined by x y y x displaystyle langle x mid y rangle langle y x rangle for all x y V displaystyle x y in V satisfies the axioms of the inner product except that it is antilinear in its first rather than its second argument The real part of both x y displaystyle langle x mid y rangle and x y displaystyle langle x y rangle are equal to Re x y displaystyle operatorname Re langle x y rangle but the inner products differ in their complex part x y 14 x y 2 x y 2 i x iy 2 i x iy 2 Re x y iRe x iy displaystyle begin alignedat 4 langle x mid y rangle amp frac 1 4 left x y 2 x y 2 i x iy 2 i x iy 2 right amp operatorname Re langle x y rangle i operatorname Re langle x iy rangle end alignedat The last equality is similar to the formula expressing a linear functional in terms of its real part These formulas show that every complex inner product is completely determined by its real part Moreover this real part defines an inner product on V displaystyle V considered as a real vector space There is thus a one to one correspondence between complex inner products on a complex vector space V displaystyle V and real inner products on V displaystyle V For example suppose that V Cn displaystyle V mathbb C n for some integer n gt 0 displaystyle n gt 0 When V displaystyle V is considered as a real vector space in the usual way meaning that it is identified with the 2n displaystyle 2n dimensional real vector space R2n displaystyle mathbb R 2n with each a1 ib1 an ibn Cn displaystyle left a 1 ib 1 ldots a n ib n right in mathbb C n identified with a1 b1 an bn R2n displaystyle left a 1 b 1 ldots a n b n right in mathbb R 2n then the dot product x y x1 x2n y1 y2n x1y1 x2ny2n displaystyle x cdot y left x 1 ldots x 2n right cdot left y 1 ldots y 2n right x 1 y 1 cdots x 2n y 2n defines a real inner product on this space The unique complex inner product displaystyle langle cdot cdot rangle on V Cn displaystyle V mathbb C n induced by the dot product is the map that sends c c1 cn d d1 dn Cn displaystyle c left c 1 ldots c n right d left d 1 ldots d n right in mathbb C n to c d c1d1 cndn displaystyle langle c d rangle c 1 overline d 1 cdots c n overline d n because the real part of this map displaystyle langle cdot cdot rangle is equal to the dot product Real vs complex inner products Let VR displaystyle V mathbb R denote V displaystyle V considered as a vector space over the real numbers rather than complex numbers The real part of the complex inner product x y displaystyle langle x y rangle is the map x y R Re x y VR VR R displaystyle langle x y rangle mathbb R operatorname Re langle x y rangle V mathbb R times V mathbb R to mathbb R which necessarily forms a real inner product on the real vector space VR displaystyle V mathbb R Every inner product on a real vector space is a bilinear and symmetric map For example if V C displaystyle V mathbb C with inner product x y xy displaystyle langle x y rangle x overline y where V displaystyle V is a vector space over the field C displaystyle mathbb C then VR R2 displaystyle V mathbb R mathbb R 2 is a vector space over R displaystyle mathbb R and x y R displaystyle langle x y rangle mathbb R is the dot product x y displaystyle x cdot y where x a ib V C displaystyle x a ib in V mathbb C is identified with the point a b VR R2 displaystyle a b in V mathbb R mathbb R 2 and similarly for y displaystyle y thus the standard inner product x y xy displaystyle langle x y rangle x overline y on C displaystyle mathbb C is an extension the dot product Also had x y displaystyle langle x y rangle been instead defined to be the symmetric map x y xy displaystyle langle x y rangle xy rather than the usual conjugate symmetric map x y xy displaystyle langle x y rangle x overline y then its real part x y R displaystyle langle x y rangle mathbb R would not be the dot product furthermore without the complex conjugate if x C displaystyle x in mathbb C but x R displaystyle x not in mathbb R then x x xx x2 0 displaystyle langle x x rangle xx x 2 not in 0 infty so the assignment x x x displaystyle x mapsto sqrt langle x x rangle would not define a norm The next examples show that although real and complex inner products have many properties and results in common they are not entirely interchangeable For instance if x y 0 displaystyle langle x y rangle 0 then x y R 0 displaystyle langle x y rangle mathbb R 0 but the next example shows that the converse is in general not true Given any x V displaystyle x in V the vector ix displaystyle ix which is the vector x displaystyle x rotated by 90 belongs to V displaystyle V and so also belongs to VR displaystyle V mathbb R although scalar multiplication of x displaystyle x by i 1 displaystyle i sqrt 1 is not defined in VR displaystyle V mathbb R the vector in V displaystyle V denoted by ix displaystyle ix is nevertheless still also an element of VR displaystyle V mathbb R For the complex inner product x ix i x 2 displaystyle langle x ix rangle i x 2 whereas for the real inner product the value is always x ix R 0 displaystyle langle x ix rangle mathbb R 0 If displaystyle langle cdot cdot rangle is a complex inner product and A V V displaystyle A V to V is a continuous linear operator that satisfies x Ax 0 displaystyle langle x Ax rangle 0 for all x V displaystyle x in V then A 0 displaystyle A 0 This statement is no longer true if displaystyle langle cdot cdot rangle is instead a real inner product as this next example shows Suppose that V C displaystyle V mathbb C has the inner product x y xy displaystyle langle x y rangle x overline y mentioned above Then the map A V V displaystyle A V to V defined by Ax ix displaystyle Ax ix is a linear map linear for both V displaystyle V and VR displaystyle V mathbb R that denotes rotation by 90 displaystyle 90 circ in the plane Because x displaystyle x and Ax displaystyle Ax are perpendicular vectors and x Ax R displaystyle langle x Ax rangle mathbb R is just the dot product x Ax R 0 displaystyle langle x Ax rangle mathbb R 0 for all vectors x displaystyle x nevertheless this rotation map A displaystyle A is certainly not identically 0 displaystyle 0 In contrast using the complex inner product gives x Ax i x 2 displaystyle langle x Ax rangle i x 2 which as expected is not identically zero Orthonormal sequencesLet V displaystyle V be a finite dimensional inner product space of dimension n displaystyle n Recall that every basis of V displaystyle V consists of exactly n displaystyle n linearly independent vectors Using the Gram Schmidt process we may start with an arbitrary basis and transform it into an orthonormal basis That is into a basis in which all the elements are orthogonal and have unit norm In symbols a basis e1 en displaystyle e 1 ldots e n is orthonormal if ei ej 0 displaystyle langle e i e j rangle 0 for every i j displaystyle i neq j and ei ei ea 2 1 displaystyle langle e i e i rangle e a 2 1 for each index i displaystyle i This definition of orthonormal basis generalizes to the case of infinite dimensional inner product spaces in the following way Let V displaystyle V be any inner product space Then a collection E ea a A displaystyle E left e a right a in A is a basis for V displaystyle V if the subspace of V displaystyle V generated by finite linear combinations of elements of E displaystyle E is dense in V displaystyle V in the norm induced by the inner product Say that E displaystyle E is an orthonormal basis for V displaystyle V if it is a basis and ea eb 0 displaystyle left langle e a e b right rangle 0 if a b displaystyle a neq b and ea ea ea 2 1 displaystyle langle e a e a rangle e a 2 1 for all a b A displaystyle a b in A Using an infinite dimensional analog of the Gram Schmidt process one may show Theorem Any separable inner product space has an orthonormal basis Using the Hausdorff maximal principle and the fact that in a complete inner product space orthogonal projection onto linear subspaces is well defined one may also show that Theorem Any complete inner product space has an orthonormal basis The two previous theorems raise the question of whether all inner product spaces have an orthonormal basis The answer it turns out is negative This is a non trivial result and is proved below The following proof is taken from Halmos s A Hilbert Space Problem Book see the references citation needed ProofRecall that the dimension of an inner product space is the cardinality of a maximal orthonormal system that it contains by Zorn s lemma it contains at least one and any two have the same cardinality An orthonormal basis is certainly a maximal orthonormal system but the converse need not hold in general If G displaystyle G is a dense subspace of an inner product space V displaystyle V then any orthonormal basis for G displaystyle G is automatically an orthonormal basis for V displaystyle V Thus it suffices to construct an inner product space V displaystyle V with a dense subspace G displaystyle G whose dimension is strictly smaller than that of V displaystyle V Let K displaystyle K be a Hilbert space of dimension ℵ0 displaystyle aleph 0 for instance K ℓ2 N displaystyle K ell 2 mathbb N Let E displaystyle E be an orthonormal basis of K displaystyle K so E ℵ0 displaystyle E aleph 0 Extend E displaystyle E to a Hamel basis E F displaystyle E cup F for K displaystyle K where E F displaystyle E cap F varnothing Since it is known that the Hamel dimension of K displaystyle K is c displaystyle c the cardinality of the continuum it must be that F c displaystyle F c Let L displaystyle L be a Hilbert space of dimension c displaystyle c for instance L ℓ2 R displaystyle L ell 2 mathbb R Let B displaystyle B be an orthonormal basis for L displaystyle L and let f F B displaystyle varphi F to B be a bijection Then there is a linear transformation T K L displaystyle T K to L such that Tf f f displaystyle Tf varphi f for f F displaystyle f in F and Te 0 displaystyle Te 0 for e E displaystyle e in E Let V K L displaystyle V K oplus L and let G k Tk k K displaystyle G k Tk k in K be the graph of T displaystyle T Let G displaystyle overline G be the closure of G displaystyle G in V displaystyle V we will show G V displaystyle overline G V Since for any e E displaystyle e in E we have e 0 G displaystyle e 0 in G it follows that K 0 G displaystyle K oplus 0 subseteq overline G Next if b B displaystyle b in B then b Tf displaystyle b Tf for some f F K displaystyle f in F subseteq K so f b G G displaystyle f b in G subseteq overline G since f 0 G displaystyle f 0 in overline G as well we also have 0 b G displaystyle 0 b in overline G It follows that 0 L G displaystyle 0 oplus L subseteq overline G so G V displaystyle overline G V and G displaystyle G is dense in V displaystyle V Finally e 0 e E displaystyle e 0 e in E is a maximal orthonormal set in G displaystyle G if 0 e 0 k Tk e k 0 Tk e k displaystyle 0 langle e 0 k Tk rangle langle e k rangle langle 0 Tk rangle langle e k rangle for all e E displaystyle e in E then k 0 displaystyle k 0 so k Tk 0 0 displaystyle k Tk 0 0 is the zero vector in G displaystyle G Hence the dimension of G displaystyle G is E ℵ0 displaystyle E aleph 0 whereas it is clear that the dimension of V displaystyle V is c displaystyle c This completes the proof Parseval s identity leads immediately to the following theorem Theorem Let V displaystyle V be a separable inner product space and ek k displaystyle left e k right k an orthonormal basis of V displaystyle V Then the map x ek x k N displaystyle x mapsto bigl langle e k x rangle bigr k in mathbb N is an isometric linear map V ℓ2 displaystyle V rightarrow ell 2 with a dense image This theorem can be regarded as an abstract form of Fourier series in which an arbitrary orthonormal basis plays the role of the sequence of trigonometric polynomials Note that the underlying index set can be taken to be any countable set and in fact any set whatsoever provided ℓ2 displaystyle ell 2 is defined appropriately as is explained in the article Hilbert space In particular we obtain the following result in the theory of Fourier series Theorem Let V displaystyle V be the inner product space C p p displaystyle C pi pi Then the sequence indexed on set of all integers of continuous functions ek t eikt2p displaystyle e k t frac e ikt sqrt 2 pi is an orthonormal basis of the space C p p displaystyle C pi pi with the L2 displaystyle L 2 inner product The mapping f 12p ppf t e iktdt k Z displaystyle f mapsto frac 1 sqrt 2 pi left int pi pi f t e ikt mathrm d t right k in mathbb Z is an isometric linear map with dense image Orthogonality of the sequence ek k displaystyle e k k follows immediately from the fact that if k j displaystyle k neq j then ppe i j k tdt 0 displaystyle int pi pi e i j k t mathrm d t 0 Normality of the sequence is by design that is the coefficients are so chosen so that the norm comes out to 1 Finally the fact that the sequence has a dense algebraic span in the inner product norm follows from the fact that the sequence has a dense algebraic span this time in the space of continuous periodic functions on p p displaystyle pi pi with the uniform norm This is the content of the Weierstrass theorem on the uniform density of trigonometric polynomials Operators on inner product spacesSeveral types of linear maps A V W displaystyle A V to W between inner product spaces V displaystyle V and W displaystyle W are of relevance Continuous linear maps A V W displaystyle A V to W is linear and continuous with respect to the metric defined above or equivalently A displaystyle A is linear and the set of non negative reals Ax x 1 displaystyle Ax x leq 1 where x displaystyle x ranges over the closed unit ball of V displaystyle V is bounded Symmetric linear operators A V W displaystyle A V to W is linear and Ax y x Ay displaystyle langle Ax y rangle langle x Ay rangle