You may calculate the distance between two points in a a space using the Manhattan Distance. You may use the Euclidean Distance. Both these algorithms are generalized by the Minkowski Distance algorithm.
You may use algorithms like these for to do collaborative filtering. For example, you could compute the distance between two users in a space.