The bare minimum you need is some way of taking two items and returning a number that tells you how similar they are, or more usefully, how far apart they are.Of course, if I know that A and B are a certain distance apart, and B and C are a certain distance apart, I might like to infer something about the distance between A and C. This is what the triangle inequality gives you, and so the most ele