  We report a joint test of local Lorentz invariance and the Einstein
equivalence principle for electrons, using long-term measurements of the
transition frequency between two nearly degenerate states of atomic dysprosium.
We present many-body calculations which demonstrate that the energy splitting
of these states is particularly sensitive to violations of both special and
general relativity. We limit Lorentz violation for electrons at the level of
$10^{-17}$, matching or improving the best laboratory and astrophysical limits
by up to a factor of 10, and improve bounds on gravitational redshift anomalies
for electrons by 2 orders of magnitude, to $10^{-8}$. With some enhancements,
our experiment may be sensitive to Lorentz violation at the level of $9\times
10^{-20}$.
