Existence of local isometric embedding of smooth $(M^{d-2},g)$ in $\mathbb{R}^{d-1}$ I'm posting this question in hopes that someone more familiar with the literature will be able to point me in the right direction (or give an obvious answer).
Let $M^{d-2} \hookrightarrow \mathbb{R}^d$ be a smooth embedding and let $g$ be the metric induced on $M$ from the flat metric on $\mathbb{R}^d$. Under what conditions can $M$ be viewed (locally) as an isometrically-embedded hypersurface of $\mathbb{R}^{d-1}$?
In the case where $d=3$, it is fairly clear: for a curve in $\mathbb{R}^3$, if the torsion of the spacecurve vanishes, then the spacecurve is a planecurve. What is not clear to me is how this notion generalizes to higher dimensions.
I have considered two directions. My first guess is that there must exist a covariantly constant normal vector field in the normal bundle of $M$. This generalizes the notion that the direction of the binormal of a spacecurve is fixed when the spacecurve is actually a planecurve.
My second instinct is that there must exist a tensor $II \in \Gamma(\odot^2 T^* M)$ such that
$$R_{abcd} = II_{ac} II_{bd} - II_{ad} II_{bc}\,,$$
in line with the Gauss equation. Clearly, this condition is necessary but it is not obvious if it sufficient.
If anyone knows of literature on this subject, I'd love to be pointed in that direction. This seems like a rudimentary-enough question that it must have been studied. The literature I have found discusses the embeddability of surfaces in $\mathbb{R}^3$ - this is always possible by the Burstin-Cartan-Janet Theorem, but it's a special case because $3$ is the Janet dimension for surfaces, and this coincidence does not hold for $d \geq 5$. The Nash embedding theorem seems to give upper bounds, but that's not exactly the kind of result I'm looking for.
 A: It's hard to answer the OP's question satisfactorily without considering what would actually constitute an answer.  The most obvious answer is tautological:  $M^{d-2}\hookrightarrow\mathbb{R}^d$ lies in a hyperplane if and only if there is a nonzero affine function $\ell:\mathbb{R}^d\to\mathbb{R}$ such that $\ell(M^{d-2}) = \{0\}$.  It seems clear that the OP wouldn't consider that criterion an answer though, because it requires one to test for the existence of something for which it may not be clear how to test.  Instead, it seems that the OP wants an answer of the form "If certain differential-geometric invariant quantities defined on $M^{d-2}\subset\mathbb{R}^d$ vanish, then $M^{d-2}$ lies in a hyperplane.  One might also hope for a 'converse' that said that if $M^{d-2}\subset\mathbb{R}^d$ lies in a hyperplane, then those quantities do vanish.
Here is a cautionary example worth considering:  Let $f:\mathbb{R}\to\mathbb{R}$ satisfy $f(t) = 0$ for $t\le0$ and $f(t) = e^{-1/t}$ for $t>0$.  Now consider the smooth space curves $\alpha,\beta:\mathbb{R}\to\mathbb{R}^3$ defined by
$$
\alpha(t) = \bigl(t,f(t),f(-t)\bigr)\quad\text{and}\quad
\beta(t) = \bigl(t,f(t)+f(-t),0\bigr)
$$
All of the differential invariants of $\alpha$ and $\beta$ are equal (in particular, they both have vanishing torsion), but $\alpha(\mathbb{R})$ does not lie in a plane while $\beta(\mathbb{R})$ clearly does.
The issue is that if an immersed space curve $\gamma:\mathbb{R}\to\mathbb{R}^3$ lies in a plane, then, $\gamma',\gamma'',\gamma'''$ must be linearly dependent, so in particular, the third order polynomial differential invariant $I_3 = (\gamma'\times\gamma'')\cdot\gamma'''\,(\mathrm{d}t)^6$ must vanish identically. However the vanishing of $I_3$, by itself, is not enough to guarantee that $\gamma'''$ is a linear combination of $\gamma'$ and $\gamma''$ with smooth coefficients (which would indeed imply that $\gamma(\mathbb{R})$ lay in a plane).  To get this, one needs an additional nondegeneracy condition, usually taken to be the condition that $\gamma'$ and $\gamma''$ be linearly independent.  (It turns out, though, that it suffices to impose the weaker nondegeneracy condition that the second order polynomial differential invariant $I_2 = (\gamma'\times \gamma'')\cdot(\gamma'\times \gamma'')\,(\mathrm{d}t)^6$ only vanish to finite order at any point of $\mathbb{R}$.)  [Note that, with regard to an element of arc-length $\mathrm{d}s$, defined up to a sign by $I_1 = (\gamma'\cdot\gamma')\,(\mathrm{d}t)^2 = (\mathrm{d}s)^2$, one has $I_2 = \kappa^2\,(\mathrm{d}s)^6$ and $I_3 = \tau\kappa^2(\mathrm{d}s)^6$, where $\kappa$ and $\tau$ have their usual meanings.]  In the above pair of examples, $\alpha$ and $\beta$ have the same invariants $I_k$ for $k=1,2,3$, but $I_2$ vanishes to infinite order at $t=0$.
In higher dimensions, something similar has to be done, i.e., one has to identify conditions on the polynomial differential invariants of $M^{d-2}\subset\mathbb{R}^d$ that hold when $M^{d-2}$ lies in a hyperplane and then impose nondegeneracy conditions before the vanishing of these invariants suffices to imply that $M^{d-2}$ does, in fact, lie in a hyperplane.
The most obvious condition (as mentioned by Yang and Petrunin) is that the rank $r$ of the second fundamental form $I\!I$ of $M$ should be at most $1$ at every point.  This is equivalent to the vanishing of a second order polynomial differential invariant that is asection of $\Lambda^2(S^2(T^*M))$ that we can write informally as $I_2 = {I\!I}\wedge{I\!I}$.  It's easy to see that the variety of second fundamental forms $I\!I$ at a point that satisfy this condition has codimension $\tfrac12 d(d{-}3)$, so this is already a fairly stringent condition as soon as $d>3$.
Another important invariant is what some authors call the nullity $\nu(p)$ of $I\!I$ at $p\in M$, i.e., the dimension of the subspace $N_p\subset T_pM$ consisting of the vectors $v\in T_pM$ such that ${I\!I}_p(v,u)=0$ for all $u\in T_pM$.  Note that bounding the nullity from above is an open condition on $I\!I$, so one can regard it as a nondegeneracy condition.
Using these terms, one has the following special case of a classic consequence of the structure equations:
Theorem: If $M^{d-2}\subset\mathbb{R}^d$ has its second fundamental form of rank $r\le 1$ at every point and nullity at most $d{-}4$ at every point, then $M^{d-2}$ lies in a hyperplane.
Note that the above theorem is vacuous for $d=3$, but, for $d\ge 4$, it gives a sufficient criterion for $M$ to lie in a hyperplane that depends only on second-order information.  As we have seen, though, when the nullity is allowed to be as large as $d{-}3$, one has to go to third order information and, even then, put some condition on the locus where the nullity is as large as $d{-}2$ (i.e., where the second fundamental form vanishes) in order to conclude that $M$ lies in a hyperplane.
A: The case $d=4$ is an open problem.
It is easy to find a local embedding of any surface in $\mathbb{R}^4$ and
it is unknown if any surface is locally isometric to a hypersurface in $\mathbb{R}^3$.
Now suppose $d\geqslant5$.
As you stated, the equation on the second fundamental form must have a solution.
Note that this solution is unique most of the time (see below); it may have different solutions only if the curvature vanish at the given point.
Let us assume that the curvature tensor is not zero at any point.
In this case we get first and second fundamental form on $M$ and it remains to answer if they correspond to a local embedding.
I am sure that there is an appropriate generalization of Peterson--Codazzi formulas that cover this case.
Why the solution is almost unique.
If solution exists, then the curvature tensor splits; that is, there is a orthonormal frame $e_1,\dots,e_{d-2}$ in the tangent space of $M$ at any point such that the $e_i\wedge e_j$ are eigenvectors of the curvature operator.
Morevoer, the $e_1,\dots,e_{d-2}$ are principal directions of the second fundamental form.
Denote by $K_{ij}$ the sectional curvature in the direction $e_i\wedge e_j$. Furhter, denote by $\kappa_i$ the principal curvature in the direction $e_i$. Then we have equations
$$\kappa_i\cdot\kappa_j=K_{ij}$$
for $i\ne j$.
If $K_{ij}=0$ for all $i$ and $j$, then we have many solution.
But if say $K_{ij}\ne0$ for some $i\ne j$, then
$$\kappa_m=\pm\sqrt{\frac{K_{im}\cdot K_{jm}}{K_{ij}}}$$
for any $m$ distinct from $i$ and $j$. (Here we need that $d\geqslant 5$.)
And now it is easy to get a unique solution up to sign.
A: $\newcommand\R{\mathbb{R}}$The simplest condition is simply that there exists a nonzero vector $n \in \R^d$ such that for any $v \in T_pM$, $$ n\cdot v = 0. $$
If you write the embedding as a map $u: M \rightarrow \R^d$, where, with respect to local coordinates $(x^1, \dots, x^{d-2})$ on $M$,
$$ \partial_iu\cdot \partial_ju = g_{ij},
$$
where $g = g_{ij}\,dx^i\,dx^j$ is the metric tensor on $M$. You can check that
$$
\partial^2_{ij}u = \Gamma^k_{ij}\partial_k + II_{ij},
$$
where $II$ is the second fundamental form. Since $M$ has codimension grater than $1$, each component of the second fundamental form is a vector $II_{ij} \in \R^d$ that is normal to $T_pM$.
Then, setting $v = \partial_i u$ and differentiating the equation
$$
n\cdot\partial_iu = 0,
$$
we get
\begin{align*}
0 &= \partial_j(n\cdot \partial_iu)\\
&= n\cdot \partial^2_{ij}u\\
&= n\cdot (\Gamma_{ij}^k\partial_ku + II_{ij})\\
&= n\cdot II_{ij}.
\end{align*}
Now observe that the second fundamental form defines at each point $p \in M$ a linear map
\begin{align*}
II_p: T^\perp_pM &\rightarrow S^2T_pM\\
\nu &\mapsto \nu\cdot II_{ij}\partial_iu\otimes\partial_ju.
\end{align*}
The equation above implies that this map has rank at most $1$.
If you assume that $II$ always has rank equal to $1$, then there is a unique unit normal vector field $\nu$ such that
$$
\nu\cdot II_{ij} = 0.
$$
Differentiating this, we get (I think)
$$
0 = \partial_\nu\cdot II_{ij} + \nu\cdot \nabla_kII_{ij},
$$
where you have to define the connection appropriately (since $II_{ij}$ is not a tangent vector, this is not the Levi-Civita connection per se).
This finally leads to a possible answer that is analogous to the zero torsion condition for a space curve. A codimension 2 submanifold of $\R^d$ lies in a hyperplane if the following holds: The second fundamental form has rank 1, and if $n$ is a unit vector in the kernel, then
\begin{align*}
n\cdot \nabla II &= 0.
\end{align*}
