We study N = 4 quiver theories on the three-sphere. We compute partition
functions using the localisation method by Kapustin et al. solving exactly the
matrix integrals at finite N, as functions of mass and Fayet-Iliopoulos
parameters. We find a simple explicit formula for the partition function of the
quiver tail T(SU(N)). This formula opens the way for the analysis of
star-shaped quivers and their mirrors (that are the Gaiotto-type theories
arising from M5 branes on punctured Riemann surfaces). We provide
non-perturbative checks of mirror symmetry for infinite classes of theories and
find the partition functions of the TN theory, the building block of
generalised quiver theories.Comment: 30 pages, 12 figures. v2: added references, minor change