Which statement best explains why silver nitrate is a compound?