When hydrogen reacts with a metal, does it form a cation or an anion?

Would it be a cation? Thank you in advance.

It forms an anion.

In hydrides the oxidation state of H is -1.
LiH, NaH, MgH2

Oh OK, thank you!

When hydrogen reacts with a metal, it tends to lose its electron and forms a cation. This is because hydrogen, with its one electron, has a tendency to donate that electron to the metal, which has a lower ionization energy. As a result, the metal gains an electron and forms a positive cation, while hydrogen loses its electron and becomes a positively charged ion.

To understand why hydrogen forms a cation, we need to consider the electronic structure of hydrogen and metals. Hydrogen, with its single electron, has a configuration of 1s1. Metals, on the other hand, have relatively low ionization energies due to the presence of only a few valence electrons in their outermost energy level. This low ionization energy makes it energetically favorable for metals to accept an electron.

To determine whether hydrogen forms a cation or an anion in a specific reaction, you would need to know the specific metal with which it is reacting. Generally, metals in groups 1 and 2 of the periodic table tend to form cations when reacting with hydrogen. However, it's essential to consult the reactivity series or specific reaction conditions to obtain a definitive answer.