Ecosystems vary in size and complexity and are categorized into terrestrial and aquatic types. This section outlines the structure of ecosystems, detailing biotic and abiotic components, species composition, stratification, and the dynamics of productivity, decomposition, energy flow, and nutrient cycling.