Find the length of a position

how to find the length of a given position , e.g a(x,y) and b (x,y), i want to find out the length of a to b, any function to use? thanks