Let $M$ be an oriented (closed) Riemannian manifold. Choose a *good* open cover and local trivialisations of the tangent bundle $U_i$. Then we get a system of transition functions $\varphi_{ij}: U_i \cap U_j \to SO(n)$. Locally we can lift each $\varphi_{ij}$ to the smooth map $\tilde{\varphi_{ij}}:U_i \cap U_j \to spin(n)$ such that $\varphi_{ij}=\tilde{\varphi_{ij}} \circ \rho$ where $\rho:spin(n) \to SO(n)$ is a $2:1$ map. For each intersection $U_i \cap U_j \cap U_k$ we have the cocycle condition $\varphi_{ij}\varphi_{jk}\varphi_{ki}=I$ which implies that $\tilde{\varphi_{ijk}}:=\tilde{\varphi_{ij}}\tilde{\varphi_{jk}} \tilde{\varphi_{ki}}=\pm 1 \in spin(n)$. Therefore $\tilde{\varphi_{ijk}}$ defines a $2$ cocycle in the Cech cohomoloy with values in $\mathbb{Z} /2$. I would like to understand:

Why the cohomology class thus obtained is the

second Stiefel-Whitneyclass?

EDIT: There are various ways for constructing Stiefel-Whitney classes but since I'm little bit outsider (coming from noncommutative geometry) I'm most comfortable with the axiomatic definition (naturality, Whitney formula and normalization). If it is possible to prove that our class is second Stiefel Whitney class in a self contained way I would be satisfied.

LATER EDIT: After thinking a bit about this question I would like to ask whether the following argument is valid: call the class obtained above by $k(TM)$. We can proceed similarly for arbitrary oriented Riemannian vector bundle $E \to M $ to obtain $k(E) \in H^2(M,\mathbb{Z}_2)$. Since $k$ is obtained using transition functions which behave nicely with respect to direct sums and pullbacks (and the corresponding class does not depend from the particular choice of transition functions) we get that $k$ satisfies the following properties:

-$k(E \oplus F)=k(E)+k(F)$

-$k(f^*E)=f^*k(E)$.

Also we have already proven that $k(E)=0$ iff $E$ is spin. I wonder whether these properties suffice to identify $k$ as $w_2$? (Please note that due to orientability the Whitney sum axiom for $w_2(E \oplus F)$ involves only $w_2(E)$ and $w_2(F)$).

alternative(not really necessary) proof of the independence, change the trivialization and see that this adds a coboundary. $\endgroup$ – Alex Degtyarev Sep 28 '16 at 22:47directly(that the class obtained is the second Stiefel-Whitney class), i.e. it satisfies all the axioms for Stiefel Whitney class? $\endgroup$ – truebaran Oct 3 '16 at 20:55alsothe obstruction. There's only one nonzero class in $\mathbb{Z}/2$, so they are the same. [Here $n$ is probably not equal to 1...] $\endgroup$ – Dylan Wilson Jul 11 '17 at 0:24