This reaction is used as a test to identify which halide ion is present. The test solution is made acidic with nitric acid, and then silvernitrate solution is added dropwise
The role of nitric acid added before silver nitrate is to react with any carbonates present to prevent formation of the white precipitate silver carbonate, giving a false positive result for chloride ions
Chlorides produce a white precipitate
Ag+ (aq) + Cl - (aq) -----> AgCl(s)
Bromides produce a cream precipitate
Ag+ (aq) + Br- (aq) ----> AgBr(s)
Iodides produce a pale yellow precipitate
Ag+ (aq) + I- (aq) ----> AgI(s)
The silver halide precipitates can be treated with dilute or concentrated ammonia solution to help differentiate between them if the colours look similar
silver chloride precipitate redissolves when dilute aqueous ammonia is added
silver bromide precipitate will not redissolve when dilute aqueous ammonia is added
BUT
silver bromide precipitate will redissolve when concentrated aqueous ammonia is added
silver iodide precipitate will NOT redissolve when either concentrated or dilute aqueous ammonia is added