# Uniqueness of dimension of regular submanifold

Suppose $N$ is a manifold of dimension $n$. Now a regular submanifold $S$ of $N$ of dimension $k$ is defined as, if for every point $p$ of $S$ there is a coordinate chart $(U,u_*)$ from a maximal atlas such that $U \cap S$ is defined as the vanishing of $n-k$ coordinate functions on $U$.

My question is whether the dimension of the submanifold is uniquely defined or not? If yes why is it so?

Usually the dimension being constant is axiomatized in all those definitions of manifolds/submanifolds, sometimes not explicitly. In any case, it's easy to see that, given your definition, any point of $S$ has a neighborhood homeomorphic to $\mathbb{R}^k$, for some (possibly varying) $k$. If, in addition, $S$ is connected, it follows from the Invariance of Domain theorem that $k$ never changes. If $S$ is actually a differentiable manifold (say, because $M$ is), then this follows much more easily from the fact that open subsets of euclidean spaces of different dimensions can't be diffeomorphic.