In Class Demonstration: The Change of Coordinate MatrixBy Russell Blythwith(LinearAlgebra):Let V be a vector space of finite dimension, with bases B and B'. The change of coordinate matrix Q has columns which are the coordinate vectors for the vectors in B' relative to B.We look at an example in NiMqJCUiUkciIiM=. The matrices B and Bp contain the respective basis vectors as columns.B := <<-2,3>|<2,-1>>;Bp := <<2,-2>|<1,5>>;Find the coordinates for the Bp vectors relative to B.Q1 := LinearSolve(B,Column(Bp,1));Q2 := LinearSolve(B,Column(Bp,2));Q := <Q1|Q2>;This matrix Q changes coordinates from B' to B.Try it out. Suppose x is a vector whose coordinates relative to B' we know.xBp := <-2,-3>;Now find the coordinates for x relative to B, using Q.xB := Q.xBp;Is this right? Let's check;x1 := xBp[1]*Column(Bp,1)+xBp[2]*Column(Bp,2);x2 := xB[1]*Column(B,1)+xB[2]*Column(B,2);We see that the result is the same vector (now expressed in terms of the standard basis)Now let's try out a linear operator on NiMqJCUiUkciIiQ=. Suppose T is the linear operator such that T(1,2,3) = (4,5,6), T(2,2,2) = (-1,-1,-1), and T(1,0,1) = (0,1,0). We will find the formula for T (in terms of the standard basis). Let B be the standard basis for R3, and let B' be the basis {(1,2,3),(2,2,2), (1,0,1)}.We write these bases as columns of the matrices B3 and B3p:B3 := <<1,0,0>|<0,1,0>|<0,0,1>>;B3p := <<1,2,3>|<2,2,2>|<1,0,1>>;Find the matrix of T relative to B'. To do this we need to find the coordinates of the image of each basis vector relative to B'; these coordinate vectors then become the columns of the matrix of T relative to B'.TIm := <<4,5,6>|<-1,-1,-1>|<0,1,0>>;
T1 := LinearSolve(B3p,Column(TIm,1));
T2 := LinearSolve(B3p,Column(TIm,2));
T3 := LinearSolve(B3p,Column(TIm,3));TB3p := <T1|T2|T3>;Now find the matrix Q which gives the change of coordinates. In this case it is easy to write the change of coordinate matrix from B' to B - the columns are just the vectors in B'.Q3 := B3p;Find the inverse of Q. This gives the change of coordinate matrix from B to B'.Q3inv := Q3^(-1);The matrix of T relative to the standard basis is now computed asQ * (T rel to b') * QinvTB3 := Q3.TB3p.Q3inv;Compute for a general vector nowformula := TB3.<a1,a2,a3>;Check that the vectors of the basis B' are mapped correctly - the coordinates are relative to the standard basis.TB3.Column(B3p,1);TB3.Column(B3p,2);TB3.Column(B3p,3);