What is the relationship between matter and energy in an ecosystem.