I'm reading Eisenbud's "Geometry of Schemes" now. In the book, dimension of a scheme $X$ is defined by supremum of local dimension $\dim(X, x)$, where $\dim(X, x)$ is Krull dimension of stalk $\mathcal{O}_{X, x}$. Also, $x$ is "singular " if local dimension is strictly smaller than dimension of Zariski (co)tangent space $\mathfrak{m}_{X,x}/\mathfrak{m}_{X, x}^{2}$ over residue field $k(x)=\mathcal{O}_{X, x}/\mathfrak{m}_{X, x}$.
Intuitively I understand these definitions, but it was hard for me to compute these. For example, a circle $$X=\mathrm{Spec}\mathbb{R}[x, y]/(x^{2}+y^{2}-1)$$ would be nonsingular at all point, especially at $(x-1, y)\in X$. I think that local dimension and dimension of Zariski (co)tangent space will be same as 1, but I failed to compute these. Actually, I can't even convince that residue field at $p=(x-1, y)$ is $\mathbb{R}$.
Also, I think that if we consider union of line and circle, $$Y=\mathrm{Spec}\mathbb{R}[x, y]/(y(x^{2}+y^{2}-1))$$ then the point $p$ will be singular and $\dim (Y, p)=1, \dim_{k(p)}\mathfrak{m}_{Y,p}/\mathfrak{m}_{Y, p}^{2}=2$. Are there any concrete algorithms to compute these?