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. Mathematica 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.
Converting points between two coordinate systems.
The function CoordinateTransformData returns information about mappings between the coordinate systems in CoordinateChartData.
This converts the point

in polar coordinates to the corresponding

Cartesian coordinates.
| Out[6]= |  |
This converts the point

in Cartesian coordinates to the corresponding

values in spherical coordinates.
| Out[7]= |  |
| Out[8]= |  |
The mapping naturally takes a single point.
| Out[9]= |  |
Using
Map, it can be applied to several points at once.
| Out[10]= |  |
The function CoordinateTransform provides a convenient mechanism for converting one or several points.
This converts the point

in spherical coordinates to the corresponding cylindrical coordinates.
| Out[11]= |  |
The previous answer can be verified by converting both coordinate values to Cartesian coordinates.
| Out[12]= |  |
| Out[13]= |  |
Several points can be transformed at once.
| Out[14]= |  |
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,{x1,x2,...,xn}->{y1,y2,...,yn}] | 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.
This converts the scalar field

from Cartesian

to cylindrical

coordinates.
| Out[15]= |  |
The previous example can be done "by hand". Unlike for
CoordinateTransform, for these steps to make sense,

and

must be coordinate names and not coordinate values such as numbers.
| Out[16]= |  |
| Out[17]= |  |
| Out[18]= |  |
| Out[19]= |  |
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
.
This converts the vector field

from Cartesian

coordinates to spherical

coordinates, producing the manifestly radial result

.
| Out[20]= |  |
Two pieces of information are needed to reproduce the previous example: the variable replacement rules, as in the scalar case, and the basis rotation matrix. Since the rotation matrix specifies the rotation between bases, its transpose is the matrix that acts on components.
| Out[21]= |  |
| Out[22]= |  |
| Out[23]= |  |
To transform a vector between coordinate systems, first the vector is multiplied by the rotation matrix to change components in the

basis to components in the

basis (equivalently, the projection of the vector onto the local basis vectors). Subsequently, the replacement rules are applied.
| Out[24]= |  |
Using
Map, lists of scalar fields can be transformed between coordinates. The result is quite different from transforming a vector field with the same components.
| Out[25]= |  |
| Out[26]= |  |
This transforms the vector field

from spherical

to Cartesian

coordinates.
| Out[27]= |  |
The vector field in hyperspherical coordinates with the same local components is in fact a rotational vector field about the

axis.
| Out[28]= |  |
Parameters for coordinate systems can be specified in
TransformedField. This converts the vector field

from Cartesian

coordinates to prolate spheroidal

coordinates with parameter

.
| Out[29]= |  |
This transforms a rank-2 tensor from Cartesian to polar coordinates.
| Out[30]= |  |
| Out[31]= |  |
Using
Map, it is possible to transform the matrix as a list of two vectors or as a matrix of four scalar fields. The results are quite different in each case.
| Out[32]= |  |
| Out[33]= |  |
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.
Computing properties of charts and transformations.
The matrix

rotates the basis vectors

into the basis vectors

.
| Out[34]= |  |
The rotated vector

is

in the

basis, and

is

in that same basis.
| Out[35]= |  |
| Out[36]= |  |
To compute the rotation matrix, the scale factors, which define the orthonormal bases in orthogonal systems, are needed. Notice that
CoordinateTransform is used to ensure both sets of scale factors are evaluated at the same point.
| Out[37]= |  |
| Out[38]= |  |
The rotation matrix is constructed from the transposed Jacobian matrix by conjugating it with diagonal matrices containing the scale factors.
| Out[39]= |  |
| Out[40]= |  |
This is the matrix that rotates the cylindrical basis vectors

into the spherical basis vectors

.
| Out[43]= |  |
The matrix rotates

into

, which is

, and it rotates

into

, which is the same as

.
| Out[44]= |  |
| Out[45]= |  |
This rotation matrix can be constructed using the scale factors and the Jacobian matrix in the same manner as before.
| Out[46]= |  |
| Out[47]= |  |
| Out[48]= |  |
| Out[49]= |  |