# Schwarz triangle function

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.

## Formula

Let πα, πβ, and πγ be the interior angles at the vertices of the triangle in radians. Each of α, β, and γ may take values between 0 and 1 inclusive. Following Nehari, these angles are in clockwise order, with the vertex having angle πα at the origin and the vertex having angle πγ lying on the real line. The Schwarz triangle function can be given in terms of hypergeometric functions as:
    $s(\alpha ,\beta ,\gamma ;z)=z^{\alpha }{\frac {_{2}F_{1}\left(a',b';c';z\right)}{_{2}F_{1}\left(a,b;c;z\right)}}$
where
    a = (1−α−β−γ)/2,
    b = (1−α+β−γ)/2,
    c = 1−α,
    a′ = a − c + 1 = (1+α−β−γ)/2,
    b′ = b − c + 1 = (1+α+β−γ)/2, and
    c′ = 2 − c = 1 + α.
This function maps the upper half-plane to a spherical triangle if α + β + γ > 1, or a hyperbolic triangle if α + β + γ < 1. When α + β + γ = 1, then the triangle is a Euclidean triangle with straight edges: a = 0, $_{2}F_{1}\left(a,b;c;z\right)=1$, and the formula reduces to that given by the Schwarz–Christoffel transformation.

### Derivation

Through the theory of complex ordinary differential equations with regular singular points and the Schwarzian derivative, the triangle function can be expressed as the quotient of two solutions of a hypergeometric differential equation with real coefficients and singular points at 0, 1 and ∞. By the Schwarz reflection principle, the reflection group induces an action on the two dimensional space of solutions. On the orientation-preserving normal subgroup, this two-dimensional representation corresponds to the monodromy of the ordinary differential equation and induces a group of Möbius transformations on quotients of hypergeometric functions.

## Singular points

This mapping has regular singular points at z = 0, 1, and ∞, corresponding to the vertices of the triangle with angles πα, πγ, and πβ respectively. At these singular points,
    ${\begin{aligned}s(0)&=0,\\[4mu]s(1)&={\frac {\Gamma (1-a')\Gamma (1-b')\Gamma (c')}{\Gamma (1-a)\Gamma (1-b)\Gamma (c)}},\\[8mu]s(\infty )&=\exp \left(i\pi \alpha \right){\frac {\Gamma (1-a')\Gamma (b)\Gamma (c')}{\Gamma (1-a)\Gamma (b')\Gamma (c)}},\end{aligned}}$
where Γ(x){\textstyle \Gamma (x)} is the gamma function.
Near each singular point, the function may be approximated as
    ${\begin{aligned}s_{0}(z)&=z^{\alpha }(1+O(z)),\\[6mu]s_{1}(z)&=(1-z)^{\gamma }(1+O(1-z)),\\[6mu]s_{\infty }(z)&=z^{\beta }(1+O(1/z)),\end{aligned}}$
where $O(x)$ is big O notation.

## Inverse

When α, β, and γ are rational, the triangle is a Schwarz triangle. When each of α, β, and γ are either the reciprocal of an integer or zero, the triangle is a Möbius triangle, i.e. a non-overlapping Schwarz triangle. For a Möbius triangle, the inverse is a modular function.
In the spherical case, that modular function is a rational function. For Euclidean triangles, the inverse can be expressed using elliptical functions.

## Ideal triangles

When α = 0 the triangle is degenerate, lying entirely on the real line. If either of β or γ are non-zero, the angles can be permuted so that the positive value is α, but that is not an option for an ideal triangle having all angles zero.
Instead, a mapping to an ideal triangle with vertices at 0, 1, and ∞ is given by in terms of the complete elliptic integral of the first kind:
    $i{\frac {K(1-z)}{K(z)}}$.
This expression is the inverse of the modular lambda function.

## Extensions

The Schwarz–Christoffel transformation gives the mapping from the upper half-plane to any Euclidean polygon.
The methodology used to derive the Schwarz triangle function earlier can be applied more generally to arc-edged polygons. However, for an n-sided polygon, the solution has n-3 additional parameters, which are difficult to determine in practice. See Schwarzian derivative § Conformal mapping of circular arc polygons for more details.

## Applications

L. P. Lee used Schwarz triangle functions to derive conformal map projections onto polyhedral surfaces.