As I understand it, soap is a potassium or sodium salt of a long carbon chain fatty acid. The fatty acid hates water and wants to keep away from it, like a cat finding it has snowed outside. The head of the soap molecule is more like a labrador who has just seen his owner chuck a stick in a lake. So it's basically a cat tied to a labrador by a fuzzy cord. The cat will cling to anything, including magnesium and calcium ions.(Kind of.)Detergents (long-chain carboxylic acid quaternary ammonium salts -- a hydrophobic cap on a long chain hydrocarbon attached to a hydrophilic head) have a cat at the end of a long leash tied to a golden retriever. This cat is pickier -- say a Siamese? (I don't know cats.)Detergents dissolve in hard water without forming a scum, unlike soap, because the cat doesn't like Calcium or Magnesium so much.Um. This metaphor got away from me.Sam