The in situ optical second harmonic generation (SHG) technique was applied to the direct investigation of interactions between cis-dialkoxyazobenzene and a pyridinium compound at the glass-heptane interface. The SHG response due to noncentrosymmetric adsorption of the SHG-active cis-isomer was profoundly dependent on the structure of the pyridinium compound preadsorbed at the glass surface. It is suggested that the cis-isomer can interact preferentially with a bipyridinium compound in which the two pyridinium moieties are spatially separated to be able to interact snugly with the two phenoxy moieties of cis-dialkoxyazobenzene. Copyright 1999 Academic Press.