for the complex ion equilibria between AgCl and NH3, why does NH3 replace Cl- and how do we know that we have to add 2 infront of NH3? Is the product a salt compound?

Ag + 2NH3= Ag(NH3)2+

The NH3 doesn't replace the Cl-. AgCl is not very soluble. The AgCl that does dissolve solvates with water forming in solution Ag(H2O)2+ and Cl-. (the 2 is a subscript) The NH3 coordinates more strongly than water, so the NH3 replaces the coordinated water. The compound that actually forms is Ag(NH3)2Cl. (again, the 2 is a subscript)

In the complex ion equilibria between AgCl and NH3, NH3 replaces Cl- because NH3 is a stronger ligand than Cl-. Ligands are molecules or ions that can donate a pair of electrons to form a coordinate bond with a metal ion. In this case, NH3 has a lone pair of electrons that can form a coordinate bond with Ag+ ion.

To determine the stoichiometry of the complex formed, we look at the charges of the ions involved. Ag+ has a charge of +1, while NH3 has no charge. Therefore, to balance the charges, we need two NH3 molecules to combine with one Ag+ ion, resulting in Ag(NH3)2+.

The product, Ag(NH3)2+, is not a salt compound but a coordination complex. Coordination complexes consist of a central metal ion (Ag+ in this case) surrounded by ligands (NH3). The complex is held together by coordinate bonds, where the ligands donate a pair of electrons to the metal ion.