Does hydrogen bromide from hydrogen bonds with itself or water?

Hydrogen bromide (HBr) does not form hydrogen bonds with itself very effectively due to the nature of the hydrogen-bromine bond. The hydrogen-bromine bond is predominantly covalent and results in a polar molecule, but the bromine atom is not very electronegative compared to fluorine, oxygen, or nitrogen, which are commonly found in compounds that participate in hydrogen bonding.

Hydrogen bonding typically occurs when there is a hydrogen atom covalently bonded to an electronegative atom such as nitrogen, oxygen, or fluorine. The hydrogen atom will have a partial positive charge while the highly electronegative atom will have a partial negative charge. This allows for a strong dipole-dipole attraction between the hydrogen atom of one molecule and the electronegative atom of another molecule, forming a hydrogen bond.

When HBr is added to water, however, it can indeed form hydrogen bonds with the water molecules. Water is a highly polar molecule with oxygen atoms that are very electronegative and capable of participating in hydrogen bonding. The interaction between HBr and water typically leads to the protonation of water (forming hydronium ions, H3O+) and the generation of bromide ions (Br-), as HBr is a strong acid and dissociates completely in water:

HBr + H2O → H3O+ + Br-

This reaction is not a typical hydrogen bonding interaction but rather an acid-base reaction. However, before the full dissociation of HBr, the positive end of the polar HBr molecule (the hydrogen atom) may transiently form a hydrogen bond with the negative end of the water molecule (the lone pairs of electrons on the oxygen atom).