The alteration of rocks or minerals by interaction with liquids. The alteration must only take place if the rock or mineral was not in a molten state in order for it to be metasomatism.