Ionic compounds
When nitrogen and bromine react, the nitrogen atom loses three electrons to the bromine atom, resulting in the formation of the positively charged nitrogen ion (N3+) and the negatively charged bromide ion (Br-). These ions then combine to form an ionic compound called nitrogen tribromide (NBr3).
Nonpolar covalent compounds
When nitrogen and bromine react under different conditions, they can also form a nonpolar covalent compound called nitrogen trichloride (NCl3). In this compound, the nitrogen and chlorine atoms share electrons equally, resulting in a neutral molecule.
The type of compound that is formed between nitrogen and bromine depends on the reaction conditions, such as temperature and pressure.