  We re-examine the well-studied one dimensional spin-1/2 $XY$ model to reveal
its nontrivial energy spectrum, in particular the energy gap between the ground
state and the first excited state. In the case of the isotropic $XY$ model --
the $XX$ model -- the gap behaves very irregularly as a function of the system
size at a second order transition point. This is in stark contrast to the usual
power-law decay of the gap and is reminiscent of the similar behavior at the
first order phase transition in the infinite-range quantum $XY$ model. The gap
also shows nontrivial oscillatory behavior for the phase transitions in the
anisotropic model in the incommensurate phase. We observe a close relation
between this anomalous behavior of the gap and the correlation functions. These
results, those for the isotropic case in particular, are important from the
viewpoint of quantum annealing where the efficiency of computation is strongly
affected by the size dependence of the energy gap.
