Answer:
Adding or removing energy from matter causes a physical change as matter moves from one state to another. For example, adding thermal energy (heat) to liquid water causes it to become steam or vapor (a gas). And removing energy from liquid water causes it to become ice (a solid).
Chemical is the answer your looking for.
The reaction for magnesium iodide when put into water is as below
MgI2(s) → Mg^2+(aq) + 2I^-(aq)
when magnesium iodide but into water it dissociate/ ionize completely into Mg^2+ and 2l^- ions. Magnesium iodide dissociate/ionize completely because magnesium iodide is a strong electrolyte which dissociate/ ionize completely into their ions when it is put into water .