- Negative thermal expansion is an uncommon phenomenon of theoretical interest. Multiple hypotheses regarding its microscopic origins have been suggested. In this paper, the thermal expansion of a representative semiconductor, Si, and a representative metal, Ti, are calculated ab initio using density-functional perturbation theory. The phonon modes' contributions to the thermal expansion are analyzed and the negative thermal expansion is shown to be dominated by negative mode Gr\"uneisen parameters at specific points on the Brillouin zone boundaries. Thus, the elastic (Debye) theory for negative thermal expansion is shown to be irrelevant for these phenomena. The anomalous behavior of these modes in Ti is shown to be unaffected by an electronic topological transition as previously suggested, instead it arises from complex interplay of atomic displacements of the anomalous mode.