The puzzle: curvature depends on the connection, so how can it be topological?
From the previous guide you have the curvature 2-form Omega of a connection on a principal or vector bundle, a Lie-algebra-valued 2-form computed locally as Omega = dA + A ^ A from the connection 1-form A. You also have the Bianchi identity dOmega + [A, Omega] = 0, the differential constraint curvature always obeys. Here is the tension that motivates this whole guide: curvature is a thoroughly geometric object. Change the connection — choose a different way to parallel-transport — and Omega changes. So at first glance curvature can tell you nothing topological, since topology should not care which connection you picked.
The resolution is the heart of Chern-Weil theory: do not look at Omega itself, look at invariant scalar combinations of it. The cleanest example is the trace. For a vector bundle whose curvature is a matrix-valued 2-form, trace(Omega) is an ordinary 2-form, and trace(Omega ^ Omega) an ordinary 4-form. The claim — which we will earn below — is that these scalar forms are always closed, and that the de Rham cohomology class they represent is independent of the connection. The geometry wobbles; the cohomology class stands still.
Invariant polynomials: the only ingredient you need
The trace was not a lucky guess; it is the simplest member of a whole family. An invariant polynomial P is a polynomial in the entries of a matrix X (think of X as a curvature value living in the Lie algebra g) that is unchanged under conjugation: P(g X g^(-1)) = P(X) for all g in the structure group. The point of conjugation-invariance is exactly that it kills the dependence on how you trivialized the bundle. Standard examples are P(X) = trace(X), P(X) = trace(X^2), and more generally the coefficients of the characteristic polynomial det(t I + X), which package the elementary symmetric functions of the eigenvalues of X.
Now feed the curvature into such a P. Because Omega is a 2-form, every product is a wedge product, and because P is built from products of matrix entries, P(Omega) comes out as an ordinary differential form — a 2k-form if P is homogeneous of degree k. The conjugation-invariance of P is what makes P(Omega) well-defined globally: on an overlap the two local curvatures differ by conjugation, and P washes that difference away. So P does double duty: it lands you in scalar (un-twisted) forms, and it glues across charts.
P(X) = trace(X) -> P(Omega) is a 2-form P(X) = trace(X ^ X) -> P(Omega) is a 4-form det(I + (i/2pi) X) = 1 + c_1(X) + c_2(X) + ... c_1 = (i/2pi) trace(X) c_2 = (1/2)(i/2pi)^2 ( trace(X)^2 - trace(X^2) )
Why P(Omega) is closed: Bianchi does the work
The first half of the miracle is closedness: d P(Omega) = 0. The engine is the Bianchi identity, which says the covariant exterior derivative of the curvature vanishes. Differentiate P(Omega) by the Leibniz rule, and every term contains a factor of the covariant derivative of Omega. Invariance of P (differentiated, it becomes an infinitesimal-invariance identity) lets you trade the ordinary d for the covariant derivative; Bianchi then says that covariant derivative is zero. So every term dies and d P(Omega) = 0. The closedness is not luck — it is exactly the cohomological shadow of the Bianchi identity, the constraint we noted in the last guide felt 'too clean to be an accident.'
A clean way to see it on the trace: trace(Omega) is, locally, trace(dA + A ^ A) = d trace(A), because trace(A ^ A) = 0 for a 1-form valued in matrices (the wedge antisymmetry and the trace's cyclicity cancel). So trace(Omega) = d trace(A) is locally exact, hence certainly closed. For trace(Omega ^ Omega) the same cyclic-trace-plus-Bianchi computation gives d trace(Omega ^ Omega) = 0. These two tiny calculations are the entire proof of closedness in the cases you most often meet.
Why the class is connection-independent: the transgression trick
The second half — and the deep half — is that the cohomology class [P(Omega)] does not change if you swap the connection. Take two connections A_0 and A_1 on the same bundle. Their difference a = A_1 - A_0 is an honest tensorial 1-form (the inhomogeneous transformation terms cancel in the difference), so you can interpolate linearly: A_t = A_0 + t a, a smooth family of connections for t in [0, 1], with curvatures Omega_t. Now differentiate P(Omega_t) in t. The result, after using invariance of P and the Bianchi identity again, is an exact form: d/dt of P(Omega_t) equals d of something explicit.
- Interpolate: set A_t = A_0 + t a where a = A_1 - A_0 is tensorial, and let Omega_t = dA_t + A_t ^ A_t be the curvature along the path.
- Differentiate the invariant polynomial in t: a short computation using the polarization of P and the Bianchi identity shows d/dt P(Omega_t) = d TP(a, Omega_t), where TP is a universal expression in a and Omega_t.
- Integrate over t from 0 to 1: P(Omega_1) - P(Omega_0) = d ( integral over [0,1] of TP(a, Omega_t) dt ). The right side is d of a globally defined form.
- Conclude: P(Omega_1) and P(Omega_0) differ by an exact form, so [P(Omega_1)] = [P(Omega_0)] in de Rham cohomology. The class is a connection-independent invariant of the bundle.
The intermediate form TP — the thing whose d is the difference — is the transgression form (or Chern-Simons form). It is not just bookkeeping: when the bundle is trivial and you compare to the flat connection, the transgression form is the Chern-Simons invariant that shows up in 3-dimensional topology and gauge theory. So the proof of connection-independence quietly hands you a second, secondary invariant for free — a recurring theme in this subject, where the 'error term' in one theorem is the 'main object' in another.
The Chern-Weil homomorphism, and a worked example on S^2
Package the two halves and you get the Chern-Weil homomorphism: a map from invariant polynomials of the structure group to the de Rham cohomology of the base, P |-> [P(Omega)]. It is a ring homomorphism — products of polynomials go to cup products of classes — and it is the precise machine that produces the Chern classes, Pontryagin classes, and the Euler class. Each named class is just the Chern-Weil image of one specific invariant polynomial: Chern from det(I + (i/2pi)Omega) on complex bundles, Pontryagin from the even-degree pieces on real bundles, Euler from the Pfaffian on oriented even-rank bundles.
Make it concrete on the 2-sphere. The tangent bundle TS^2 carries the round metric's Levi-Civita connection, whose curvature is governed by the Gaussian curvature K = 1. The Euler-class integrand is, up to the (1/2pi) normalization, just K times the area form, so integrating it over S^2 gives (1/2pi) times integral of K dA = (1/2pi)(4pi) = 2. That integer 2 is the Euler number of TS^2, equal to the Euler characteristic chi(S^2) = 2 — and it is exactly the Gauss-Bonnet theorem, now seen as one instance of Chern-Weil. Deform the metric however you like; K and the area form both change, but the integral is pinned at 2 because it is a cohomological invariant.
Where this sits, and where it goes next
Step back and admire the shape of the argument, because the same shape recurs everywhere in modern geometry. You start with a quantity that is manifestly geometric and connection-dependent (curvature). You apply an invariant operation that strips away the gauge freedom (an invariant polynomial). The Bianchi identity makes the result closed; the transgression argument makes its class independent of choices. What survives is topology. This 'integrate a local geometric density to get a global integer' pattern is the seed of the Atiyah-Singer index theorem, where the analytic index of an operator equals a Chern-Weil integral of curvature — a vast generalization stated, not proved, in a later rung.
Be honest about what Chern-Weil does and does not settle. It proves the de Rham characteristic classes are well-defined and computable, and it ties them to curvature — that is genuine and complete. It does not prove integrality (that these integrals are always integers), which needs either the topological definition or a separate argument; and it does not, by itself, tell you which bundles exist over a given manifold. Those gaps are exactly the agenda of the final guide in this rung, where we define the classes topologically, prove the Whitney sum formula and the splitting principle, and let curvature loose as the field strength of Yang-Mills gauge theory.