TITLE: Chern-Weil Theory for $p_1$
QUESTION [10 upvotes]: I'm studying Riemannian manifolds that admit an almost-complex structure, thus 
$$3\tau+2\chi=c_1^2,$$
where $\tau$ is the signature, $\chi$ is the euler characteristic and $c_1$ is the first Chern class.
I know from Hizerbruch theorem that 
$$3\tau=p_1,$$
where $p_1$ is the first Pontryagin class. Notice that $\chi=c_2$, thus
$$p_1=c_1^2-2c_2.$$
But I know from Chern-Weil Theory that
$$c_1=\frac{iTr(F_A)}{2\pi},$$
$$c_2=\frac{Tr(F_A^2)-Tr(F_A)^2}{8\pi^2}$$
and
$$p_1=-\frac{Tr(F_A^2)}{8\pi^2}$$.
Here, $F_A^2=F_A\wedge F_A$ and $c_1^2=c_1\wedge c_1$. Computing, we have:
$$c_1^2-2c_2=-\frac{Tr(F_A)^2}{4\pi^2}+\frac{Tr(F_A)^2-Tr(F_A^2)}{4\pi^2}=-\frac{Tr(F_A^2)}{4\pi^2}=2p_1.$$
What did I miss?

REPLY [22 votes]: It follows from the definition $p_k(E) := (-1)^kc_{2k}(E \otimes \mathbb{C})$ that the formula $$p_1 = c_1^2 - 2c_2$$ is valid for all complex vector bundles (rather than just the tangent bundle of an almost complex surface).
The problem in your Chern-Weil calculation is essentailly that you are confusing the trace of a complex and a real matrix. A complex $n \times n$ matrix $M$ can be turned into a real $2n \times 2n$ matrix $M_\mathbb{R}$, and the traces are related by
$$ {\rm Tr} \, M_\mathbb{R} = 2 \, {\rm Re} \, {\rm Tr} \, M . $$
If you take a complex connection $A$ on a complex vector bundle $E$, and let $A_\mathbb{R}$ be the induced connection on the underlying real vector bundle $E_\mathbb{R}$, then the correct interpretation of the Chern-Weil formula is that $p_1(E_\mathbb{R})$ is represented by
$$ -\frac{{\rm Tr}(F_{A_\mathbb{R}}^2)}{8\pi^2} = -{\rm Re}\frac{{\rm Tr}(F_A^2)}{4\pi^2} . $$
Since the cohomology class ${\rm Tr}(F_A^2)$ is real that corrects the final step in your calculation.