Diagonalizing a constant metric tensor $g_{\mu\nu}$ at a point I read that the following regarding the diagonalisation of the metric tensor $g_{\mu\nu}$ at a point P:

The constant metric tensor $g_{\mu\nu}$ at point $P$ can be diagonalised to the principal axes (with length adjusted correctly) so that it becomes the standard flat space metric $\eta_{\mu\nu}$ at that point.

Is there an explicit example that shows how this work? Does this diagonalisation involve a change of coordinate system?
 A: Let's diagonalize $$ 
d\tau^2 =-dt^2- 6dx\,dt +17dx^2.
$$
By completing the square we have
$$
-dt^2- 6dx\,dt +17dx^2\\
= - (dt +3dx)^2 +9 dx^2 +17 dx^2\\
= - (dt +3dx)^2 +26dx^2.
$$
Choose new coordinates $T= t+3x$, $X= \sqrt {26}x$.
Then
$$
d\tau^2= [d(x+3t)]^2-(d[\sqrt{26}])^2=-dT^2 +dX^2.
$$
By repeatedly completing the square you can diagonalize any quadratic form ${\bf x}^TM{\bf x}\to (A{\bf y})^TM(A{\bf y})={\bf y}^TD{\bf y}$ where $D=A^TMA$ is diagonal. There may be many ways to do this, but as @N.Steinle says, Sylvester's law of inertia says that you will always get a diagonal metric with the same signature.
Here is an example with more variables.
Consider, for example, the quadratic
form
$$
Q= x^2-y^2-z^2 +2xy-4xz +6yz
=
\left(\matrix{x,&\!\!\!\!y,&\!\!\!\!z}\right)
\left(\matrix{{\phantom -}1&{\phantom -}1&-2\cr
              {\phantom -}1&-1& {\phantom -}3\cr
       -2&{\phantom -}3 & -1}\right)
\left(\matrix{x\cr y\cr z}\right).
$$
We complete the square involving $x$:
$$
Q=(x+y-2z)^2 -2y^2+10yz-5z^2,
$$
where the terms outside the squared group no longer involve
$x$.
We now complete the square in  $y$:
$$  
Q= (x+y-2z)^2 -(\sqrt 2 y - \frac 5{\sqrt 2} z)^2 +\frac
{15}{2}z^2,$$
so that the remaining  term no longer contains $y$.
Thus, on  setting
$$
\xi = x+y-2z,\nonumber\\
\eta= \sqrt 2 y - \frac 5{\sqrt 2} z,\nonumber\\
\zeta = \sqrt {\frac{15}{2}}z,\nonumber
$$
we have
$$
Q= \xi^2 -\eta^2 +\zeta^2 =
\left(\matrix{\xi,&\!\!\!\!\eta,&\!\!\!\!\zeta}\right)
\left(\matrix{1&{\phantom -}0&0\cr
              0&-1& 0\cr
      0&{\phantom -}0 & 1}\right)
\left(\matrix{\xi\cr \eta\cr \zeta}\right).
$$
A: you can also use the eigen vectors to diagonalized the metric:
Example @mike stone
$$ds^2=-{{\it dt}}^{2}-6\,{\it dx}\,{\it dt}+17\,{{\it dx}}^{2}$$
thus the metric is:
$$\boldsymbol G=\left[ \begin {array}{cc} -1&-3\\ -3&17\end {array}
 \right] 
$$
the eigen values are
$$\lambda_1=8+3\,\sqrt {10}~,\lambda_2=8-3\,\sqrt {10}$$
and the eigen vectors are:
$$ T= \left[ \begin {array}{cc} {\frac {1}{\sqrt {1+ \left( -3-\sqrt {10}
 \right) ^{2}}}}&{\frac {1}{\sqrt {1+ \left( -3+\sqrt {10} \right) ^{2
}}}}\\ {\frac {-3-\sqrt {10}}{\sqrt {1+ \left( -3-
\sqrt {10} \right) ^{2}}}}&{\frac {-3+\sqrt {10}}{\sqrt {1+ \left( -3+
\sqrt {10} \right) ^{2}}}}\end {array} \right]
$$
$\Rightarrow$
$$\boldsymbol T^{T}\,\boldsymbol G\,\boldsymbol T=\begin{bmatrix}
  \lambda_1 & 0 \\
  0 & \lambda_2 \\
\end{bmatrix}$$
thus your line element $ds^2$  is now :
$$ds^2\mapsto \lambda_1\,dT^2+\lambda_2\,dX^2$$
