* Covalent bonds form when atoms share electrons to achieve a stable electron configuration.
* Ionic bonds form when one atom transfers electrons to another, creating oppositely charged ions that attract each other.
In CO2:
* Carbon (C) has 4 valence electrons, needing 4 more to achieve a stable octet.
* Oxygen (O) has 6 valence electrons, needing 2 more to achieve a stable octet.
Carbon shares two electrons with each of the two oxygen atoms, forming double bonds. This sharing allows both carbon and oxygen to achieve a stable octet configuration.
Since the atoms are sharing electrons rather than transferring them, CO2 is a covalent compound.