  We present the theoretical derivation and numerical implementation of the
linear response equations for relativistic quantum electrodynamical density
functional theory (QEDFT). In contrast to previous works based on the
Pauli-Fierz Hamiltonian, our approach describes electrons interacting with
photonic cavity modes at the four-component Dirac-Kohn-Sham level, derived from
fully relativistic QED through a series of established approximations.
Moreover, we show that a new type of spin-orbit-like (SO) cavity-mediated
interaction appears under the relativistic description of the coupling of
matter with quantized cavity modes. Benchmark calculations performed for atoms
of group 12 elements (Zn, Cd, Hg) demonstrate how a relativistic treatment
enables the description of exciton polaritons which arise from the
hybridization of formally forbidden singlet-triplet transitions with cavity
modes. For atoms in cavities tuned on resonance with a singlet-triplet
transition we discover a significant interplay between SO effects and coupling
to an off-resonant intense singlet-singlet transition. This dynamic
relationship highlights the crucial role of ab initio approaches in
understanding cavity quantum electrodynamics. Finally, using the mercury
porphyrin complex as an example, we show that relativistic linear response
QEDFT provides computationally feasible first-principles calculations of
polaritonic states in large heavy element-containing molecules of chemical
interest.
