Answer
Solution: It is not possible to check if water is hard by using a detergent because detergents are salts of ammonium or sulphonates of long-chain carboxylic acids. Unlike soaps, they do not react with calcium and magnesium to distinguish the nature of water.