Valence electrons are the electrons in the outermost shell of an atom and are responsible for chemical reactions. In a chemical reaction, atoms gain or lose electrons to achieve a stable electron configuration, which is known as the octet rule. The number of valence electrons an atom has determines its chemical reactivity and how it will bond with other atoms. For example, atoms with only a few valence electrons, such as hydrogen, are highly reactive and will readily form chemical bonds, while atoms with many valence electrons, such as noble gases, are relatively unreactive and do not easily form chemical bonds.