  We probe local phase fluctuations of trapped two-dimensional (2D) Bose gases
using matter-wave interferometry. This enables us to measure the phase
correlation function, which changes from an algebraic to an exponential decay
when the system crosses the Berezinskii-Kosterlitz-Thouless (BKT) transition.
We determine the temperature dependence of the BKT exponent $\eta$ and find the
critical value $\eta_c = 0.17(3)$ for our trapped system. Furthermore, we
measure the local vortex density as a function of the local phase-space
density, which shows a scale-invariant behaviour across the transition. Our
experimental investigation is supported by Monte Carlo simulations and provides
a comprehensive understanding of the BKT transition in a trapped system.
