You store your entered user input in a matrix, say N. As you wrote N is of dimension n*2.
The distance of a point from the first one is like you wrote
You can write a loop to calculate this
for p = 1:n
d(p) = sqrt((N(n,1)-N(1,1))^2+(N(n,2)-N(1,2))^2)
This gives you the distance from each point to the first one, with "d(0) = 0" of course.