Changing coordinate systems to help find a transformation matrix