We prove Li--Yau--Hamilton inequalties that extend Hamilton's matrix
inequality for solutions of the Ricci flow with nonnegative curvature
operators. To obtain our extensions, we apply the space-time formalism of
S.-C. Chu and one of the authors to solutions of the Ricci flow modified
by a cosmological constant. Then we adjoin to the Ricci flow the evolution
of a 1-form and a 2-form flowing by a system of heat-type equations. By a
rescaling argument, the inequalities we obtain in this manner yield new
inequalities which are reminiscent of the linear trace inequality of
Hamilton and one of the authors.