How energy moves through an ecosystem
Every ecosystem runs on a budget it did not choose, and almost all of that budget is lost at each step. Roughly a tenth of what one level holds reaches the next. That single number explains why large predators are rare, why food chains are short, and why the shape of life on Earth is a pyramid rather than a column.
Energy flows, matter cycles
These two are constantly confused and are genuinely different, and getting them apart makes the rest straightforward.
Matter cycles. The carbon in a leaf becomes carbon in an animal, then carbon in soil, then carbon in another leaf. The atoms go round indefinitely, and the total does not change.
Energy does not cycle. It enters, largely as sunlight, moves in one direction through living things, and leaves as heat. It cannot be recovered, reused, or recycled, because every transfer loses some of it and the loss is not retrievable. An ecosystem is therefore not a closed system in any useful sense: it is a river of energy passing through a fixed quantity of matter, and if the inflow stops, everything stops with it.
The ten per cent rule
When something eats something else, most of the energy does not become the eater. It was already spent by the prey on staying alive, or it passes through undigested, or it is lost as heat in the business of digestion itself.
The rough figure is that about ten per cent of the energy at one level ends up in the level above. It varies a great deal, from a few per cent to a bit over twenty, but as an order of magnitude it holds, and its consequences are severe.
Three consequences follow directly, and each answers a question people ask without realising it is the same question.
Food chains are short. Four or five levels is typical and six is rare, because after five steps of tenfold loss there is one hundred-thousandth of the original energy left, which will not support a viable population of anything.
Large predators are rare and need enormous ranges. Not because they are inefficient, but because the pyramid beneath each one has to be very wide. This is also why they are the first to disappear when an ecosystem is disturbed: they sit at the thin end of the longest chain of dependencies.
Eating lower down the chain feeds more. The same land supports far more people growing crops than raising animals on those crops, and the ratio is roughly the transfer efficiency. That is not an argument about ethics, it is the same ten per cent.
The half of the system nobody draws
Decomposers are usually a footnote in the diagram and are closer to the main event. Every organism at every level eventually dies, and the great majority of biological material goes to decomposers rather than to predators.
What they do is specifically a matter transaction, not an energy one. They break dead material back into forms producers can use, which is what keeps the matter cycle turning. They do not return energy to the base of the pyramid, because that energy is heat and heat is gone. An ecosystem with no decomposers would not run out of energy, it would suffocate in accumulated matter it could not reuse.
The same accounting, in a world you can watch
This world implements the flow rather than describing it, and does so strictly enough that the simulation halts if the books do not balance.
Energy enters as a fixed influx and moves through seven audited reservoirs: the environmental resource pool, an organism's gut, its body, matter in the world, detritus from the dead, and cumulative totals for what has arrived and what has been dissipated. Every transfer between them is counted. Death moves energy from body to detritus, decay moves it from detritus back to resource, and living dissipates it permanently. The full picture, with the diagram, is in where the energy goes.
Two honest differences from the picture above are worth stating. This world has no established multi-level trophic pyramid to point at: there is a biological ingestion mechanism, but no demonstrated stable predator level sitting on a herbivore level in the way the diagram shows, and claiming one would be claiming more than has been measured. And the loss at each transfer is set by this world's own constants rather than tuned to reproduce ten per cent, so the numbers here are not a model of Earth's numbers.
What does carry over exactly is the shape of the constraint. Energy arrives at a fixed rate, is lost at every step, and never returns. Everything a population can do is bounded by that, and every population crash you see on the graph is that bound asserting itself, which is the subject of why populations boom and crash.