The sun is a main source of energy, the plant in the picture is absorbing energy from the sun and carbon dioxide. The plant then uses the carbon dioxide to grow and make photosynthesis.
The pig is going to eat the plant and absorb only 10% of its energy. If another animal came along and ate the pig, that animal will receive 10% of the other 10% the pig got from the plant.
While the pig is eating the plant the pig is absorbing phosphorus from it. The plant got the phosphorus from the soil so the plant could use it. This is called mineralization.
The pig dies and is decomposing. While the pig decomposes it is releasing nitrogen into the soil. Nitrogen is also being put into the soil by the air which is called fixation.
Water is essential to all life forms and it can be simple or complex. You know when your cup sweats in the summer time well that a step in the water cycle and it's called condensation. There many other steps in the water cycle.
Energy and matter transfer in different ways. Energy only flows unidirectionally while matter cycles through and ecosystem.