  We derive from first principles the Kubo formulas for the stress-stress
response function at zero wavevector that can be used to define the full
complex frequency-dependent viscosity tensor, both with and without a uniform
magnetic field. The formulas in the existing literature are frequently
incomplete, incorrect, or lack a derivation; in particular, Hall viscosity is
overlooked. Our approach begins from the response to a uniform external strain
field, which is an active time-dependent coordinate transformation in d space
dimensions. These transformations form the group GL(d,R) of invertible
matrices, and the infinitesimal generators are called strain generators. These
enable us to express the Kubo formula in different ways, related by Ward
identities; some of these make contact with the adiabatic transport approach.
For Galilean-invariant systems, we derive a relation between the stress
response tensor and the conductivity tensor that is valid at all frequencies
and in both the presence and absence of a magnetic field. In the presence of a
magnetic field and at low frequency, this yields a relation between the Hall
viscosity, the q^2 part of the Hall conductivity, the inverse compressibility
(suitably defined), and the diverging part of the shear viscosity (if any);
this relation generalizes a result found recently. We show that the correct
value of the Hall viscosity at zero frequency can be obtained (at least in the
absence of low-frequency bulk and shear viscosity) by assuming that there is an
orbital spin per particle that couples to a perturbing electromagnetic field as
a magnetization per particle. We study several examples as checks on our
formulation.
