TeX source:
d=\sqrt{\left(x_2-x_1\right)^{2}+\left(y_2-y_1\right)^{2}}