Let $f:\mathbb{R}^D\to \mathbb{R}^p$ where $p=D-d$, let $J_f(x)$ be the $p\times D$ Jacobian of $f$ (we assume $f$ is at least $C^2$ smooth), and let $N(x)$ be the matrix obtained from orthonormalizing the rows of $J_f(x)$, so that $N(x)N(x)^T=I_{p\times p}$. Consider the manifold $M=f^{-1}(\{0\})$ where $0$ is the zero vector of $\mathbb{R}^p$ and let $$P(x) = I_{D\times D} -N(x)^TN(x).$$
It is easy to prove that $P^2(x)=P(x)=P(x)^T$, thus $P$ is an orthogonal projection of $\mathbb{R}^D$ onto some subspace of $\mathbb{R}^D$.
Question Without any other a-priori knowledge, can we find the image and kernel of $P$?
Attempts I believe $$\ker P(x) = \operatorname{span}\{\nabla f^1(x), \dotsc, \nabla f^p(x)\}$$ and $$\operatorname{im} P(x) = S_0$$ where $S_0$ is the subspace through $0$ parallel to the tangent space of $M$ at $x$, $TM_x$. But I am not sure how to prove these statements. I have some idea for the former, since $P^2=P$ implies that the only eigenvalues are $0$ and $1$, we can (some how?) infer these also have multiplicity $p$ and $d$ respectively. The eigenvectors with eigenvalue $0$ are in the kernel of $P$, and if a vector is in the kernel, it must be an eigenvector with eigenvalue zero. I believe there is some fact that says these two eigenspaces should be orthogonal complements of one another, due to the special properties of $P$ ($P^2=P$ and diagonalizable, maybe?). If we knew the image was the tangent space (or rather subspace through zero parallel to it) then the orthogonal complement is given by the span of the gradients, since these are normal vectors to the manifold $M$.
I am not an expert in differential geometry, and the textbooks I have deal almost entirely with intrinsic matters (studying metric tensors, etc). So it would be great if someone could help me clarify these matters or provide a reference to texts that deal with regular submanifolds, orthogonal projections, etc extrinsically. Please correct any mistakes I have made and comment for clarifications.