There exists a law that describes the behavior of matter in nature and it states that the amount of matter does not change during a chemical procces. This principle is called the law of conservation of matter.
Hence, the matter can be converted from one form into the other, along with the conversion of energy. There exists also a principle that states that the energy is never destroyed but it is converted from one form into the other. The principle that describes the behaviour of energy is called the law of conservation of energy.
There exists a mathematical equation that describes the first law of energy , such that:
`Delta U = Delta Q - Delta W`
`Delta U` represents the increase of internal energy of a system
`Delta Q` represents the heat added to system
`Delta W` represents the work done by the system ( the amount of heat released by the system)
The second law of energy states that `Delta U != 0` , hence, `Delta Q != Delta W` , thus, heat is never completely converted into work.