The atomic structures of the nonlinear optical materials potassium titanyl phosphate (KTiOPO4, or KTP) and potassium titanyl arsenate (KTiOAsO4) feature one- dimensional channels through which the potassium ions are relatively free to migrate. Ion exchange results when these materials are immersed in molten salts containing alkali metal ions. Sodium, lithium, and silver all exchange readily for K+ in single crystals of both KTP and KTA to yield the exchanged derivatives Na.95K.05TiOPO4 (NaTP), Na.83K.17TiOAsO4 (NaTA), Ag.85K.15TiOPO4 (AgTP), Ag.98K.02TiOAsO4 (AgTA), Li.45K.55TiOPO4 (KLTP), and Li.46K.54TiOAsO4 (KLTA), which are all KTP isostructures. The optical nonlinearities (measured as SHG intensities) of the limiting compositions in the NaTA, KLTP, and KLTA systems are similar to that of KTP, but are much smaller in NaTP, AgTP, and AgTA. Single crystal x-ray data have revealed differences in coordination of the mobile cations to oxygen atoms linking the TiO6 groups in these compounds, and these differences correlate with changes in optical nonlinearity. The observed nonlinearities can be rationalized if they are viewed as being dependent on the degree to which delocalized charge- transfer excited state character can be mixed into ground state bonding and nonbonding orbitals in the TiO6 chains. The relative lack of association of Na+ and Li+ ions with these chains in NaTA, KLTP, and KLTA allows extensive excited state delocalization, and thus significant electronic hyperpolarizability.