  We have performed first-principles evolutionary searches for all stable
titanium nitrides and have found, in addition to the well-known rocksalt-type
TiN, new ground states Ti$_3$N$_2$, Ti$_4$N$_3$, Ti$_6$N$_5$ at atmospheric
pressure, and Ti$_2$N and TiN$_2$ at higher pressures. The latest nitrogen-rich
structure presents encapsulated N$_2$ dumbbells with a N-N distance of 1.348
{\AA} at 60 GPa and TiN$_2$ is predicted to be mechanically stable
(quenchable). Our calculations of the mechanical properties (bulk modulus,
shear modulus, Young's modulus, Poisson's ratio, and hardness) are in excellent
agreement with the available experimental data and show that the hardness of
titanium nitrides increases with increasing nitrogen content. The hardness of
titanium nitrides is enhanced by strengthening directional covalent bonds and
disappearance of Ti-Ti metallic bonds. Among the predicted compounds, TiN$_2$
has the highest hardness of 27.2 GPa.
