Question: are hydroxide ions soluble in water?
Answer: Magnesium hydroxide appears to be insoluble in water. However, if you shake it with water, filter it and test the pH of the solution, you find that it is slightly alkaline. This shows that there are more hydroxide ions in the solution than there were in the original water. Some magnesium hydroxide must have dissolved.