Consider two bases (e1,e2) and (e~1,e~2), where we consider the former the old basis and the latter the new basis.
Each vector (e~1,e~2) can be expressed as a linear combination of (e1,e2):
e~1=e1S11+e2S12 e~2=e1S21+e2S22(1.0)
(1.0) is the basis transformation formula, and the object S is the direct transformation {Sij,1≤i,j≤2}, (assuming a 2x2 matrix) which can also be written in matrix form:
[e~1e~2]=[e1e2][S11 S12S21S22] =[e1e2]S(1.1)
The resulting matrix is the direct transformation matrix from the old basis to the new basis. Note that the rows of S appear as superscripts and the columns appear as subscripts.
Converting in the reverse direction (new to old) requires doing (1.1), but with the inverse matrix
[e1e2]=[e~1e~2][S11 S12S21S22]−1 =[e~1e~2][T11 T12T21T22] =[e~1e~2]T(1.2)
where T is the inverse transformation matrix, or T=S−1.