Unified theory of the mechanical behavior of matter