Stimuli-responsive molecules are key building blocks of functional molecular materials and devices. These molecules can operate in a range of environments. A molecule's local environment will dictate its conformation, reactivity, and function; by controlling the local environment we can ultimately develop interfaces of individual molecules with the macroscopic environment. By isolating molecules in well-defined environments, we are able to obtain both accurate measurements and precise control. We exploit defect sites in self-assembled monolayers (SAMs) to direct the functional molecules into precise locations, providing a basis for the measurements and engineering of functional molecular systems. The structure and functional moieties of the SAM can be tuned to control not only the intermolecular interactions but also molecule-substrate interactions, resulting in extraction or control of desired molecular functions. Herein, we report our progress toward the assembly and measurements of photoresponsive molecules and their precise assemblies in SAM matrices.