  The observation of GW170817 in both gravitational and electromagnetic waves
provides a number of unique tests of general relativity. One question we can
answer with this event is: Do large-wavelength gravitational waves and
short-frequency photons experience the same number of spacetime dimensions? In
models that include additional non-compact spacetime dimensions, as the
gravitational waves propagate, they "leak" into the extra dimensions, leading
to a reduction in the amplitude of the observed gravitational waves, and a
commensurate systematic error in the inferred distance to the gravitational
wave source. Electromagnetic waves would remain unaffected. We compare the
inferred distance to GW170817 from the observation of gravitational waves,
$d_L^\mathrm{GW}$, with the inferred distance to the electromagnetic
counterpart NGC 4993, $d_L^\mathrm{EM}$. We constrain $d_L^\mathrm{GW} =
(d_L^\mathrm{EM}/\mathrm{Mpc})^\mathrm{\gamma}$ with $\gamma =
1.01^{+0.04}_{-0.05}$ (for the SHoES value of $H_0$) or $\gamma =
0.99^{+0.03}_{-0.05}$ (for the Planck value of $H_0$), where all values are MAP
and minimal 68% credible intervals. These constraints imply that gravitational
waves propagate in $D=3+1$ spacetime dimensions, as expected in general
relativity. In particular, we find that $D = 4.02^{+0.07}_{-0.10}$ (SHoES) and
$D = 3.98^{+0.07}_{-0.09}$ (Planck). Furthermore, we place limits on the
screening scale for theories with $D>4$ spacetime dimensions, finding that the
screening scale must be greater than $\sim 20$ Mpc. We also place a lower limit
on the lifetime of the graviton of $t > 4.50 \times 10^8$ yr.
