The merger of two dense stellar remnants including at least one neutron star is predicted to produce gravitational waves (GWs) and short-duration gamma ray bursts1,2. In the process, neutron-rich material is ejected from the system and heavy elements are synthesized by r-process nucleosynthesis1,3. The radioactive decay of these heavy elements produces additional transient radiation termed kilonova or macronova4-10. We report the detection of linear optical polarization, P = (0.50 ± 0.07)%, 1.46 days after detection of the GWs from GW 170817—a double neutron star merger associated with an optical macronova counterpart and a short gamma ray burst11-14. The optical emission from a macronova is expected to be characterized by a blue, rapidly decaying component and a red, more slowly evolving component due to material rich in heavy elements—the lanthanides15. The polarization measurement was made when the macronova was still in its blue phase, during which there was an important contribution from a lanthanide-free outflow. The low degree of polarization is consistent with intrinsically unpolarized emission scattered by galactic dust, suggesting a symmetric geometry of the emitting region and low inclination of the merger system. Stringent upper limits to the polarization degree from 2.45-9.48 days post-burst are consistent with the lanthanides-rich macronova interpretation.