Chem question: Do atoms pick their partners?

I have a question that I just can’t seem to find an answer to. I know that atoms will bond with other atoms in order to balance their charges and fill electron shells. So, if sodium walked into a room and chlorine was sitting there, sodium would say “I’m plus one, you’r minus one, let’s get together.”
My question is, if sodium walked into that room and chlorine was there but so was hydrogen (also minus 1), which one would it bond to? This assumes they are all the same distance appart and all of that. I looking for a rule or law on how this works rather than an answer to the example that I gave. Can anyone help me understand how this would work?

A chemist should be along shortly, but I think it works based on how reactive the individual elements are.

Atoms will tend to form the lowest energy compounds, or the lowest energy sum of compounds. Your chloride (chlorine has zero charge chloride has a -1 charge), hydride (once again, hydrogen has charge zero, hydride has a -1 charge) and sodium example has a flaw that there is no counter charge to one of the anions. In such a case, I guarantee that the sodium would form a complex with both the hydride and the chloride. But such a situation is only likely to happen in the vacuum of a mass spectrometer or something.

I think what your asking though, is if certain atoms will always bond with one atom in preference to another. The answer to that is mostly yes. Fluoride will quickly bond with calcium and silicon. There can be many complicating factors though. You can’t just throw some calcium carbonate on a peice of teflon and expect to get calcium fluoride. The fluorine in teflon is already really tightly bonded to carbon. If you got it hot enough to break the carbon fluorine bond, you might get a reaction.

Not a chemist, but it sounds like Electronegativity is what you’re looking for. The larger the difference, the stronger the bond. It would also be a tendency, not a hard and fast law. Your Sodium would rather bond with Chlorine than Bromine, but if both were present, any one Sodium atom might bond with Bromine.

It’s more than just electronegativity. There is also hard and soft. Hard atoms tend to bond with other hard atoms, and soft atoms bond with soft atoms.

And there is also Ionic Potential, which is described as the ratio of valence to ionic radius. For ions of a similar charge (such as Fe[sup]2+[/sup] and Mg[sup]2+[/sup]) that may both fit in a specific crystal structure, the one with the higher IP (i.e., the one with the smaller ionic radius) will be preferentially incorporated. Likewise, for ions of a similar size (such as K and Ba) but with different valences (+ and 2+, respectively), the one with the higher IP (in this case, Ba) will be preferentially incorporated.