In complex analysis, the Schwarz triangle function or Schwarz s-function is a function that conformally maps the upper half plane to a triangle in the upper half plane having lines or circular arcs for edges. The target triangle is not necessarily a Schwarz triangle, although that is the most mathematically interesting case. When that triangle is a non-overlapping Schwarz triangle, i.e. a Möbius triangle, the inverse of the Schwarz triangle function is a single-valued automorphic function for that triangle's triangle group. More specifically, it is a modular function.