Consider some vectors in a vector space over . We would like to define some concepts such as length of a vector or angle between two vectors, both of which are not intrinsic properties of the space itself. We notice that scalar multiplying a vector by a factor of multiplies its length by , and forming the sum causes the norm to change from to . Let us abstract the concept. Such a function taking in two inputs has the property of being linear with respect to each input; that is, . For a function of inputs linear in each input, this function is called linear. For , such a function is called an inner product. Inner products will be used to develop the ideas of the magnitude of a vector and the angles between two vectors in Euclidean spaces as well as some other more abstract ideas.
Let be an inner product. Choose the basis in and define the matrix . is called the Gram matrix of the inner product. Then to compute the inner product of two vectors , first compute the coordinates and , then calculate . This notation also makes the idea of multilinearity given in the motivation more natural. Moreover, if a basis with vectors is chosen and is some matrix over , then the map defines an inner product on the space spanned by (the 2-linearity is obvious by the definition of matrix multiplication). It follows that there is a bijection between inner products on a this space of and matrices.
Let us now discuss how is affected by a change of basis. Let be the change of basis matrix so that . Then the following is obtained: so that the Gram matrix in the basis is .
Exercise. Prove that .
Kostrikin, A., and Manin, Y. Linear Algebra and Geometry.