My question is very simple

Why do metals when react with oxygen are called oxides like " magnesium oxide" whereas non metals reacting with oxygen become dioxides like "carbon dioxides" , note that the two react with oxygen which has 2 molecules

Carbon has two possible common oxides; i.e., CO (carbon monoxide) and CO2 (carbon dioxide). The prefixes mono and di are necessary to distringuish between the two possible compounds. MgO forms just the one oxide. Al2O3 is aluminum oxide because there is no problem in knowing what oxide we are discussing. I hope this helps.

But Sulphur reacting with oxygen becomes suphur dioxide ?

Yes, because S has more than one oxide; i.e., SO, SO2, and SO3 as in sulfur monoxide, sulfur dioxide, and sulfur trioxide.

So still all of them are gases!

thnx alot

In this case, yes. It may be interesting that SiO2, a solid, is called silicon dioxide but SiO2 is the only oxide of Si as far as I know. So there are some exceptions to what I have written. In the case of Si, I susspect the name dioxide was put on it many years ago, since it is such a common compound (sand), and the name has stuck as the dioxide. I don't have any proof of that, however.

The naming convention for compounds formed between metals and oxygen versus non-metals and oxygen is related to the combining capacities of the elements involved.

When metals react with oxygen, they typically form compounds called oxides. This is because metals tend to lose electrons during chemical reactions and form positive ions known as cations. Oxygen, on the other hand, gains electrons and forms negative ions called anions. The ratio of metal cations to oxygen anions in metal oxides is often 1:1. For example, magnesium (Mg) reacts with oxygen (O2) to form magnesium oxide (MgO), where one magnesium cation combines with one oxygen anion.

Non-metals, such as carbon, have a different behavior when they react with oxygen. Non-metals tend to gain or share electrons during chemical reactions, forming negative ions or covalent bonds. When non-metals react with oxygen, they usually combine with two oxygen atoms to form compounds called dioxides. For instance, carbon (C) reacts with oxygen (O2) to form carbon dioxide (CO2), where one carbon atom combines with two oxygen atoms.

In summary, the naming convention of oxides versus dioxides is based on how metals and non-metals interact with oxygen due to their different electron transfer or sharing behaviors. Metals form oxides with a 1:1 ratio of metal cations to oxygen anions, while non-metals form dioxides by combining with two oxygen atoms.