According to the law of conservation of mass,mass can neither be created nor be destroyed.so why every equation is not a balanced equation?
for example mg+o2--->mgo.where does one atom of oxygen go?why is the mass not same on both sides of equation?
Equations are just things people use to represent what is happening in nature. Sometimes they are very exacting, and show the balanced equation, and sometimes they are just showing what reactants produce what products. In nature, those equations are balanced, because as you say, mass is not created or destroyed. The actual action of the molecules in nature reflects a balanced equation.
I believe you are talking about balancing of chemical equation. When a chemical equation is not balanced it means that that is is not representing the reality correctly. An incorrect equation may or may not conform the law of conservation of mass. It makes no sense in drawing conclusion about validity of law of conservation of mass or of any other law based on an incorrect equation.
Taking specifically the chemical equation referred in the question, that is
Mg + O2 --> MgO
The equation is incorrect because it implies that 1 atom of Mg combining with 2 atoms of oxygen will produce 1 molecule of MgO, which contains 1 atom of magnesium (Mg) and 1 atom of oxygen (O). Thus the left hand side of equation has 2 atoms of oxygen while right hand side has only 1 atom of oxygen. Obviously this equation is incorrect. To make the equation correct, we will need to balance it in such a way that atoms of each of magnesium and oxygen are same on both the side. We do this by changing the equation to:
2Mg + O2 --> 2MgO
Please note that when a chemical reaction is represented in the form of a chemical equation, the equation must be balanced. An imbalanced chemical equation is as improper and incorrect as word written with wrong spelling or a sentence with incorrect grammar.Imbalanced equations should not be used of representing chemical reactions.
the valance electrons are added to the outside of the other elements valance electrons. they are both equal in away it is just hard to see
The equation is 'most' correctly expressed as 2mg+o2-->2mgo. A lot of the time in chemistry textbooks unbalanced equations like this are provided to merely provide the reaction (what you end up with and what you started with) rather than the exact ratios.