Metric tensor in different coordinate system Changing the reference system changes the metric tensor, but the physics of the system does not change.
In special relativity, with the signature (+, -, -, -), $ \Delta s^{2} = c^{2} \Delta t^{2} - \Delta x^{2} - \Delta y^{2} - \Delta z^{2} $.
In the coordinate system (ct,x,y,z), $ g_{ab} = g^{ab} = diag (1, –1, –1, –1) $.
How does the metric tensor change in the coordinate system (t, x, y, z)?
Could you give me an example about "Metric in coordinates"?

 A: It's easiest to think of the metric in its down form, where there is a deep association between the one-form basis and ordinary differentials.
so, if you have the standard minkowski metric:
$$g_{ab}dx^{a}dx^{b} = dt^{2} - dx^{2} - dy^{2} - dz^{2}$$
and you wish to rescale t so that $t \rightarrow A T$, for some constant $A$, then you have $dt = A dT$, and the metric becomes:
$$g_{ab}dx^{a}dx^{b} = A^{2}dT^{2} - dx^{2} - dy^{2} - dz^{2}$$
More generally, if you want to transform to something more complex, like say $$t = aT^3 + Bx^2$$, then you would have $dt = 3aT^{2} dT + 2Bx\,dx$, and the metric would become
$$g_{ab}dx^{a}dx^{b} = 9a^{2}T^{4}dT^{2} + 2dTdx\,6aBT^{2}x -(1-4B^{2}x^{2}) dx^{2} - dy^{2} - dz^{2}$$,
which corresponds to the metric tensor in matrix form:
$$\left(\begin{array}
& 9a^{2}T^{4} & 6aBT^{2}x & 0 & 0\\
6aBT^{2}x & -(1-4B^{2}x^{2}) & 0 & 0\\
0& 0 & -1 & 0 \\
0 &0 & 0 & -1
\end{array}\right)$$
And now you should get the deal for a general coordinate transformation.
A: The coordinates $(ct,x,y,z)$ and $(t,x,y,z)$ are quite similar. In fact, in the first coordinate system, your metric should be written as $\Delta s^2=\Delta(ct)^2-\Delta x^2-\Delta y^2-\Delta z^2$. For a general coordinate change $(t,x,y,z)\rightarrow(t',x',y',z')$ the new metric takes the form:
\begin{equation}
g'_{\mu\nu} (x') = \frac{ \partial x^\rho}{ \partial x'^\mu } \frac{ \partial x^\sigma }{ \partial x'^\nu } g_{\rho\sigma} (x) 
\end{equation}
A: Assume coordinate system $X^a$ is given by x, y, z (with $\vec e_a =  (\vec e_x, \vec e_y, \vec e_z$,) and $x^b$ is given by r, $\varphi$ and z (with $\vec e_b = (\vec e_r, \vec e_\varphi, \vec e_z$)). We know
x = r cos$\varphi$,
y = r sin$\varphi$ and
z = z
$r =\sqrt{(x^2+y^2)}$
$\varphi = arctan\frac{y}{x}$
$z = z$
The direction vectors of $X^a$ are given by $\vec e_b = \frac{\partial X^a}{\partial X^b}\vec e_a$
$\vec e_r = \vec e_x\,cos\varphi + \vec e_y\,sin\varphi$,
$\vec e_\varphi = -\vec e_x\, sin\varphi + \vec e_y\,cos\varphi\,$ and
$\vec e_z = \vec e_z$
$\vec e_x = \vec e_r\,cos\varphi - \vec e_\varphi\,sin\varphi$,
$\vec e_y = \vec e_r\, sin\varphi + \vec e_\varphi\,cos\varphi\,$ and
$\vec e_z = \vec e_z$
Now the metric in system $X^a$ is $g_{ab}$ =  $\delta_{ab}$, so $g_{xx}=1 , g_{yy}=1, g_{zz}=1, g_{xy}=g_{yx}=0, g_{xz}=g_{zx}=0, g_{yz}=g_{zy}=0$ and the metric of b is given by
$g_{ij} = \frac{\partial X^a}{\partial x^i}\frac{\partial X^b}{\partial x ^j}g_{ab}$ ,
so you have to calculate $\frac{\partial X^a}{\partial x^i}\frac{\partial X^b}{\partial x ^j} $, which are all partial derivatives of a (x, y, z) according to b (r, $\varphi$, z).
e.g. $g_{rz} = \frac{\partial X^a}{\partial r}\frac{\partial X^b}{\partial z }g_{ab} = \frac{\partial x}{\partial r}\frac{\partial x}{\partial z}g_{xx} +  \frac{\partial x}{\partial r}\frac{\partial y}{\partial z}g_{xy} +  \frac{\partial y}{\partial r}\frac{\partial x}{\partial z}g_{yx} + 
\frac{\partial x}{\partial r}\frac{\partial z}{\partial z}g_{xz} +  
\frac{\partial z}{\partial r}\frac{\partial y}{\partial z}g_{zx} + 
\frac{\partial y}{\partial r}\frac{\partial y}{\partial z}g_{yy} +
 \frac{\partial y}{\partial r}\frac{\partial z}{\partial z}g_{yz} +  \frac{\partial z}{\partial r}\frac{\partial y}{\partial z}g_{zy} +  \frac{\partial z}{\partial r}\frac{\partial z}{\partial z}g_{zz}=0$
$g_{\varphi\varphi} = \frac{\partial X^a}{\partial \varphi}\frac{\partial X^b}{\partial \varphi }g_{ab} = \frac{\partial x}{\partial \varphi}\frac{\partial x}{\partial \varphi}g_{xx} +  \frac{\partial x}{\partial \varphi}\frac{\partial y}{\partial \varphi}g_{xy} +  \frac{\partial y}{\partial \varphi}\frac{\partial x}{\partial \varphi}g_{yx} + 
\frac{\partial x}{\partial \varphi}\frac{\partial z}{\partial \varphi}g_{xz} +  
\frac{\partial z}{\partial \varphi}\frac{\partial y}{\partial \varphi}g_{zx} + 
\frac{\partial y}{\partial \varphi}\frac{\partial y}{\partial \varphi}g_{yy} +
 \frac{\partial y}{\partial \varphi}\frac{\partial z}{\partial \varphi}g_{yz} +  \frac{\partial z}{\partial \varphi}\frac{\partial y}{\partial \varphi}g_{zy} +  \frac{\partial z}{\partial \varphi}\frac{\partial z}{\partial \varphi}g_{zz}=r^2$
Of course you usually write this as a matrix with final result
$g_{ij}={\begin{pmatrix}1&0&0\\0&r^2&0\\0&0&1 \end{pmatrix}}$
