In the K-nearest-neighbors model, we use
\begin{equation}
\hat{f}(x)=Ave(y_i \mid x_i \in N_k(x))
\end{equation}
where $N_k(x)$ is a neighborhood of a certain size of x.
What is the actual distance that we use to determine the neighborhood of x? At first i thought that it was $d((x_i,y_i),(x,y))=\sqrt{(x_i-x)^2+(y_i -y)^2}$ but that's not the case. The distance used (i think) is $d(x_0,x)=\left|x_0 - x \right|$. It seems to me that using the first distance is more intuitive, but then it's not the one that is used. Why?
Thanks