  We report on the direct observation of the transition from a compressible
superfluid to an incompressible Mott insulator by recording the in-trap density
distribution of a Bosonic quantum gas in an optical lattice. Using spatially
selective microwave transitions and spin changing collisions, we are able to
locally modify the spin state of the trapped quantum gas and record the spatial
distribution of lattice sites with different filling factors. As the system
evolves from a superfluid to a Mott insulator, we observe the formation of a
distinct shell structure, in good agreement with theory.
