Here's how it's derived:
* Ammonium ion (NH₄⁺): Ammonium is a polyatomic ion with a +1 charge.
* Sulfide ion (S⁻²): Sulfide is a polyatomic ion with a -2 charge.
To form a neutral compound, you need to balance the charges. Since ammonium has a +1 charge, and sulfide has a -2 charge, you need two ammonium ions to balance the charge of one sulfide ion.
This gives us the final formula: (NH₄)₂S