Revealing the role of defects in ferroelectric switching with atomic resolution.