TITLE: For which $b$ it is possible that $S^n$ can have a Lorentz metric? Why?
QUESTION [10 upvotes]: It is possible that on a sphere $S^n$ there is a natural Riemannian metric in $R^(n+1)$. But it is not always possible for pseudo Riemann metric since the sum of two symmetric matrix which are not positive definite but may have rank different from the two matrix. So I wonder what is the sufficient and necessary condition for the dimension of a sphere which can be endowed with a Lorentz metric.

REPLY [19 votes]: I would just like to point out that a slightly more general version of the statement in Moroianu's answer holds:
A compact orientable manifold $M$ admits a Lorentzian metric if and only if $\chi(M)=0$.
Clearly, simply-connected manifolds are orientable, hence the above statement is more general. But, e.g., tori clearly admit product Lorentzian metrics.
For the proof of the above statement, recall $M$ admits a semi-Riemannian metric of index $k$ if and only if the tangent bundle $TM$ admits a sub-bundle, or distribution, of rank $k$. Thus, $M$ admits a Lorentzian metric if and only if it admits a line bundle (which is also equivalent to $M$ admitting a vector field that never vanishes). The obstruction to the existence of a line bundle on $M$ is given by the Euler class of $M$ (see e.g. Davis and Kirk "Lecture notes in Algebraic Topology"). By the Gauss-Bonnet-Chern Theorem, the Euler characteristic is the Euler class evaluated on the fundamental class of $M$, so that, for compact orientable manifolds, the obstruction is precisely $\chi(M)$.