Energy and Matter in the Ecosystem