Property of second Stiefel-Whitney class? Let $M$ be manifold, $n = 4$. Is $w_2$ special in in the regard it's the only thing of $H^2(M, \mathbb{Z}_2)$ where $w_2 \cup \tau = \tau \cup \tau$, $\tau \in H^2(M, \mathbb{Z}_2)$ or not? I wondered this question after reading this excerpt from a book on $4$-manifolds by Donaldson and Kronheimer and this excerpt from a book on $4$-manifolds by Scorpan.
 A: Let $M$ be a topological space. For each $n \geq 0$ the is a linear map $\operatorname{Sq}^n : H^{\bullet}(M; \mathbb{Z}_2) \to H^{\bullet}(M; \mathbb{Z}_2)$ satisfying the following properties:


*

*$\operatorname{Sq}^0(x) = x$,

*$\operatorname{Sq}^m(x) = 0$ for $|x| < m$ and $\operatorname{Sq}^m(x) = x\cup x$ for $|x| = m$, and

*$\operatorname{Sq}^m(x\cup y) = \sum_{i+j = k}\operatorname{Sq}^i(x)\cup\operatorname{Sq}^j(y)$.


These maps are called the Steenrod squares.
Now suppose $M$ is a closed connected $n$-dimensional manifold. Restricting $\operatorname{Sq}^m$ to $H^{n-m}(M; \mathbb{Z}_2)$, we obtain a linear map $\operatorname{Sq}^m \colon H^{n-m}(M; \mathbb{Z}_2) \to H^n(M; \mathbb{Z}_2)$, and therefore an element of 
\begin{align*}
&\ \operatorname{Hom}(H^{n-m}(M; \mathbb{Z}_2), H^n(M; \mathbb{Z}_2))\\
\cong &\ \operatorname{Hom}(H^{n-m}(M; \mathbb{Z}_2), \mathbb{Z}_2) && \text{($M$ is a closed connected manifold)}\\ 
\cong &\ \operatorname{Hom}(\operatorname{Hom}(H_{n-m}(M; \mathbb{Z}_2), \mathbb{Z}_2), \mathbb{Z}_2) && \text{(Universal Coefficient Theorem)}\\
\cong &\ H_{n-m}(M; \mathbb{Z}_2) && \text{($H_{n-m}(M; \mathbb{Z}_2)$ is a finite-dimensional}\\ 
&&& \text{vector space over $\mathbb{Z}_2$)}\\
\cong &\ H^m(M; \mathbb{Z}_2) &&\text{(Poincaré Duality)}.
\end{align*} 
Let $\nu_m$ denote the unique element of $H^m(M; \mathbb{Z}_2)$ corresponding to $\operatorname{Sq}^m$ under these natural isomorphisms. Unwinding the isomorphisms, we see that  $\operatorname{Sq}^m(x) = \nu_m\cup x$ for all $x \in H^{n-m}(M; \mathbb{Z}_2)$. We call $\nu_m$ the $m^{\text{th}}$ Wu class of $M$.
If $M$ is also assumed to be smooth, then the Wu classes of $M$ can be computed in terms of its Stiefel-Whitney classes (see this answer for example). In particular, $\nu_2 = w_2 + w_1\cup w_1$, so in the case $n = 4$, for $x \in H^2(M; \mathbb{Z}_2)$, $x\cup x = \operatorname{Sq}^2(x) = \nu_2\cup x = (w_2 + w_1\cup w_1)\cup x$. That is, $w_2 + w_1\cup w_1$ is the unique class in $H^2(M; \mathbb{Z}_2)$ such that its cup product with $x \in H^2(M; \mathbb{Z}_2)$ is $x\cup x$. In the case of $M$ simply connected (or even just orientable), $w_1 = 0$ so the Wu class reduces to $w_2$.
As Mike Miller points out below, for $M$ a simply connected, closed, smooth four-manifold, $w_2$ is the unique class with the stated property. To see this, let $u \in H^2(M; \mathbb{Z}_2)$ be an element satisfying $u\cup x = x\cup x$ for every $x \in H^2(M; \mathbb{Z}_2)$, then 
$$(u - w_2)\cup x = u\cup x - w_2\cup x = x\cup x - x\cup x = 0,$$ 
so by Poincaré Duality, $u - w_2 = 0$ and hence $u = w_2$.
For more details on Steenrod squares and Wu classes, see this note.
