The first Stiefel–Whitney class $w_1$ is zero if and only if the bundle is orientable. In particular, a manifold $M$ is orientable if and only if $w_1(TM) = 0$.
The first and second Stiefel–Whitney classes are zero, $w_1(TM) =w_2(TM) = 0$, if and only if the bundle admits a spin structure.
The third integral Stiefel–Whitney class is zero if and only if the bundle admits a spin$^c$ structure.
Questions: Are there obvious ways to relate and encode the above obstructions in terms of group extension languages? For example, the failure of the pullback from a group $G$ to a group $G'$. And how do $w_1(TM)$, $w_1(TM)^2$, $w_2(TM)$ and the third integral Stiefel–Whitney class enter into the homomorphism map in the exact sequences?
My attempts:
It looks to me that for $w_1(TM)^2$, is has something to do with the classifying the extensions: $$ 1 \to \mathbb{Z}_2 \to SO(3) \rtimes \mathbb{Z}_4 \to O(3) \to 1 $$ or for the odd $n$ (how about the even $n$) $$ 1 \to \mathbb{Z}_2 \to SO(n) \rtimes \mathbb{Z}_4 \to O(n) \to 1 $$ What is the extension and obstruction for classifying $w_1(TM)$?
It looks to me that for $w_2(TM)$, is has something to do with the classifying the extensions: $$ 1 \to \mathbb{Z}_2 \to Spin(n) \to SO(n) \to 1 $$
- It looks to me that for the integral $\tilde w_3(TM)$, is has something to do with the classifying the extensions: $$ 1 \to \mathbb{Z}_2 \to Spin^c(n) \to SO(n)\times U(1) \to 1 $$ which we may view (?) the $$ Spin^c(n) =\frac{Spin(n)\times U(1)}{\mathbb{Z}_2}. $$
You might be thinking about the Whitehead tower of the orthogonal group. Given a manifold $M$, its tangent bundle classifies a map $\tau_M: M \to BO$. If we are given a group homomorphism $G \to O$, we can ask whether the structure group of the tangent bundle reduces to $G$. For example, asking for a $SO$-structure is the same as requiring $M$ to be orientable. In terms of classifying maps, this means a lift of the tangent classifier along $BG \to BO$: $$\begin{array}{ccc} & & BG \\ & \nearrow & \downarrow \\ M & \xrightarrow[\tau_M]{} & BO \end{array}$$
In the case $G = SO$, we have that $BSO$ is the fiber of a map $w_1: BO \to K(\mathbb{Z}/2,1)$. So the existence of a lift $M \to BSO$ is equivalent to asking that the composite $w_1(M): M \to BO \to K(\mathbb{Z}/2,1)$ is nullhomotopic. This means that $M$ is orientable iff $w_1(M) = 0$.
We can continue up the Whitehead tower for $BO$. Suppose $M$ is orientable. To lift the tangent classifier to $B\mathrm{Spin}$ and endow $M$ with a spin structure is to ask that $w_2(M): M \to BSO \to K(\mathbb{Z}/2,2)$ is zero.
$$\begin{array}{ccccc} & & \downarrow \\ & & B\mathrm{Spin} & \xrightarrow{\frac{p_1}{2}} & K(\mathbb{Z},4) \\ & & \downarrow \\ & & BSO & \xrightarrow{w_2} & K(\mathbb{Z}/2,2) \\ & & \downarrow \\ M & \xrightarrow[\tau_M]{} & BO & \xrightarrow{w_1} & K(\mathbb{Z}/2,1) \end{array}$$
In this diagram, each "L"-shaped part (e.g., $B\mathrm{Spin} \to BSO \to K(\mathbb{Z}/2,2)$) is a fiber sequence that we use to rephrase the problem of reducing to a structure group in terms of cohomology classes. These fiber sequences are incarnations of the group extensions you've described, e.g.: $$1 \to SO \to O \xrightarrow{\det} \mathbb{Z}/2 \to 1$$ $$1 \to \mathbb{Z}/2 \to \mathrm{Spin} \to SO \to 1.$$