Dear Student
Producers convert solar energy into chemical energy in the form of organic compounds. The primary consumers derive nutrients from the producers. According to Energy Transfer Law, only 10% of energy is transferred from one trophic level to other. So the energy that is captured by autotrophs is not revert back to sun and the energy transferred to herbivores does not came back to autotrophs. It just keep on moving to next trophic level in unidirectional way. That is why, flow of energy in an ecosystem is linear.
Meaning of linear is that it progresses from one stage to next in a straight line.
Regards