  The production of electrons from beauty-hadron decays was measured at
midrapidity in proton-proton (pp) and central Pb-Pb collisions at
center-of-mass energy per nucleon-nucleon pair $\sqrt{s_{\rm NN}}$ = 5.02 TeV,
using the ALICE detector at the LHC. The cross section measured in pp
collisions in the transverse momentum interval $2 < p_{\rm T} < 8$ GeV/$c$ was
compared with models based on perturbative quantum chromodynamics calculations.
The yield in the 10% most central Pb-Pb collisions, measured in the interval $2
< p_{\rm T} < 26$ GeV/$c$, was used to compute the nuclear modification factor
$R_{\rm AA}$, extrapolating the pp reference cross section to $p_{\rm T}$
larger than 8 GeV/$c$. The measured $R_{\rm AA}$ shows significant suppression
of the yield of electrons from beauty-hadron decays at high $p_{\rm T}$ and
does not show a significant dependence on $p_{\rm T}$ above 8 GeV/$c$ within
uncertainties. The results are described by several theoretical models based on
different implementations of the interaction of heavy quarks with a quark-gluon
plasma, which predict a smaller energy loss for beauty quarks compared to light
and charm quarks.
