Definition
An inner product on a vector space over a field is a function that satisfies the followings:
For arbitrary and ,
(1)  (Linearity for the first argument)
(2)  (Conjugate symmetry)
(3) if and only if  (Positive semidefiniteness)
Examples
Standard inner product
Definition
A standard inner space in is defined for and as
Note that for the Euclidean norm,
Angle between vectors
The standard inner product on is related to the angle between two vectors . Let be the angle between the two vectors and let . Then, applying the second law of cosine gives
Now substitute .
\lVert \mathbf{x}-\mathbf{y} \rVert_2^2 &= (\mathbf{x}-\mathbf{y})^\top(\mathbf{x}-\mathbf{y}) \\ &= \mathbf{x}^\top \mathbf{x} + \mathbf{y}^\top\mathbf{y} -2\mathbf{x}^\top\mathbf{y} \\ &= \lVert \mathbf{x} \rVert_2^2 + \lVert \mathbf{y} \rVert_2^2 -2\mathbf{x}^\top\mathbf{y} \\ &= \lVert \mathbf{x} \rVert_2^2 + \lVert \mathbf{y} \rVert_2^2 -2\lVert \mathbf{x} \rVert_2 \lVert \mathbf{y} \rVert_2\cos\theta \end{align*}$$ Hence,\cos\theta = \dfrac{\mathbf{x}^\top\mathbf{y}}{\lVert \mathbf{x} \rVert_2 \lVert \mathbf{y} \rVert_2}.