About trivial restrictions of a vector bundle

Let $$M$$ be a smooth manifold of dimension $$n$$. Let $$U \subset M$$ be an open subset such that the restriction $$TM|_U$$ is trivial. Let $$N$$ be a closed submanifold of $$M$$ contained inside $$U$$. Does it follow then that $$TM|_N$$ is trivial as well?

I thought this was a trivial result (simply take $$n$$ linearly independent sections over $$U$$ and restrict to $$N$$), until I played around with Stiefel-Whitney classes and got a contradictory answer.

In particular take $$N$$ to have codimension $$1$$, and $$N$$ and $$M$$ to be orientable. Let $$N$$ be not parallelizable. Then $$TM|_N \cong TN \oplus \nu$$ where $$\nu$$ is the normal bundle of $$N$$ inside $$M$$, and $$\oplus$$ denotes the Whitney sum. It can be shown that since $$\nu$$ is a line bundle and $$N$$ and $$M$$ are orientable, $$\nu$$ is trivial. Hence $$w_i (TM|_N) = w_i (TN \oplus \nu) = w_i(TN)$$.

But $$TN$$ is not trivial, so not all $$w_i$$ are zero for $$i>0$$ so $$TM|_N$$ cannot be trivial, a contradiction.

Clearly I made a mistake somewhere, either at the beginning with the $$n$$ sections or when working with the Stiefel-Whitney classes, but I can't spot it. Any help in pointing out my mistake would be appreciated.

EDIT: Correction from the discussion in the comments, in the second part, $$N$$ should have some nonzero Stiefel-Whitney class instead of being just not parallelizable. In this case, there cannot be such an open set $$U$$ containing it.

• This is a trivial result exactly as you say. The second half of your question is not a contradiction yet! You haven't actually provided a counterexample showing that all of the conditions you just wrote down are actually satisfiable (in particular I see no mention of the $U$ on which the restriction is supposed to be trivialized). I don't understand what argument you have in mind for showing that the normal bundle is trivial either. Jan 7 '21 at 8:46
• Ah, then that means the $N$ I set up in the second part can never be a subset of such an open set $U$? Jan 7 '21 at 8:48
• Well, there's the additional fact that it doesn't follow that if $N$ isn't parallelizable then some Stiefel-Whitney class is nonzero; for example $S^2$ is not parallelizable but all of its Stiefel-Whitney classes vanish. But yes, if the Stiefel-Whitney classes of $TN$ are nontrivial and the normal bundle is trivial then there can be no such $U$. Jan 7 '21 at 8:49
• Okay I see, my proof of the second part doesn't work out. Thanks. As for the fact about triviality of the line bundle, I got it from here: math.stackexchange.com/questions/1495819/… Jan 7 '21 at 8:50
• Ah, of course, it follows from computing $w_1$. Okay, that's fine then. Jan 7 '21 at 8:52

The first argument is correct. In addition to the discussion in the comments, a nice example to think about explicitly here is the usual codimension-$$1$$ embedding of $$N = S^2$$ into $$M = \mathbb{R}^3$$. They're both orientable, $$N$$ is not parallelizable, the normal bundle is trivial, $$TM$$ is trivial (so we can take $$U$$ to be, say, a sufficiently large open ball containing $$N$$, or just all of $$M$$), and so the pullback of $$TM$$ to $$N$$ is also trivial.
This embedding shows that the tangent bundle $$TS^2$$ is stably trivial (it is trivializable after adding a trivial line; the same is true for every sphere, using the embedding $$S^n \hookrightarrow \mathbb{R}^{n+1}$$), and in particular all of its Stiefel-Whitney classes vanish. But $$TS^2$$ is not trivial (by the hairy ball theorem; in terms of characteristic classes, its Euler class does not vanish, and the same is true for every even-dimensional sphere).
• Stably trivial tangent bundles might just be the objects I was looking for. Perhaps related, is there a general term for a codimension 1 submanifold that can be embedded in a parallelizable open subset of $M$, if this makes sense? Jan 7 '21 at 9:25