Change of basis
In mathematics, an ordered basis of a vector space of finite dimension allows representing uniquely any element of the vector space by a coordinate vector, which is a sequence of scalars called coordinates. If two different bases are considered, the coordinate vector that represents a vector on one basis is, in general, different from the coordinate vector that represents on the other basis. A change of basis consists of converting every assertion expressed in terms of coordinates relative to one basis into an assertion expressed in terms of coordinates relative to the other basis. Such a conversion  results from the "change-of-basis formula" which expresses the coordinates relative to one basis in terms of coordinates relative to the other basis. Using matrices, this formula can be written where "old" and "new" refer respectively to the firstly defined basis and the other basis, formula_2 and formula_3 are the column vectors of the coordinates of the same vector on the two bases, and formula_4 is the change-of-basis matrix (also called transition matrix), which is the matrix whose columns are the coordinate vectors of the new basis vectors on the old basis. This article deals mainly with  finite-dimensional vector spaces. However, many of the principles are also valid for infinite-dimensional vector spaces. Change of basis formula. Let formula_5 be a basis of a finite-dimensional vector space over a field . For , one can define a vector by its coordinates formula_6 over formula_7 Let be the matrix whose th column is formed by the coordinates of . (Here and in what follows, the index refers always to the rows of and the formula_10 while the index refers always to the columns of and the formula_11 such a convention is useful for avoiding errors in explicit computations.) Setting  formula_12 one has that formula_13 is a basis of if and only if the matrix is invertible, or equivalently if it has a nonzero determinant. In this case, is said to be the "change-of-basis matrix" from the basis formula_14 to the basis formula_15 Given a vector formula_16 let formula_17 be the coordinates of formula_18 over formula_19 and formula_20 its coordinates over formula_21 that is The "change-of-basis formula" expresses the coordinates over the old basis in term of the coordinates over the new basis. With above notation, it is In terms of matrices, the change of basis  formula is where formula_25 and formula_26 are the column vectors of the coordinates of over formula_14 and formula_28 respectively. "Proof:" Using the above definition of the change-of basis matrix, one has As formula_30 the change-of-basis formula results from the uniqueness of the decomposition of a vector over a basis. Example. Consider the Euclidean vector space formula_31 Its standard basis consists of the vectors formula_32 and formula_33 If one rotates them by an angle of , one gets a "new basis" formed by formula_34 and formula_35 So, the change-of-basis matrix is formula_36 The change-of-basis formula  asserts that, if formula_37 are the new coordinates of a vector formula_38 then one has That is, This may be verified by writing In terms of linear maps. Normally, a matrix represents a linear map, and the product of a matrix and a column vector represents the function application of the corresponding linear map to the vector whose coordinates form the column vector. The change-of-basis formula is a specific case of this general principle, although this is not immediately clear from its definition and proof. When one says that a matrix "represents" a linear map, one refers implicitly  to bases of implied vector spaces, and to the fact that the choice of a basis induces an isomorphism between a vector space and , where is the field of scalars. When only one basis is considered for each vector space, it is worth to leave this isomorphism implicit, and to work up to an isomorphism. As several bases of the same vector space are considered here, a more accurate wording is required. Let be a field, the set formula_42 of the -tuples is a -vector space whose addition and scalar multiplication are defined component-wise. Its standard basis is the  basis that has as its th element the tuple with all components equal to except the th that is . A basis formula_43 of a -vector space defines a linear isomorphism formula_44 by Conversely, such a linear isomorphism defines a basis, which is the image by formula_46 of the standard basis of formula_47 Let formula_5 be the "old basis" of a change of basis, and formula_49 the associated isomorphism. Given a change-of basis matrix , let consider it as the matrix of an endomorphism formula_50 of formula_47 Finally, let define (where formula_53 denotes function composition), and A straightforward verification, allows showing  that this definition of formula_55 is the same as that of the preceding section. Now, by composing the equation formula_52 with formula_57 on the left and formula_58 on the right, one gets It follows that, for formula_60 one has which is the change-of-basis formula expressed in terms of linear maps instead of coordinates. Function defined on a vector space. A function that has a vector space as its domain is commonly specified as a multivariate function whose variables are the coordinates on some basis of the vector on which the function is applied. When the basis is changed , the expression of the function is changed. This change can be computed by substituting the "old" coordinates for their expressions in terms of the "new" coordinates. More precisely, if is the expression of the function in terms of the old coordinates, and if is the change-of-base formula, then is the expression of the same function in terms of the new coordinates. The fact that the change-of-basis formula expresses the old coordinates in terms of the new one may seem unnatural, but appears as useful, as no matrix inversion is needed here. As the change-of-basis  formula involves only linear functions, many function properties are kept by a change of basis. This allows defining these properties as properties of functions of a variable vector that are not related to any specific basis. So, a function whose domain is a vector space or a subset of it is if the multivariate function that represents it on some basis—and thus on every basis—has the same property. This is specially useful in the theory of manifolds, as this allows extending the concepts of continuous, differentiable, smooth and analytic functions to functions that are defined on a manifold . Linear maps. Consider a linear map from a vector space of dimension to a vector space of dimension . It is represented on "old" bases of and by a matrix . A change of bases is defined by an change-of-basis matrix for , and an change-of-basis matrix for . On the "new" bases, the matrix of is This is a straightforward consequence of the change-of-basis formula. Endomorphisms. Endomorphisms, are linear maps from a vector space to itself. For a change of basis, the formula of the preceding section applies, with the same change-of-basis matrix on both  sides of the formula. That is, if is the square matrix of an endomorphism of over an "old" basis, and is a change-of-basis matrix, then the matrix of the endomorphism on the "new" basis is As every invertible matrix can be used as a change-of-basis matrix, this implies that two matrices are similar if and only if they represent the same endomorphism on two different bases. Bilinear forms. A "bilinear form" on a vector space "V" over a field is a function which is linear in both arguments. That is, is bilinear if the maps formula_64  and formula_65 are linear for every fixed formula_66 The matrix of a bilinear form on a basis formula_67 (the "old" basis in what follows) is the matrix whose entry of the th row and th column is . It follows that if and are the column vectors of the coordinates of two vectors and , one has where formula_69 denotes the transpose of the matrix . If is a change of basis matrix, then a straightforward computation shows that the matrix of the bilinear form on the new basis is A symmetric bilinear form is a bilinear form such that formula_71 for every  and in . It follows that the matrix of on any basis is symmetric. This implies that the property of being a symmetric matrix must be kept by the above change-of-base formula. One can also check this by noting that the transpose of a matrix product is the product of the transposes computed in the reverse order. In particular, and the two members of this equation equal formula_73 if the matrix is symmetric. If the characteristic of the ground field is not two, then for every symmetric bilinear form there is a basis for which the matrix is diagonal . Moreover, the resulting nonzero entries on the diagonal are defined up to the multiplication by a square. So, if the ground field is the field formula_74 of the real numbers, these nonzero entries can be chosen to be either or . Sylvester's law of inertia is a theorem that asserts that the numbers of and of depends only on the bilinear form, and not of the change of basis. Symmetric bilinear forms over the reals are often encountered in geometry and physics, typically in the study of quadrics and of the inertia of a rigid body. In these cases, orthonormal  bases are specially useful; this means that one generally prefer to restrict changes of basis to those that have an orthogonal change-of-base matrix, that is, a matrix such that formula_75 Such matrices have the fundamental property that the change-of-base formula is the same for a symmetric bilinear form and the endomorphism that is represented by the same symmetric matrix. Spectral theorem asserts that, given such a symmetric matrix, there is an orthogonal change of basis such that the resulting matrix (of both the bilinear form and the endomorphism) is a diagonal matrix with the eigenvalues of  the initial matrix on the diagonal. It follows that, over the reals, if the matrix of an endomorphism is symmetric, then it is diagonalizable.