  We give a Hopf-algebraic formulation of the $R^*$-operation, which is a
canonical way to render UV and IR divergent Euclidean Feynman diagrams finite.
Our analysis uncovers a close connection to Brown's Hopf algebra of motic
graphs. Using this connection we are able to provide a verbose proof of the
long observed 'commutativity' of UV and IR subtractions. We also give a new
duality between UV and IR counterterms, which, entirely algebraic in nature, is
formulated as an inverse relation on the group of characters of the Hopf
algebra of log-divergent scaleless Feynman graphs. Many explicit examples of
calculations with applications to infrared rearrangement are given.
