Definition of singular points on an algebraic curve From what I understood, given a point $p$ on a scheme $X$ over a field $k$, we have 
\begin{equation}
\dim \mathcal{O}_{X,p} \leq \dim_{\mathcal{O}_{X,p}/\mathfrak{m} }\mathfrak{m}/\mathfrak{m}^2
\end{equation}
where $\mathfrak{m}$ is the maximal ideal in $\mathcal{O}_{X,p}$. The point $p$ is then called a regular point when equality holds and it is called a singular point otherwise. I'm trying to understand the intuition behind is definition, at least in the simplest case like a curve on an affine plane $\mathbb{A}^2_k = \operatorname{Spec}k[x,y]$. 
A point $(x_0,y_0)$ on an algebraic curve $f(x,y) = 0$ is singular if $\partial f/\partial x = \partial f/\partial y = 0$ at $(x_0,y_0)$. We can define a subscheme $Z = \operatorname{Spec} k[x,y]/(f(x,y))$ from an algebraic curve $f(x,y) = 0$ where $f \in k[x,y]$. Then picking any point $\mathfrak{m} = (x - x_0,y - y_0) \in Z$ we can consider
\begin{equation}
\dim (k[x,y]/(f(x,y)))_{(x-x_0,y-y_0)} \leq \dim_k (x-x_0,y-y_0)/(x-x_0,y-y_0)^2
\end{equation}
Correct me if I'm wrong but I think the right hand side is just a $k$-vector space spanned by $\{x - x_0, y - y_0\}$, so the dimension is 2 for every point $\mathfrak{m} \in Z$. I'm not quite sure how to evaluate the left hand side. 
Could someone please explain to me the connection between this and the definition of singular point via derivatives? Why should we have a strict inequality when $\partial f/\partial x = \partial f/\partial y = 0$ and equality otherwise? Any intuitive insides into the definition in the general case are more than welcome too. Thank you! 
 A: Actually, for the special case of plane curves, the connection is immediate:
We can assume $p=(0,0)$ of course, so the curve $X= \operatorname{Spec} k[x,y]/(f)$. is given by $f \in k[x,y]$ with $f \in \mathfrak m = (x,y)$.
We have $\dim \mathcal O_{X,p} = 1$ and the maximal ideal corresponding to $p$ in $k[x,y]/(f)$ is $\mathfrak m/(f)$, so we can compute
$$(\mathfrak m/(f)) / (\mathfrak m/(f))^2 = (\mathfrak m/(f))/(\mathfrak m^2 + (f)/(f)) \cong \mathfrak m /(\mathfrak m^2 + (f))$$
We have a natural surjection $\mathfrak m /\mathfrak m^2 \twoheadrightarrow \mathfrak m /(\mathfrak m^2 + (f))$ from a two-dimensional vector space to $\mathfrak m /(\mathfrak m^2 + (f))$. Hence this is one-dimensional iff this surjection is not an isomorphism which is the case iff $f \notin \mathfrak m^2 = (x^2,xy,y^2)$, which precisely means that some second partial derivative does not vanish in $p=(0,0)$.

In your attempt, there is a serious missunderstanding about how to look at $\mathfrak m/\mathfrak m^2$. In the two-dimensional polynomial ring, this looks like $(x,y)/(x^2,xy,y^2)$ and is two-dimensional. But after dividing out $f$, this looks like $(x,y)/(x^2,xy,y^2,f)$ and $f$ might give some realation between the two generators $x,y$, which makes this one-dimensional.
