# Changing Coordinate Systems

Changing coordinate systems can involve two very different operations. One is recomputing coordinate values that correspond to the same point. The other is re-expressing a field in terms of new variables. The Wolfram Language provides functions to perform both these operations.

## Converting Points

Two coordinate systems are related by a mapping that takes coordinate values in the old system and returns coordinate values in the new system.

CoordinateTransformData[transf,"Mapping"] | the mapping between coordinate systems as a pure function |

CoordinateTransformData[transf,"Mapping",pt] | the new coordinate values of pt |

CoordinateTransform[transf,pt] | the new coordinate values of pt |

Converting points between two coordinate systems.

The function CoordinateTransformData returns information about mappings between the coordinate systems in CoordinateChartData.

The function CoordinateTransform provides a convenient mechanism for converting one or several points.

## Transforming Fields

When transforming fields between two coordinate systems, a field given in terms of variables in the old system is re-expressed in terms of variables in the new system. In addition to the mapping between the systems, several additional steps are needed: solving for the old variables in terms of the new, substituting in these expressions, and, in the case of vector and tensor fields, accounting for differences in basis vectors between the two coordinate systems. All of these steps are performed by the command TransformedField.

TransformedField[transf,f,{x_{1},x_{2},…,x_{n}}->{y_{1},y_{2},…,y_{n}}] | transform a scalar, vector, or tensor field f from coordinates to coordinates |

Transforming a field between two coordinate systems.

The simpler scalar case is considered first.

The vector and tensor case is more complicated because of the need to account for the change of basis vectors. As a result, the transformation of a vector is not merely the transformation of its components. For arrays, which are interpreted as components in an orthonormal basis, the rotation matrix that relates the two bases is given by the CoordinateTransformData property .

## Relating Orthonormal Bases

The basis rotation matrix used above combines information about both the Jacobian matrix of the mapping and the orthonormal basis in each chart. For orthogonal coordinate systems, it is constructed from the Jacobian and the two sets of scale factors.

CoordinateTransformData[transf,prop,pt] | compute a property of the transformation at the point pt |

CoordinateChartData[chart,prop,pt] | compute a property of the chart at the point pt |

Computing properties of charts and transformations.