Why is a Lorentzian metric still Lorentzian after a general coordinate transformation? In my GR course, we define a lorentzian metric $g_{\mu\nu}(x)$ as a symmetric $(0,2)$ tensor field having 3 positive and 1 negative eigenvalue. Now given a general coordinate transformation described by the Jacobian $J^{\mu}_\nu$ why does $g'_{\mu\nu}(x') = (J^{-1})^{\rho}_\mu (J^{-1})^{\sigma}_\nu g_{\rho\sigma}(x)$ still have 3 positive and 1 negative eigenvalue?
NB: I do understand that the determinant is negative in both situations, however this doesn't answer my question since the signatures of the eigenvalues might still flip from $(-,+,+,+)$ to $(-,-,-,+)$ both of these give negative determinants, however, the first is Lorentzian signature while the second is not (given we define Lorentzian as above)
 A: Under general coordinate transformations
$$
g' = M g M^T , \qquad M_\mu{}^\alpha  = \frac{\partial x^\alpha}{\partial x'^\mu} \in GL(n,{\mathbb R}) . 
$$
It's clear that $\det g' = \det g ( \det M )^2$ so $\det g'$ and $\det g$ have the same sign. Now, $GL(n,{\mathbb R})$ has two disconnected components corresponding to the sign of $\det M$.
Orientation preserving diffeos have $\det M > 0$ and these are all continuously connected to the identity element $I$. $I$ (trivially) preserves the sign of all eigenvalues. Now, suppose there is an orientation-preserving $M$ which changes the sign of at least one eigenvalue of $g$. Since $M$ is continuously connected to the identity, there exists a continuous function $M(t)$ such that $M(0) = I$ and $M(1) = M$. The corresponding metric $g(t)=M(t) g M(t)^T$ is also continuous and satisfies
$$
\text{sign}(\det g(t))=\text{sign}(\det g)=\pm 1 , ~~ \forall~~ t \in [ 0,1]. \tag{1}
$$
The eigenvalues of $g(t)$ are also continuous functions of $t$. Now, since $g=g(0)$ and $g'=g(1)$ have at least one eigenvalue which changes sign (our starting assumption), there must be a $t_0 \in (0,1)$ for which that eigenvalue is zero (an eigenvalue cannot continuously change from positive to negative or vice versa without crossing zero). Then $\det g(t_0) = 0$ but this contradicts (1). Therefore $M$ cannot change the sign of any eigenvalue of $g$.
Orientation flipping diffeos have $\det M < 0$ and these are continuously connected to $P = \text{diag}(-1,+1,\cdots,+1)$. It is easy to see that $P$ does not change the signs of eigenvalues so using the same argument as before any orientation flipping diffeo can also not change the sign.
QED.
