  A general representation formula for the scattering matrix of a scattering
system consisting of two self-adjoint operators in terms of an abstract
operator valued Titchmarsh-Weyl $m$-function is proved. This result is applied
to scattering problems for different self-adjoint realizations of
Schr\"{o}dinger operators on unbounded domains, Schr\"{o}dinger operators with
singular potentials supported on hypersurfaces, and orthogonal couplings of
Schr\"{o}dinger operators. In these applications the scattering matrix is
expressed in an explicit form with the help of Dirichlet-to-Neumann maps.
