Let $f(x, y)=(x-y)^2$. We want to find the singular points. We do the following:
Let $P=(a, b)$ be the singular point.
$$f(a,b)=0 \Rightarrow (a-b)^2=0 \Rightarrow a=b \\ \frac{\partial{f}}{\partial{x}}(a,b)=0 \Rightarrow 2(a-b)=0 \Rightarrow a=b \\ \frac{\partial{f}}{\partial{y}}(a, b)=0 \Rightarrow -2(a-b)=0 \Rightarrow a=b$$
So is the singular point $P=(a,a)$ ?