The metals of the first two groups have higher atomic volume. The transition metals have higher masses than alkali and alkaline earth metals. This, combined with the fact that the atomic volume of transition metals is lower than that of the alkali and alkaline earth metals explains the increased density.