Hanany-Witten effect and SL(2, ℤ) dualities in matrix models

We provide tests of dualities for three-dimensional N=4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$ \mathcal{N}=4 $$\end{document} quiver SCFTs with brane realizations in IIB string theory, by matching their exact partition functions on S3. The dualities are generated by SL(2, ℤ) transformations and Hanany-Witten 5-brane moves. These contain mirror symmetry as well as dualities identifiying fixed points of Yang-Mills quivers and Chern-Simons theories. The partition function is given by a matrix model, that can be nicely rearranged into a sequence of factors mimicking the brane realization. Identities obeyed by these elementary factors can be used to match the partition functions of dual theories, providing tests for the full web of dualities. In particular we are able to check mirror symmetry for linear and circular quivers with gauge nodes of arbitrary ranks. Our analysis also leads to a proof of a conjectured formula evaluating the matrix models of linear quiver SCFTs.


JHEP10(2014)117
1 Introduction N = 4 Yang-Mills theories in three dimensions admit infrared strongly coupled fixed points, subject to the mirror symmetry duality [1]. Their moduli spaces split into a Coulomb branch and a Higgs branch that are exchanged under this duality. A prominent feature of these moduli spaces is that the Higgs branch does not receive quantum corrections and thus captures the quantum corrections to the Coulomb branch of the mirror theory. The N = 4 theories can be deformed by mass and Fayet-Iliopoulos terms, whose parameters are also exchanged under the duality. Mirror symmetry was extended to quiver theories in [2,3], using the brane realizations of the theories in type IIB string theory [4]. The fixed point of a three-dimensional quiver theory was obtained as the low-energy theory of D3-branes suspended between NS5-branes and D5-branes. Mirror symmetry was then identified with the action of S-duality in IIB string theory, exchanging NS5-branes and D5-branes.
In [5] it was shown that the partition function of three-dimensional SCFTs deformed by mass and FI terms and defined on the round 3-sphere S 3 can be computed exactly using localization techniques (see [6] for a review) and reduces to a simple matrix model. The exact partition function on S 3 was then used in [7] to test mirror symmetry for IR fixed points of N = 4 circular Yang-Mills quiver theories with nodes of equal rank.
More tests of mirror symmetry by matching exact partition functions were given in [8][9][10] for A-and D-type quiver SCFTs. Other remarkable tests have been performed in [11][12][13][14][15], where the Hibert series of the Coulomb branch were shown to coincide with the Hilbert series of the Higgs branch of the mirror dual theories. Several cases were investigated there, involving mirror symmetry for A, D quivers and various star-shaped quivers. One of the interesting ideas developed in [15] is the possibility to generate new mirror pairs from the known dualities by gauging global symmetries.
Despite the significant advancements in testing mirror symmetry, very few results are known for the cases of quiver theories with nodes of different ranks. This gave the initial motivation for the present work, whose first ambition was to complete the tests of mirror symmetry for quiver theories with nodes of arbitrary ranks. The second idea was to understand the full SL(2, Z) duality group of the three-dimensional quiver theories, inherited from type IIB string theory [16]. It was shown in [17] that these more general dualities can map Yang-Mills fixed points to Chern-Simons theories coupled to matter. These are very interesting dualities since the Chern-Simons theories are superconformal, so that they would be indeed the infrared fixed point of the "dual" Yang-Mills theories. Three-dimensional Chern-Simons couplings have a priori only up to N = 3 supersymmetry, however with specific matter content and superpotentials the amount of supersymmetry can be enhanced to N = 4 [18][19][20], and up to N = 8 [21,22].
In this paper we investigate these dualities by comparing the exact partition functions on S 3 of the N = 4 Yang-Mills and Chern-Simons SCFTs deformed by mass and FI parameters, for linear and circular quivers with unitary nodes of arbitrary ranks. All the theories we consider admit brane realizations in IIB string theory as arrays of D3-branes suspended between two types of 5-branes. Yang-Mills quivers are realizated with NS5 and D5-branes; Chern-Simons quivers are realized with NS5 and (1, k)-5branes. Other choices of 5-branes lead to theories that were described in [23] as Chern-Simons theories with JHEP10(2014)117 "interpolating T (U(N ))" couplings. A web of dualities is generated by SL(2, Z) actions combined with Hanany-Witten 5-brane moves (HW moves). The HW moves exchange two 5-branes of different type in the sequence of 5-branes realizing a quiver theory. Mirror symmetry corresponds to the action of S-duality combined with HW moves transforming the brane realization of a quiver theory into the brane realization of its mirror-dual. Other interesting dualities are generated, one being a level-rank duality for N = 4 Chern-Simons theories, corresponding to HW moves exchanging NS5 and (1, k)-5branes. Another duality relates Yang-Mills quivers to Chern-Simons quivers with Chern-Simons levels at each node being ±1 or 0. A node with vanishing Chern-Simons level has an "auxiliary vector multiplet" [18,24]. A class of Yang-Mills fixed points admit Chern-Simons duals with nonvanishing levels at all nodes, which correspond to microscopic descriptions of the infrared fixed point. Each mass or FI deformation parameter is associated to a the position of a 5-brane in the brane realization and the map between parameters is obtained by following the 5-branes through the duality transformations.
To test these dualities we decompose the matrix model which computes the partition function into a sequence of elementary factors, that can be associated to the 5-branes in the brane realization. This approach was already developed in [25] for quiver with nodes of equal ranks and we generalize it to quivers of arbitrary ranks and including mass and FI deformation terms. We then provide an action of SL(2, Z) dualities on the 5-brane factors, based on the analysis of [23], again generalizing [25]. This action on the matrix factors can be understood as a local SL(2, Z) duality on the brane configuration, introducing duality walls, that are associated to their own factors in the matrix model. The SL(2, Z) action on the 5-brane factors is used to prove the equality of the partition functions of any pair of SL(2, Z)-dual theories, in a straightforward way. In practice, only two of the SL(2, Z) dualities will be relevant for us: S duality which is related to mirror symmetry and the duality changing Yang-Mills theories into Chern-Simons theories. To include HW move dualities, we prove an identity for products of two 5-brane factors, mimicking the HW 5-brane exchange. Combining the SL(2, Z) action and this HW move-identity we are able to match the partition functions of any pair of quiver SCFTs related by this web of dualities. In particular we match the exact partition function of mirror dual YM quiver SCFTs with nodes of arbitrary ranks, deformed by parameters.
The main technical challenge in our computations was to find a matrix factor for a D5-brane with different numbers of D3-branes ending on its left and right sides. We found that it must be defined in terms of an unusual distributionδ. Although they look very exotic, these distributions proved very useful to derive the HW move identity. As a byproduct our analysis leads to a proof of the formula conjectured in [26] (NTY formula) evaluating the matrix models of arbitrary deformed YM linear quiver SCFTs.
The map between partition functions that we found is only exact up to phases that depends on the mass and FI parameters. We argue, following [27,28], that these phases affect contact terms in global current correlation functions and are unphysical in the sense that they arise from different UV regularizations (they can be removed by local counter-terms).
One lesson we learned from our analysis is that there is a close link between the matrix models and the brane realizations of the theories, and that what happens on the brane side JHEP10(2014)117 always has a counterpart on the matrix model side, so that the brane picture is (as usual) a powerful guide to understand the properties of the gauge theories.
We also point out that the AdS 4 gravity duals of the N = 4 quiver SCFTs studied in this paper (at vanishing deformation parameters) where constructed in [29,30] in type IIB ten-dimensional supergravity. The counterparts in supergravity of the dualities we study are standard SL(2, Z) transformations of the gravity backgrounds.
The rest of the paper is organized as follows. In section 2 we give a brief description of the N = 4 three-dimensional theories that admit brane realizations. In section 3 we introduce the matrix models computing the partition functions on S 3 , we explain the decomposition into 5-brane factors, we derive the SL(2, Z) action on the factors and prove the equality of partition functions for SL(2, Z) dual theories. In section 4 we prove the equality of the partition functions of theories related by HW move duality. We emphasize the cases of mirror symmetry and Yang-Mills/Chern-Simons dualities. In section 5 we give a proof of the NTY formula. Section 6 contains our conclusions and perspectives for future work. We also included three appendices: appendix A provides more details about theδ distributions, appendix B gathers a few useful formulas and appendix C contains details of computations.

N = 4 theories with brane realizations
In this section we describe the N = 4 quiver theories and their type IIB brane realizations. We explain how to summerize the brane configuration, and thus the content of the quiver theory, in a graph with two types of nodes (or dots) and various labels.
Three-dimensional N = 4 gauge theories contain an N = 4 vector multiplet transforming in the adjoint representation of a gauge group G and hypermultiplets transforming in arbitrary representations R of G. The N = 4 vector multiplet is made out of an N = 2 vector multiplet V (in superfield notations) whose bosonic fields are a vector field A µ , a real scalar σ and a real auxiliary field D, and a chiral multiplet Φ containing a complex scalar φ and a complex auxiliary field F . A hypermultiplet contains two chiral multiplets Q, Q transforming in conjugate representations R andR of the gauge group. The R-symmetry group is SU(2) V × SU(2) H , with the real scalars in the vector multiplet forming a SU(2) V triplet and the scalars in the hypermultiplet forming two SU(2) H doublets. N = 4 Yang-Mills theories are naturally endowed with canonical vector-and hyper-multiplet actions, given in terms of N = 2 superfields by: with Σ =D α D α V (linear multiplet). In addition there is a superpotential coupling the adjoint chiral Φ and the matter chirals Q i , Q i of the form:

JHEP10(2014)117
In 3d the Yang-Mills coupling is dimensionful, g 2 YM has the dimension of a mass, implying that the UV limit is free, while the IR limit is strongly interacting. For this reason, the above microscopic Lagrangian description is reliable only at high energies.
The theories can be deformed by supersymmetric mass terms for the hypermultiplets, obtained by coupling Q, Q to a background abelian N = 4 vector multiplet (V m , Φ m ), with V m = mθθ and Φ m = φ mθ θ. (m, Re(φ m ), Im(φ m )) form a triplet under SU(2) V .
Supersymmetric FI deformation terms can aslo be added through a BF coupling to a background abelian N = 4 twisted vector multiplet (V η , Φ η ): In this paper we focus on N = 4 theories which can be engineered on type IIB brane configurations involving D3-branes stretched between two types of 5-branes. The SCFTs arise in the infrared limit and the superconformal algebra is OSp(4|4).

Yang-Mills quiver SCFTs
We consider infrared fixed points of three-dimensional N = 4 theories that admit a realization as the low-energy limit of brane configurations in type-IIB string theory [4]. The brane configuration realizing Yang-Mills quivers consists of an array of D3, D5 and NS5 branes oriented as shown in the table. The D3 branes span a finite interval along the x 3 direction and terminate on the five-branes. In the low-energy limit the world-volume SCFT on the D3-branes is effectively three-dimensionnal.
A stack of N coincident D3-branes stretched between two NS5-branes and intersecting M D5-branes give rise to a U(N ) gauge group with Yang-Mills N = 4 vector multiplet, plus M hypermultiplets in the fundamental representation of U(N ). Moreover each NS5-brane introduces an additionnal hypermulitplet transforming in the bifundamental representation of U(N i ) × U(N i+1 ), where N i and N i+1 are the numbers of D3-branes ending on the left and right of the NS5-brane respectively.
The brane configuration depicted in figure 1 is mapped to the linear quiver gauge theory summarized in the quiver diagram shown in the same figure. It containsP NS5-branes with N j coincident D3-branes stretched between the j-th and (j + 1)-th NS5-brane and M j D5-branes intersecting the N j D3-branes. In the quiver diagram a U(N j ) gauge node, with M j fundamental hypermultiplets, is indicated by a circle with N j and an attached square with M j . Bifundamental hypermultiplets are symbolized by lines joining two nodes. In total there areP − 1 D3-segments (stacks of D3-branes), whose low energy dynamics is the same as the infrared fixed point of the quiver theory withP − 1 gauge nodes. We also denote P ≡ P −1 j=1 M j the total number of D5-branes. One can also compactify the x 3 direction to a circle. The brane configuration is depicted in figure 2 and its low-energy theory corresponds to the low-energy limit of a circular quiver. The difference with respect to the linear quiver case is that the bifundamentals connecting the nodes form a closed loop.   The deformations of the quiver SCFT by mass terms and FI terms can be associated to displacements of the 5-branes in transverse space. For instance we can take the convention that, if t j denotes the position of the jth NS5-brane along x 9 , then the FI parameter of the jth node is η j = t j − t j+1 , and if m j denotes the position of the jth D5-brane along x 6 , then the corresponding hypermultiplet aquires a real mass m j . Displacements of 5-branes along the other directions can be similarly mapped to the other FI and mass deformation parameters, but we will set them to zero in this work since they do not appear in the partition function on S 3 computed by supersymmetric localization.  Graphs. The brane pictures themselves can be recast into graphs, where a line labelled by N denotes N coincident D3-branes extended between two consecutive 5-branes, a white dot denotes a NS5-brane and a black dot denotes a D5-brane. This provides graphs associated to the the linear and circular quivers of figures 1, 2 as shown in figure 3.

T (U(N )) theory
There is a Yang-Mills linear quiver SCFT that will play a distinguished role in our story: the T (U(N )) theory. Let us first described the theory T (SU(N )). The UV quiver description has U(1)×U(2)×. . .×U(N −1) gauge group, bifundamental hypermultiplets for each pair of adjacent nodes U(p) × U(p + 1), plus N hypermultiplets in the fundamental representation of the U(N − 1) node. T (SU(N )) is the IR fixed point SCFT of this linear quiver ( figure 4).
The theory has a group of global symmetry SU(N ) F × SU(N ) J with SU(N ) F rotating the N fundamental hypermultiplets and the SU(N ) J arising as an enhancement of the topological U(1) N −1 symmetry at the IR fixed point. The deformation parameters of T (SU(N )), up to R-symmetry transformations, are N real masses m j for the N fundamental hypermultiplets and N − 1 real FI parameters η j for the N − 1 nodes. T (SU(N )) is known to be invariant under mirror symmetry, which exchanges the two SU(N ) global symmetries and the mass and FI parameters: The diagonal U(1) F flavor symmetry, rotating the N fundamental hypermultiplets by the same phase, is usually identified with the diagonal U(1) of the gauge group. In the presence of generic supersymmetric FI deformations the diagonal U(1) is coupled to a background twisted vector multiplet through a BF term and the flavor U(1) F may be considered formally as an independent symmetry, completing the flavor symmetry to U(N ) F .
To define the theory T (U(N )) we add an extra BF coupling between the background U(N ) F and a new background (twisted) abelian vector multiplet, defining a new symmetry JHEP10(2014)117 that we call U(1) J . This is the same as adding a FI term for the U(N ) F flavor symmetry, with a FI parameter t N . As we will see in section 3.1, the partition function of the T (U(N )) theory deformed by masses and FI terms is invariant under the exchange of the 2N parameters m j ↔ t j , with t j , for 1 ≤ j ≤ N − 1 defined by η j = t j − t j+1 . It is then natural to combine the topological symmetry U(1) J with SU(N ) J into a U(N ) J global symmetry.
A priori the T (U(N )) and T (SU(N )) theories have identical dynamical properties, but it will be important for us to consider T (U(N )) to be able to gauge the U(N ) F × U(N ) J global symmetries.
To conclude we notice that the T (U(1)) theory is rather trivial: it contains no dynamical field, but only a BF coupling between two abelian background vector multiplets.

Chern-Simons SCFTs
Three-dimensional gauge theories admit supersymmetric Chern-Simons terms, with quantized Chern-Simons level k ∈ Z, 1 preserving N = 3 sypersymmetry [32]. The action reads: (2.5) The Chern-Simons couping introduces a mass ∼ kg 2 YM for the fields in the vector multiplet V as well as for the adjoint chiral multiplet Φ. In the infrared limit g YM becomes effectively very large, the Yang-Mills kinetic term is irrelevant and the adjoint chiral can be integrated out as an auxiliary field [21,32], leading to a pure Chern-Simons theory with a new superpotential: with T a R i the generators of the gauge group in the representation R i . The N = 3 Chern-Simons theories are exactly conformal. 2 For specific choices of gauge group and matter content the Chern-Simons SCFTs can have enhanced N = 4 supersymmetry [18][19][20]24], up to N = 8 supersymmetry corresponding to the ABJ(M) theory at Chern-Simons level k = 1, 2 (N = 6 for k > 2) [21,22].
The brane realization of N = 4 Chern-Simons SCFTs described in [21] involves D3branes, NS5-branes and (1, k)-5branes. The D3-branes are along the directions 0123, with the direction 3 compact, they intersect NS5-branes spanning 012789 and (1, k)-5branes spanning 012 [4,7] θ [5,8] θ [6,9] θ , with [a, b] θ meaning that the brane is along the direction cos θ x a + sin θ x b in the (x a , x b ) plane and the angle θ is fixed as a function of k so that the brane configuration preserves N = 3 supersymmetry [33], with a vanishing axion field. The low-energy theory living on the D3-branes has both Yang-Mills and Chern-Simons couplings. The Chern-Simons coupling for a U(N ) node corresponding to N D3-segments 1 In principle, depending on the number of massive chirals and their charges, the Chern-Simons level could be quantized to half-integer values [31]. However with the matter content of an N = 4 theory (only hypermultiplets), the quantization condition is simply k ∈ Z.
2 There is no relevant or marginal quantum correction to the classical action [32].

JHEP10(2014)117
stretched between a (1, k 1 )-and a (1, k 2 )-5brane has CS level k 1 −k 2 ∈ {−k, 0, k} [20,34]. In the infrared limit, for nodes with non-zero Chern-Simons coupling ±k, massive fields in the vector multiplet can be integrated out, as explained above, leading to a pure Chern-Simons node with a specific superpotential. However, as mentioned in section 3.5 of [21], there exist alternative (or simpler) brane configurations realizing Chern-Simons-Matter SCFTs, that preserve N = 4 sypersymmetry. These are the same brane configurations as presented in section 2.1 with D5-branes replaced by (1, k)-5branes, namely the D3-branes are along 0123, the NS5-branes along 012789 and the (1, k)-5branes along 012456. This corresponds to the previous brane configurations with θ = π 2 , which preserves N = 4 (8 real supercharges) when allowing for non-vanishing axion field ( [21]). For our purposes it makes more sense to consider these brane realizations that preserve the correct amount of supersymmetry and for which the SL(2, Z) action of type IIB string theory will be easily understood.
The theory living on D3-branes intersecting alternating NS5-branes and (1, k)-5branes involves U(N ) Chern-Simons gauge nodes with alternating Chern-Simons levels ±k and bifundamental hypermultiplets (twisted and untwisted alternatively) [19]. Moreover if the sequence of 5-branes have two consecutive NS5-branes or (1, k)-5branes, the infrared theory will have extra U(N ) nodes without Chern-Simons term, nor Yang-Mills term, in which case the vector multiplet fields are auxiliary [18,24]. Integrating out these auxiliary fields leads to a Chern-Simons gauge theory without these U(N ) nodes, coupled to sigma models with hyper-Kähler target space [18]. 3 For our purposes, it will be enough to describe the N = 4 infrared CFT living on a brane configuration associated to a sequence along x 3 of NS5-branes and (1, k)-5branes as the infrared fixed point of a quiver theory with: • U(N i ) ±k Chern-Simons gauge node for N i D3-segments extended between a NS5brane and a (1, k)-5brane, with Chern-Simons level +k if the NS5-brane is on the left of the (1, k)-5brane along the x 3 direction, and −k otherwise.; • U(N i ) 0 auxiliary gauge node for N i D3-branes stretched between two NS5-branes or two (1, k)-5branes, with N = 4 auxiliary vector multiplet; ) for each 5-brane with N i D3-branes on its left and N i+1 D3-branes on its right. This is summarized in figure 5, where we also introduce the corresponding graph with white dots for NS5-branes and grey dots for (1, k)-5branes.
The superpotential for a U(N i ) k Chern-Simons node is given by: JHEP10(2014)117 D3 X X X X D5 X X X X X X NS5 X X X X X X The Chern-Simons SCFTs admit deformations by FI terms associated to the positions of the 5-branes in transverse space, namely if t j denotes the position of the jth 5-brane along x 9 (for NS5s) or x 6 (for (1, k)5s), then the FI parameter of the jth node is η j = t j − t j+1 .
Even this simpler configurations with D3-segments stretched between NS5-branes and (p, q)-5branes do not have a known Lagrangian description when p > 1. It was argued in [23] (section 8) using the SL(2, Z) symmetry of IIB string theory, that such theories have a dual description as the infrared fixed points of Chern-Simons quivers with T (U(N )) SCFTs "interpolating" between gauge nodes.
The precise gauge theory description demands to find the sequence of S and T transformations that brings the (p, q)-5brane into a NS5-brane: p q = T k 1 ST k 2 S · · · ST kr 1 0 , where S and T are the generators of the SL(2, Z) group (this will be reviewed in section 3.3). The relation between p, q and the k i is (2.8) Figure 6. Graph corresponding to a sequence NS-(p, q)-NS of 5branes and the corresponding CS quiver theory with interpolating T (U( N )) and T (U(N )) couplings. The central link of the quiver is simply a bifundamental hypermultiplet.
Then the SCFT corresponding to a sequence of 5-branes NS-(p, q)-NS, with N D3-branes in the first segment and N D3-branes in the second, can be described as the infrared fixed point of a Chern-Simons quiver theory with r − 1 "interpolating" T (U( N )) CFTs and r − 1 "interpolating" T (U(N )) as shown in figure 6. In this picture a link labelled with T (U(N )) denotes a coupling between a T (U(N )) SCFT and the two adjacent U A succession of n (p, q)-5branes between two NS5-branes is associated to the same quiver theory as in figure 6, except that the central bifundamental hypermultiplet of U(N ) × U( N ) is replaced by a sequence of n Yang-Mills nodes connected by bifundamental hypermultiplets.
We will refer to these SCFTs realized with (p, q)-5branes as Gaiotto-Witten quiver theories (GW quivers). In general GW quiver theories do not admit a Lagrangian description, because of the interpolating T (U(N )) couplings, however this is not true for purely abelian theories. Abelian GW quivers involve interpolating T (U(1)) and T (U(1)), that have a very simple Lagrangian description as BF couplings between adjacent U(1) gauge nodes.

SL(2, Z) dualities
In this section we introduce the matrix model computing the partition function on S 3 . We explain how to organize it into a sequence of 5-brane factors reproducing the sequence of the brane construction. Then we propose, following [25], an action of SL(2, Z) duality on the 5-brane factors and show the equality of partition functions of SL(2, Z)-dual theories.

Partition function on S 3
In [5] it was shown that the partition function of three-dimensional SCFTs deformed by real mass and FI terms and defined on the round 3-sphere S 3 can be computed exactly and reduces to a simple matrix model. We summarize here the building blocks of the partition function matrix model on S 3 for N = 4 theories.
Through this paper we use the following short-hand notations sh(x) = 2 sinh(πx) , ch(x) = 2 cosh(πx) , th(x) = tanh(πx) . . . and similar notations for the sums Σ N j = Σ N j=1 , · · · . The localisation on S 3 of the partition function Z S 3 reduces the whole path integral to an integration over the Cartan subalgebra of the gauge group, divided by the order of the Weyl group |W|. We give here explicit formulas for a U(N ) gauge group.
The integrand receives contributions Z vector , Z hyper from the vector and hyper-multiplets of the theory, while Z classic contains the contributions from Chern-Simons and FI terms. The σ j are called eigenvalues. For a U(N ) group, the σ j are the diagonal components of the hermitians matrices in the algebra u(N ). The N = 4 vector multiplet contributes a factor A hypermultiplet in a representation R of the gauge group with real mass m, 6 contributes a factor  An N = 3 Chern-Simons term with level k contributes a factor A real Fayet-Iliopoulos term with parameter η contributes a factor Here det R is the the determinant in the representation R. The indices F and Adj refer to the fundamental and adjoint representations respectively. Let us give a few examples. The partition functions of the quiver SCFTs shown in figure 7 are given respectively by where η, η are real FI parameters, m, m, m a are real mass parameters and k, −k are Chern-Simons levels.
The partition function of the T (SU(N )) theory with fundamental hypermultiplet masses m a and FI parameters η p is given by The partition function for the theory T (U(N )) is the same with the addition of a FI coupling for the flavor U(N ) F global symmetry (background BF term):

JHEP10(2014)117
with t N the FI parameter. The evaluation of this matrix model was carried out in [26,35] and gives with S N the group of permutations of N elements and the t j defined by the relations is invariant under the exchange of the mass and FI parameters m j ↔ t j , as it is expected from mirror symmetry.

Repackaging of matrix models
The partition function's matrix model of a given quiver theory can be recast into a sequence of elementary matrix factors of two types, that are naturally associated to the two types of 5branes entering into the brane realization of the quiver. This sequence of elementary matrix factors reproduces the sequence of 5-branes, or dots, of the brane realization, or graph. We will treat the cases Yang-Mills and Chern-Simons quivers that involve NS5, D5 and (1, k)-5branes. The (p, q)-5branes matrix factors will appear later. Let us start with Yang-Mills quivers. The brane realization and associated graph can be seen as a sequence made of two elementary 5-brane building blocks: one for the NS5brane and one for the D5-brane as shown in figure 8. Each 5-brane block can be associated with a matrix factor depending on two sets on eigenvalues {σ j , σ j }, which are associated to the D3-branes ending on the left and on the right of the 5-brane respectively. The matrix model computing the partition function of the quiver theory is obtained by assembling the matrix factors of 5-branes blocks in a sequence reproducing the sequence of blocks of the brane realization, then identifying the eigenvalues of adjacent blocks (those corresponding to the same D3-segment) and finally integrating over all eigenvalues.
The NS5 matrix factor is given by It contains a bifundamental hypermultiplet matrix factor, "half" the matrix factors of the σ and σ vector multiplets and "half" the matrix factors of the σ and σ FI terms. In the brane picture t is realted to the position of the NS5-brane in transverse space and it contributes to the FI terms of the two adjacent gauge nodes through the relations η j = t j − t j+1 , with η j the FI parameter of the jth node and t j the parameter of the jth NS5-brane. The factor N ! N ! −1/2 are "half" the Weyl order of the left U(N ) and right U( N ) groups.
The D5 matrix factor is given by they should, with the δ functions. The averaging over permutations w ∈ S N ensures the anti-symmetrization of the factor with respect to permutations of the σ or σ eigenvalues, without affecting the matrix model. This anti-symmetrization will be naturally present in all 5-brane factors. In the brane picture m is here again related to the position of the D5-brane in transverse space. The (1, k)-5brane matrix factor is given by . (3.14) In the brane picture t is the position of the 5-brane in transverse space and it contributes to the FI terms of the left and right gauge nodes as in the NS5-brane case, which corresponds to k = 0. As for the NS5-brane this factor contains the contribution of a bifundamental hypermultiplet and "half" the contributions of the vector multiplet of the two nodes on the sides of the (1, k)-5brane. Moreover this factor includes the contribution from the Chern-Simons term induced by the 5-brane, with levels ±k in the two nodes.

JHEP10(2014)117
naturally to other matrix factors that we define later in section 3.3 (general (p i , q i ) 5-brane factors and duality-wall factors). We also define a "trace" for a factor depending on two sets of N eigenvalues F σ σ ("square matrix"): This repackaging of the matrix model into elementary 5brane factors allows us to express the partition function's matrix model in a compact way, as a sequence of 5brane factors. The partition function of a Yang-Mills linear quiver SCFT is expressed as 8 where the first NS5-factor has no left-eigenvalues (no D3-segments on the left of the NS5brane) and the last NS5-factor has no right-eigenvalues (no D3-segments on the right of the NS5-brane). The sequence of factors reproduces the sequence of NS5 and D5-branes of the quiver brane picture, or equivalently the sequence of white and black dots of the quiver's graph, shown in figure 3. For Yang-Mills circular quivers the partition function is expressed as Again the sequence of factors reproduces the sequence of NS5 and D5-branes. Let us give a few examples. The partition function of the T (SU(2)) theory is given by the partition function of the U(2) theory with four fundamental hypermultiplets is given by: 20) and the partition function of the U(3) × U(4) circular quiver theory with two fundamental hypermultiplets for the U(4) node is given by: The corresponding graphs are shown in figure 9. For Chern-Simons quivers, realized by a sequence of NS5-branes and (1, k)-5branes, the partition function is similarly expressed in the linear case by: JHEP10(2014)117 Figure 9. a) Graph of T (SU (2)). b) Graph of T (1111) (22) . c) Graph of U(3) × U(4) circular quiver with two U(4) fundamental hypermultiplets.
and for circular quivers: Again the sequence of 5brane blocks in Z reproduces the sequence of 5branes, or dots, in the brane realization, or graph. For instance the partition function of the linear quiver U(1) k × U(1) 0 × U(1) −k is given by while the partition function of the circular quiver U(4) k × U(6) −k × U(3) 0 is given by The corresponding graphs are shown in figure 10.

Local SL(2, Z) action on matrix models
The quiver SCFTs realized on brane configurations must inherit SL(2, Z) dualities, from the SL(2, Z) symmetry of type IIB string theory. For instance the standard mirror symmetry, discussed in [1], is known to be related to the type IIB S-duality.
In the case of standard mirror symmetry, dual pairs of quiver theories are found by identifying the brane realization of one theory with the S-dual of the brane realization of the other theory [2,3]. One theory is realized by a sequence of NS5 and D5-branes, while the mirror-dual theory is realized with the same sequence of 5branes, with NS5 and D5-branes exchanged (or NS5 → D5, D5 → NS5, see below).

JHEP10(2014)117
More dualities can be found by identifying the brane realizations of quiver theories through general SL(2, Z) transformations of IIB string theory. We will give evidence for these more general dualities by matching the partition function of dual SCFTs. The dualities will actually extend to "local" SL(2, Z) dualities, that were already discussed in [25] and implicitly studied in [23].
Let us first remind and generalize the picture developed in [25] of SL(2, Z) action on the 5-brane factors of the matrix model.
The SL(2, Z) action on the brane realization of the 3d theories is easily understood. M ∈ SL(2, Z) leaves the D3 branes invariant and transforms a (p, q) 5brane into a (p , q ) 5brane with where ad − bc = 1 and p ∧ q = 1. The group SL(2, Z) is generated by the transformations S and T given by In [23] Gaiotto and Witten suggested that SL(2, Z) transformations can be realized locally on the brane configuration, in a region containing a single 5-brane (spanning an interval along x 3 around the 5-brane). The authors of [25] reformulated their results in the following way. The local action of the transformation S on a (p, q)-5brane trades the (p, q)-5brane for a (−q, p)-5brane and creates an S-duality wall on its right and a S −1 duality wall on its left (hyperplanes at fixed x 3 ). The duality walls are the boundaries of the region of local SL(2, Z) action and can be considered as new objects in the brane construction. From the analysis of [23] it follows that a S-duality wall intersecting N D3branes induces in the quiver SCFT an interpolating T (U(N )) coupling between two U(N ) gauge nodes (see section 2.3), that are associated to the D3-branes on the left and on the right of the S-wall, as shown in figure 11. And the S −1 -wall intersecting N D3-branes induces an interpolating T (U(N )) coupling between the two U(N ) nodes.
Similarly the local action of T on a (p, q)-5brane trades the (p, q)-5brane for a (p, p+q)-5brane with a T -duality wall on its right and a T −1 -duality wall on its left. From [23] it follows that a T -duality wall intersecting N D3-branes induces in the quiver SCFT a Chern-Simons term with level k = +1 for a U(N ) node, associated with the N D3-branes crossing the T -wall, as shown in figure 11. The T −1 -wall induces a Chern-Simons term with coupling k = −1.
The iterations of S and T local actions bringing a (p, q)-5brane to a NS5-brane lead to the quiver theory description of SCFTs realized with (p, q)-5branes, presented in section 2.3.
It is rather easy now to associate matrix factors to the S-and T -duality walls, as we did for the 5branes. The S-wall with N D3-branes on both sides must be associated to the contribution of an interpolating T (U(N )), plus "half" the contribution of the left and JHEP10(2014)117 right U(N ) vector multiplets and some phase e iθ to be fixed: denotes the partition function of T (U(N )) with mass parameters σ j and FI parameters σ j . These are identified with the eigenvalues of the U(N ) left and right gauge nodes, as required by the diagonal gaugings. 9 The second equality is obtained after plugging in (3.11). Since the 5-branes factors, that necessarily stand on the left and on the right of the S-wall in the graph, are anti-symmetric under permutations of the σ j or σ j eigenvalues, it is does not affect the matrix models to replace the average over permutations w ∈ S N above by a single term e 2πi N j=1 σ j σ j , that we can associate to the S-duality wall. We named θ S the overall phase of S σ σ .
For the T -duality wall with N D3-branes on both sides we can associate the factor corresponding to the addition of a Chern-Simons term contribution at level k = 1 and the identifications of the eigenvalues of the left and right nodes σ = σ, so that the quiver theory has a single node for the N D3-branes crossing the T -wall. The phases e iθ T and e iθ S must be fixed for consistency with the SL(2, Z) group relations as explained below.
To summarize, the S-and T -wall elements of the graph (or brane realization) are associated with the elementary matrix factors: These duality-wall factors were already proposed in [25]. Our derivation emphasizes that these factors follow from the description of GW quivers of [23].

JHEP10(2014)117
Upon fixing e 4iθ S = 1 and e 3i(θ T +θ S ) = e πiN 4 , the matrix factors obey the SL(2, Z) relations (S 2 ) σ σ = (−1) σ σ and (ST ) 3 σ σ = 1 σ σ with (−1) σ σ = e 2iθ S N j=1 δ(σ j + σ j ) and 1 σ σ = N j=1 δ(σ j − σ j ). ±1 σ σ are the matrix factors for ±1 ∈ SL(2, Z). The local action of an arbitrary transformation M ∈ SL(2, Z) can be decomposed into a sequence of S and T actions. The matrix factor M σ σ for the M -wall is given by the product of the S σ σ and T σ σ factors, using (3.15), reproducing the sequence of S and T transformations. In particular this gives From now on we will assume the particular values: which are compatible with the conditions e 4iθ S = 1 and e 3i(θ T +θ S ) = e πiN 4 . 10 In the computations there is a sign ambiguity in the evaluation of the integrals dσe iπkσ 2 = ±e −i sgn(k)π/4 1 |k| , for k = 0 real. We choose dσe iπkσ 2 = e −i sgn(k)π/4 1 |k| , keeping in mind that the overall sign may not be uniquely defined.  The local SL(2, Z) actions on the brane configurations imply dualities between the 3d gauge theories that they realize. At the level of the matrix models of the 3d gauge theories, these local SL(2, Z) dualities should be expressed by the relation: with M ∈ SL(2, Z) and (p , q ) given by (3.26) and arbitrary numbers N, N of eigenvalues {σ j }, { σ j }. t and t denote the deformation parameters of the (p, q)-and (p , q )-5branes respectively. Figure 12 displays the graphs of the two theories related by a local M -duality.
We have used the symbol ? = to emphasize that we have not proven this relation. Indeed we will show that the relation holds only up to a phase.

(p, q)-5brane matrix factor
With p, q being two integers such that p = 0 and p ∧ q = 1, we propose the matrix model factor for a (p, q) 5-brane (figure 13): In analogy with the previous 5-brane factors, t should be associated to the position of the 5-brane in transverse space. This factor is compatible with the cases of NS5-brane and (1, k)-5brane factors (3.12) (3.14). It generalizes the proposal of [25] to the cases of unequal numbers of D3-segments ending on the left and right of the (p, q)-5brane, N = N and by the addition of the parameter t dependence.
We have to show that this factor obeys the relation (3.32) and it is enough to consider the cases M = S and M = T and prove the inverted relations: where µ = N + N 2 and ∆ = N − N . For M = S the computation is given in appendix C.1. In total we obtain: (see [6]).

JHEP10(2014)117
hand the phase e − iπ∆t 2 pq can be attributed to the presence of a background Chern-Simons term for a weakly gauged U(1) symmetry associated to the deformation parameter t, with Chern-Simons level k = ∆ pq . It was shown in [27,28] that the background Chern-Simons terms with integer coefficients are local counter-terms and characterize the ambiguity of the partition function. In the case at hand the Chern-Simons level ∆ pq is generically fractional, but it is not clear what conclusions should be drawn from this observation, since the theories realized with (p, q)-5branes are rather peculiar (non-Langrangian). However there are simpler cases when ∆ pq is an integer. For instance when N = N or when |p| = |q| = 1. In those cases the S-action on the matrix factors is directly compatible with local S-duality of the brane configuration.
We are left with the untreated case when the relations involve D5-factors or D5-factors (p, q) = (0, ±1). The D5-factor was given in (3.13) when N = N , but we have not specified it when N = N , because it was not needed to describe the matrix models of quiver theories. Let us review first this simpler case. When N = N , we have directly: and where the last equality follows from the Cauchy formula (B.2). The D5-factor is defined as the D5-factor (3.13) with m replaced by −m, and the above relations hold with the roles of D5 and NS5 exchanged for D5 and NS5 . It will be important to test mirror symmetry on arbitrary quivers in section 4 to provide a D5-factor when N = N , so we address this question now.
where we used the generalized Cauchy formula (B.3) to replace the NS5 factor. m is the 5-brane deformation parameter. The result factorizes into a product of N single integrals over the τ j . These integrals are not convergent, however it is possible to evaluate them as the analytical continuation to complex y of the standard integral dx e 2πi x y ch x = 1 ch y . 12 where we have relabelled τ w(j) → τ j in each integral. We are left with the integrations over the τ j which correspond to usual δ functions and special δ functions of a complex variable that we denoteδ(.).

JHEP10(2014)117
with m (∆) j = m + i ∆+1 2 − j for j = 1, · · · , ∆ and we have used ch(x + in) = (−1) n ch x, for n ∈ Z. Theδ must be defined as a special distribution that generalizes the usual δ distribution for the class of integrals that we treat. 13 Formally it should correspond to: for y ∈ C. A heuristic computation presented in appendix A lead us to the following definition. For z 0 ∈ Z,δ z 0 ≡δ( . − z 0 ) is defined by its action on a meromorphic function f with simple poles (away from z 0 ): where (z 0 ) = sgn(Im(z 0 )), u j are the poles of f in the region 0 ≤ Im(u) ≤ Im(z 0 ) (or Im(z 0 ) ≤ Im(u) ≤ 0). When 0 < |Im(u j )| < |Im(z 0 )|,f (u j ) is the residue at the pole u j , when Im(u j ) = 0 or Im(u j ) = Im(z 0 ),f (u j ) is half the residue at the pole u j . We give details about these exoticδ in appendix A. To conclude we have obtained a generalized D5-factor: with ∆ = N − N and * denotes complex conjugation.
Let us see what becomes of the relations (3.34) for the D5-factor.
(3.44) 13 When dealing with divergent matrix integrals, a standard recipe is to rely on analytic continuation of the integrals [36] with respect to some parameters of the integrand. In our case such an analytical continuation is not possible because the the function to be analytically continued is the Dirac delta function. This is why we do not speak about analytic continuation, but about "generalization" of the delta function. It might be surprising that we have to define such an exotic object, however one should remember that this defines a matrix factor for a D5-brane with N = N , which is not a natural factor arising in the matrix model of a gauge theory. When gluing together all the factors of a "good" matrix model, one should be able to integrate out the D5-factors and remain with a standard converging matrix model.

JHEP10(2014)117
This equality can also be checked directly using the D5-factor we have derived. Then for N ≥ N , The phase e πi∆m 2 accounts for a background Chern-Simons term with integer level ∆, which does not affect the physics of the theory [27,28].
The dualities we will test involve theories realized with D5-, NS5-and (1, ±1)-5branes and thus the additional phases will contain only unphysical integer level background CS terms.

Tests of SL(2, Z) dualities
In this section we show how the machinery of local SL(2, Z) transformations produces a powerful test of SL(2, Z) dualities, by matching the exact partition functions on S 3 of dual SCFTs.
Let us first re-derive the test of mirror symmetry for Yang-Mills circular quivers with nodes of equal rank presented in [7]. Consider a circular quiver theory A with nodes of equal ranks. It has a gauge group G A = P j=1 U(N ) with bifundamental hypermultiplets and M j fundamental hypermultiplets in the jth node. Its brane realization involves N D3-branes on a circle crossing a sequence of NS5 and D5-branes. The mirror-dual theory B is realized by the S-dual brane configuration changing the NS5 into D5-branes and the D5 into NS5branes. Theory B is also a Yang-Mills circular quiver, with gauge group G B = P j=1 U(N ) and M j fundamental hypermultiplets in the jth node. The relations between the A and B JHEP10(2014)117 quivers data can be read from the brane configurations. The partition function of theory A is given by its sequence of NS5 and D5 factors: Each 5-brane factor can be replaced by its local S-dual using (3.32): where the second equality follows from (S S −1 ) σ σ = 1 σ σ . The matrix model obtained after these simple manipulations is the matrix model for the partition function Z B of the S-dual theory B. The parameter t j of the j-th 5brane in the sequence of Z A is mapped to the parametert j of the j-th 5brane in the sequence of Z B . This means that the mass parameters m i and t j , associated to D5-and NS5-branes, are exchanged with the parameterst i and m j of the mirror theory, associated with NS5 and D5-branes. For these quiver theories, S-duality coincides with mirror symmetry. Theories A and B in figure 14 are an example of YM mirror theories.
In [4], mirror symmetry is associated to a S-duality transformation, together with a rotation that brings x j into −x j+3 and x j+3 into x j for j = 4, 5, 6, changing the NS5 into NS5-branes. At the level of the matrix model, this extra rotation can be implemented by reversing the sequence of 5-brane factors and reversing the NS5-charge of the factors (p, q) → (−p, q). This operation does not change the matrix model, since it is equivalent to with the "transposition" implementing the NS5-charge conjugation. We obtain: This completes the usual mirror symmetry transformation. This simple S-transformation of blocks allowed us to match the partition functions of S-dual pairs of Yang-Mills N = 4 SCFTs for all the circular quivers with nodes of equal rank. The same manipulation would work for any pair of theories A and B, whose brane realizations are related by a transformation M ∈ SL(2, Z). A theory A realized by a sequence of (p 1 , q 1 )-and (p 2 , q 2 )-5branes has a partition function given generically by where M ∈ SL(2, Z) and the dual theory B is realized by the same sequence of 5branes as theory A, but with (p i , q i ) = M (p i , q i ). The two partition functions are not equal but only equal up to a pure phase e πi ϕ AB that follows from the relations (3.36), (3.46). This extra phase is irrelevant as long as it can be understood as a background Chern-Simons term with integer level (see discussion above). This happens for instance when the gauge nodes have equal ranks N 1 = N 2 = · · · = N Q , in which case the phase vanishes. This simple computation constitutes a non-trivial test of the global M -duality symmetry between quiver theories A and B. Although we have tested successfully general SL(2, Z) dualities, all the dualities that involve Gaiotto-Witten quivers (2.3), realized with (p, q)-5branes with |p| > 1 are empty, because the GW quiver SCFTs are already described by using (local) SL(2, Z) duality. The theories for which we have an independent description are those involving D5-, NS5-and (1, k)-5branes, corresponding to YM or CS quiver SCFTs. Non-trivial SL(2, Z) dualities acting in this subclass of SCFTs can be found for dual theories realized with D5-, NS5-and (1, ±1)-5branes. An example of a triplet A, B, C of dual SCFTs is described in figure 14. Theory A and B are mirror dual YM quiver SCFTs and theory C is a dual CS quiver SCFT, obtained by acting with the SL(2, Z) transformation T T that changes D5-branes into (1, 1)-5branes.
Let us detail another example, where a Yang-Mills SCFT is mapped to a pure Chern-Simons SCFT (non-vanishing CS levels at all nodes):

JHEP10(2014)117
• theory A: Yang-Mills quiver with gauge group G A = P j=1 U(N j ) with bifundamental hypermultiplets and one fundamental hypermultiplet in each node. The brane sequence has P NS5-branes and P D5-branes alternating. The deformation parameters of the theory are the fundamental hypermultiplet masses m j and the FI parameters t j − t j+1 for the jth node.
• theory B: Chern-Simons quiver with gauge group G B = P j=1 U(N j ) −1 × U(N j ) 1 with bifundamental hypermultiplets and Chern-Simons level +1 and −1 alternating from one node to its neighbours. The brane sequence has P NS5-branes and P (1, 1)-5branes alternating. The deformation parameters of the theory are the FI parameters t j − t j+1 for the jth node.
Theory B is the T T -dual of theory A, with T T = 1 1 0 1 = −T ST , transforming D5-branes into (1, 1)-5branes, while leaving the NS5-branes invariant. The map between deformation parameters is given by t 2j = m j , t 2j−1 = t j for j = 1, · · · , N . An illustration in given in figure 15. It should be noticed however that SL(2, Z) dualities are not sufficient to test mirror symmetry for quivers with nodes of varying ranks. Acting with S-duality on a generic YM quiver SCFT, one obtains a brane realization involving D5-branes with different numbers of D3-branes ending on their left and on their right. These brane configurations do not have a simple gauge theory description. To arrive at the mirror dual brane configuration, one has to move the D5-branes along the x 3 direction, crossing NS5-branes and making the number of D3-branes vary, until a configuration corresponding to a YM quiver is reached. To be able to check mirror symmetry, it is necessary to understand how the 5-brane moves and the D3-brane creation effect is reproduced in matrix models. We turn now to this question.

Mirror symmetry and other dualities involving HW moves
To be able to test mirror symmetry we need to combine the S-duality transformation of the matrix models with another type of transformation that corresponds to interchanging the positions of 5-branes in the brane realization. For instance consider the case of the self-mirror T (SU(2)) theory, which is N = 4 SQED with two fundamental hypermultiplets. Its brane realization involves a single D3-brane stretched between two NS5-branes and intersecting two D5-branes (figure 16). After S-duality the NS5-branes have become D5branes and the D5-branes have been turned into NS5-branes. However we do not know which SCFT is realized by such a brane configuration. To reach a brane configuration that we understand, one has to move the D5-branes in between the two NS5-branes (figure 16) to recover a brane configuration realizing again T (SU(2)). When two 5-branes of different types pass through each other, the number of D3-branes stretched between vary. This is known has the Hanany-Witten effect and it is not supposed to affect the IR theory living on the D3-branes. This is why one can use these 5-brane moves to reach the desired brane configuration, as in the case of the self-mirror T (SU(2)).   (2)) theory, then the the graph resulting from the action of S-duality and below is the graph obtained after moving the external D5-branes (black dots) in-between the two NS5-branes (white dots), recovering the graph of T (SU(2)), which is a self mirror theory.

JHEP10(2014)117
In this section we show that the 5-brane moves, with brane creation effect, are reproduced by identities in the matrix model, allowing us to prove the equality of partition functions for mirror dual theories with nodes of arbitrary ranks. Moreover these HWidentities can also be used to test various dualities between CS quiver SCFTs involving 5-brane moves. Combined with SL(2, Z) dualities, they generate a rich web of dualities for N = 4 quiver SCFTs.

Hanany-Witten moves
Hanany-Witten 5-brane moves refer to the situation when a D5-brane and a NS5-brane pass through each other by moving along the x 3 direction. The conservation of 3-form fluxes on the 5-brane worldvolumes implies the creation of a D3-brane stretched between them [4]. In the meantime the D3-branes that were initially stretched between the D5-and NS5-branes have their orientation reversed an become anti-D3-branes, annihilating with other D3-branes. In total we arrive at the following rule: if the initial configuration has a D5-brane with N 1 D3-branes ending on its left, a NS5-brane with N 3 D3-branes ending on its right and N 2 D3-branes are stretched between the two 5-branes, then after the HW move the positions of the 5-branes are exchanged and the number of D3-branes stretched between the two has changed to N 2 = N 1 +N 3 −N 2 +1. This is summarized in the graphs of figure 17-a. The HW 5-brane move has a generalization when one considers the exchange JHEP10(2014)117 Figure 17. Parts of graphs of two theories related by a Hanany-Witten move. a) A D5-brane (black dot) and a NS5-brane (white dot) are exchanged and the rank of the middle link is changed from N 2 to N 2 = N 1 + N 3 − N 2 + 1. b) Generic (p 1 , q 1 )-and (p 2 , q 2 )-5branes are exchanged, with D = |p 1 q 2 − p 2 q 1 | > 0. In this case of a (p 1 , q 1 )-5brane and a (p 2 , q 2 )-5brane, with D = |p 1 q 2 − p 2 q 1 | > 0, in which case D new D3-branes are created and the final number of D3-branes stretched between the two 5-branes is figure 17-b). Note the we do not consider the exchange of 5-branes of the same type, which would have D = 0, and for which the argument developed in [4] does not apply. These "forbidden" 5-brane moves are related to N = 4 Seiberg-like dualities and involve subtleties that we hope to address in the future.
It is important to notice that the number N 2 of D3-branes stretched between a D5brane and a NS5-brane obeys the constraint N 2 ≤ N 1 + N 3 + 1 to ensure unbroken supersymmetry. This follows from the "s-rule" ( [4,37]) that says that supersymmetry is broken if more than one D3-branes are stretched between a D5-brane and a NS5-brane. The counterpart for (p 1 , q 1 )-and (p 2 , q 2 )-5branes is that there must not be more than D D3-branes stretched bewteen the two 5branes, leading to N 2 ≤ N 1 + N 3 + D. This ensures N 2 ≥ 0.
The claim of [38] is that the two brane configurations represented by the graphs in figure 17 flow to equivalent IR theories. For the matrix models this imply the following identity for (p 1 , q 1 )-and (p 2 , q 2 )-5brane factors: This identity would ensure that the SCFT realized with the (p 1 , q 1 )-and (p 2 , q 2 )-5branes has the same partition function has the theory realized with the same brane configuration, but with these two 5-branes exchanged. Again we used the symbol ? = to point out that we have not proven this relation yet and that it will be modified ultimately by the addition of some phase.
The identity (4.1) is difficult to prove, however we can use the local SL(2, Z) action on matrix models to trade the (p 1 , q 1 )-5brane factor and (p 2 , q 2 )-5brane factor for a D5-brane factor and a generic (p, q)-5brane factor with p = 0. The identity to prove is reduced to 0 1 Deriving this identity involves various tricks and manipulations that we present in appendix C.2. The computation relies on properties of the specialδ distributions that enter into the D5-brane matrix factor (3.43) and requires several mathematical identities given in appendix B. Moreover it is necessary to deal with various cases corresponding to different ordering of N 1 , N 2 , N 3 , N 1 + p, N 3 + p. In appendix C.2, we discuss only the case N 1 + p ≤ N 2 ≤ N 3 , which contains the tricks necessary to deal with the other cases. There are however cases for which we were not able to finish the computations due to some additional complications appearing, corresponding to 0 < N 2 < |p| and N 1 + N 3 < N 2 < N 1 + N 3 + |p|. 14 In the dualities that we discuss in this work, we only consider p = ±1 for which these cases do not exist. Our final result is (C.16) 15 where ± is the sign of p (and ∓ its opposite) and Φ = |∆ 21 | ∆ 2 The extra phase in the relation (4.3) contains matrix factors for a background CS term with level ±q for the U(1) global symmetry associated to m and a background BF coupling between the two U(1) global symmetries associated to m and t, which can be viewed as a mixed CS coupling with level ∓1. The CS levels are integers, implying that such background terms do not affect the physics of the theory [28].
We are now in a position to argue for the equality of the partition functions, up to irrelevant phases, of mirror dual theories for YM quiver SCFTs with nodes of arbitrary ranks.

Mirror symmetry
Mirror symmetry is a duality that relates pairs of N = 4 Yang-Mills quiver SCFTs, satisfying the "good" conditions of [23], namely at each node M j + N j+1 + N j−1 ≥ 2N j , where M j is the number of fundamental hypermultiplets of the node U(N j ). The mirror dual of a YM quiver theory A is found by first considering the brane configuration realizing A, with D5 and NS5-branes, then taking the S-dual of this brane configuration and implementing HW moves until the D5-branes have the same number of D3-branes on each side. One obtains the brane configuration realizing a YM quiver theory B, which is the mirror dual of the theory A. For this algorithm to work, it is necessary that, after some HW moves, each D5-brane arrives at a position where it has zero net number of D3-branes ending on it, where by net number we mean the number of D3-branes ending on its right, minus the number of D3-branes ending on its left. Although it is not completely straightforward, this is ensured by the conditions M j + N j+1 + N j−1 ≥ 2N j that define a "good" quiver. Note also that the mirror theory B is also a "good" quiver theory. 14 We believe however that the identities hold also for these cases. 15 In our computation we have not taken care of overall factors of i, so our result is only valid up to factors of i. This can be justified by the fact that the partition function is generally complex and that it is not clear wether the initial matrix model summarized in 3.1 contains the correct factors of i or not (see [6] for a related discussion).

JHEP10(2014)117
The partition functions of mirror dual theories A and B can be mapped using the tools we have developed. The partition function Z A of the theory A is given by the sequence of 5-brane factors mimicking its brane realization, for instance: Each 5-brane factor can be replaced by its local S-dual using (3.46): At this stage the matrix model is given by the sequence of D5 and NS5 factors, but the associated brane configuration has D5-branes with different numbers of D3-branes on each side (except when all N i are equal). Then we can use the identity (4.3) to exchange D5-and NS5 factors. For instance if N 1 > NP (≡ N 0 ), we have to exchange the two first factors: 6) where N 1 = N 1 + NP − N 1 + 1 = NP + 1 and e iϕ is a phase depending on the background parameters. Note that the net number of D3-branes ending on the D5-brane has decreased by one unit. If N 1 < N 1 , we have to continue moving the same D5-factor to the right of the chain of factors by permuting with NS5 factors, until the net number of D3-branes ending on it is zero (it decreases by one unit at each permutation). The fact that there are enough NS5 factors is ensured by the conditions defining a "good" quiver. The same algorithm must be applied to all D5-factors, so that in the end they all have zero net number of D3-branes ending on them.
The final sequence of D5 and NS5 factors is obviously very different from the initial sequence associated to the theory A, instead it corresponds precisely to the sequence associated to the brane configuration of theory B. This is because the permutations of 5-brane factors reproduce exactly the HW 5-brane moves that are needed to go to the brane configuration realizing the mirror theory B. As discussed in section 3.4, it is common to complete the transformation of the brane configuration by a "rotation" that changes the NS5-branes into NS5-branes. At the level of the matrix model, this corresponds to reversing the sequence of 5-brane factors and trading the NS5 factors for NS5-factors. This is actually a simple relabelling of the eigenvalues (from right to left) that does not affect the matrix model.  In the end we find that the partition functions Z A and Z B differ only by a phase e iϕ AB , corresponding to unphysical background CS terms. If {m i , t j }, 1 ≤ i ≤ P , 1 ≤ j ≤P , are the mass and FI deformation parameters of theory A, then deformation parameters of theory B are the FI parameterst i = m i and the mass parametersm j = t j .
The map between the exact partition functions of the SCFTs A and B, with FI and mass deformation terms, provides a important new test of mirror symmetry for all nonabelian circular and linear 16 YM quiver SCFTs.

Level-rank and YM-CS dualities
The identity (4.3) can be used to test other dualities that involve 5-brane moves. Such dualities have already been described for a few abelian SCFTs in [17]. Instead of trying to describe all possible dualities, we will concentrate on specific interesting cases corresponding to N = 4 level-rank dualities for CS quiver theories and dualities mapping YM quiver SCFTs and pure Chern-Simons SCFTs.
CS quiver theories are realized with brane configurations corresponding sequences of NS5-branes and (1, k)-5branes (see section 2.2). Permuting a NS5-brane and a (1, k)-5brane, adjacent in a brane sequence, leads to the brane configuration of a dual CS quiver theory, as illustrated in figure 18. The 5-brane exchange affects three consecutive gauge nodes of the quiver, in particular the central node is changed from U(N 2 ) k to U N 2 −k with N 2 = N 1 + N 3 − N 2 + |k|. This can be seen as a generalization to N = 4 quiver SCFTs of the Giveon-Kutasov duality for N = 2 SCFTs [39] (tests of the Giveon-Kutasov duality using exact partition functions were presented in [40]), which is already a generalization of the level-rank duality of simple Chern-Simons theory without matter.

JHEP10(2014)117
The equality of matrix models of the two dual theories, up to a phase, is ensured by the HW relation: which is obtained using (3.36), (3.46) and (4.3) in the following way: 17 where t and s are the deformation parameters associated to the NS5 and (1, k)-5brane respectively and we have used ∆ 23 − ∆ 1 2 = k. Note that again the extra phase in (4.8) appears as a background CS term with integer level, that does not affect our conclusions regarding dualities. The map between parameters of the dual theories indicates that the FI parameter of the middle node is reversed The FI parameters of the two exterior nodes U(N 1 ) and U(N 3 ) are also affected. This simple 5-brane permutation can be repeated for all couple of adjacent NS5 and (1, k)-5brane, leading to a web of dualities between CS quiver SCFTs. The identity (4.8) proves that the exact partition functions of the theories related by these HW-moves are equal, up to an irrelevant phases.
The dualities following from HW 5brane moves can be combined with the SL(2, Z) dualities to generate interesting dualities. Mirror symmetry between YM SCFTs is one example of such combined dualities. Another interesting case would be a duality mapping Yang-Mills SCFTs to pure Chern-Simons SCFTs, where by pure Chern-Simons we mean that all nodes of the CS quiver have non-vanishing CS levels. The Chern-Simons theories have superconformal Lagrangians and would be understood as an explicit description of the infrared fixed points of the "dual" Yang-Mills quiver theories.
We have already seen in section 3.4 that YM theories have CS duals related through T T -duality, which changes D5-branes into (1, 1)-5-branes. However, the CS duals have generically U(N ) 0 auxiliary nodes. To obtain a pure CS dual theory we can try to use HW-moves. The necessary and sufficient condition to obtain a pure CS dual theory is that the number of D5-branes and NS5-branes in the brane realization of the initial YM theory are equal for circular quivers, or differ by at most one for linear quivers. In this case, the (1, 1)-5branes of the T T -dual CS theory can be moved along the x 3 direction to reach a sequence of alternating NS5 and (1, 1)-5branes. The corresponding SCFT is then a pure CS theory with alternating Chern-Simons levels ±1. 17 We omit here the phases of the form e   . From top to bottom: quiver and graph of T (SU(4)) theory; graph after T T action; graph and quiver of the pure CS dual theory, obtained after HW moves.
The T (SU(N )) theories belong to this class of YM theories with pure CS duals. Let us see how the duality works by transforming the partition function of T (SU(4)) to its Chern-Simons dual. The partition function of T (SU(4)) with deformation parameters t 1,2,3,4 , m 1,2,3,4 is given by the sequence of 5brane factors: After acting (locally on each 5-brane factor) with T T -duality, the matrix model becomes where the extra phase is derived from the identities (3.46) and the decomposition T T = −T ST . Next we use the identity (4.8) to rearrange the sequence of factors, so that NS5 and (1, 1)-5brane factors alternate: Z T (SU(4)) = e πi ϕ 1 0 The final matrix model correspond to a pure Chern-Simons theory with gauge group U(1) 1 The transformation is summarized in figure 19.
The necessary and sufficient condition for a YM fixed point to admit a pure CS description boils down to having a number of nodes equal to the number of fundamental hypermultiplets for circular quivers (or different by at most one for linear quivers). It must also be noticed that the pure Chern-Simons duals of Yang-Mills theories have only nodes with Chern levels ±1 and thus are never weakly coupled, since the effective gauge coupling in Chern-Simons theory is λ = N k and it can become small only in the large k limit.

A check by direct computations
In the argumentation that we have developed, we were able to map partition functions of dual theories without explicitly computing the matrix models. We would like to provide JHEP10(2014)117 some consistency check of our results by computing matrix models of simple dual theories. Let us consider the three dual abelian theories: • T (SU(2)), which is a Yang-Mills theory with gauge group U(1) and two fundamental hypermultiplets. The deformation parameters are the FI parameter t 1 − t 2 and the real masses m 1 , m 2 . We denote its partition function Z A ; • the CS theory with gauge group U(1) We denote its partition function Z B ; • the pure CS theory with gauge group U(1) We denote its partition function Z C .
These abelian duals were already proposed in [17], where it was shown that their moduli spaces coincide. In addition our analysis provides the following map between parameters (4.12) The gauge quivers and corresponding graphs are presented in figure 20. The theories A and B be are related by T T -duality, while the theories B and C are related by a HW move or level-rank duality. The map between partition functions obtained by acting with T T duality on the matrix model, using (3.36), (3.46), is given by: up to overall phases independent of the deformation parameters. The matrix model for the T (SU(2)) theory is given by: where the integral was computed by deforming the contour to i ∞ and summing over residues. The partition function for the CS theory B is given by:

JHEP10(2014)117
To evaluate these integrals, we change variables σ 1 → σ 1 + σ 2 , σ 3 → σ 3 + σ 2 . Then the integration over σ 2 yields a delta function that can be used to integrate over σ 1 , leading to The partition function of the pure Chern-Simons theory C can be evaluated using similar ideas, giving These explicit results match the relations (4.13) with the parameter mapping (4.12), providing a direct check of the dualities.

Explicit partition functions
Finally we can make use of our matrix model machinery to derive some explicit evaluation of partition functions.
In [26] the authors conjectured an explicit formula for the partition function of an arbitrary YM linear quiver SCFT deformed by mass and FI terms. The formula is expressed in terms of two partitions (ρ,ρ) of a positive integer N , that encode the linear quiver data.
An invariant way of encoding a brane configuration -and the corresponding quiver gauge theory -is by specifying the linking numbers of the five-branes. They can be defined as follows l a = −n a + R NS5 a (a = 1, . . . , P ) where n a is the number of D3 branes ending on the ath D5 brane from the right minus the number ending from the left,n b is the same quantity for the bth NS5 brane, R NS5 a is the number of NS5 branes lying to the right of the ath D5 brane and L D5 b is the number of D5 branes lying to the left of the bth NS5 brane. These numbers are conserved under Hanany-Witten moves [4], which correspond to moving a D5-brane across a NS5-brane with a D3-brane creation or annihilation. Since the extreme infrared limit is expected to be insensitive to these moves, it is convenient to label the infrared dynamics in terms of the linking numbers of the 5-branes.
We may move all the NS5-branes to the left and all the D5-branes to the right, noting that a new D3-brane is created every time that a D5 crosses a NS5. In the end, all the D3 branes will be suspended between a NS5 brane on the left and a D5 brane on the right (see figure 21 for an example), so that the linking numbers satisfy the sum rule We adopt the convention that the linking numbers in the partitions are ordered nondecreasingly. 18 The IR fixed point SCFT of the theory labelled by (ρ,ρ) is called T ρ ρ (SU(N )). In the original configuration of figure 1 the D5-brane linking numbers are, by construction, positive and non-decreasing but this is not automatic for the linking numbers of the NS5 branes. Requiring that the NS5-brane linking numbers be non-decreasing is equivalent to the conditions for the quiver to be a "good" theory.
In the presence of mass and FI deformation terms, each D5-brane is associated to a real mass parameter m a and each NS5-brane with a FI parameter t b . It is convenient to define deformed partitions, that we call again ρ andρ, as ρ := (l 1 , m 1 ), (l 2 , m 2 ), . . . , (l P , m P ) ρ := l 1 , t 1 , l 2 , t 2 , . . . , lP , tP .
With these definitions, the mirror dual of T ρ ρ (SU(N )) is Tρ ρ (SU(N )). It is implied here that the masses m a label the D5-branes from right to left (which is the opposite of the convention we had adopted up to now), whereas the FI parameters t b label the NS5-branes from left to right as before.
To express our results it is convenient to define "N -vectors" as 18 We point out, to try to avoid confusions, that this is the opposite choice compared to the convention of [26] where the linking numbers are ordered non-increasingly.

JHEP10(2014)117
The exact formula for the partition function of linear quivers can be proven in a simple way using the tools we have developed.
Starting form an arbitrary linear quiver T ρ ρ (SU(N )), one can move all the white dots to the left and all the black dots to the right and then act locally with S-duality on the left part of the graph, transforming all the white dots into black dots, as shown in the example of figure 22. The resulting graph has only black dots and a S-wall separating the graph into two branches. The left branch of the graph is characterized by the partitionρ, the right branch by the partition ρ and the two branches are glued together through the S-wall. The partition function can be read from this graph and has the following structure: where Z ρ branch [σ] is the partition function of a single black dots-branch, associated to the partition ρ and the set of eigenvalues {σ j }. As in 4.2, the partition function of the original theory Z quiver and the partition function associated with the graph with two branches Z (ρ,ρ) are equal up to an unphysical phase: with ϕ = −2π a≺b m a t b and a ≺ b indicates that the D5-brane with parameter m a is placed to the left of the NS5-brane with parameter t b in the initial brane sequence realizing the theory. The single branch partition function for a partition ρ = [ (l a , m a ) , 1 ≤ a ≤ P ] of N evaluates to:

JHEP10(2014)117
This result can be proved by induction. For P = 1 the branch has a single black-dot and (5.8) reproduced the associated D5-factor. Then suppose (5.8) is true for a value P and take a partition of ρ = [(m a , l a ) , 1 ≤ a ≤ P + 1]. ρ is a partition of L P +1 = L P + l P +1 , corresponding to adding one black dot to the graph with P dots. Using (5.8), the corresponding matrix model is: where we have de-antisymmetrized the matrix factor (5.8) by permuting the eigenvalues σ j in the integrand, cancelling an overall 1/L P ! factor. Integrating over the σ j using the δ(.) we recover the result (5.8) at level P + 1, which completes the proof. We can turn now to the partition function (5.6) of a linear quiver with partitions De-antisymmetrizing the two branch factors by permuting the σ j and σ j in the integrand leads to: The integration must now be carried out using theδ(.). The result of such integration contains generally a regular piece obtained by treating theδ as simple δ functions plus a complicated sum of terms involving products ofδ(.). However in our case we know that the matrix model evaluates to a regular finite result as it is equal to the matrix model of a good linear quiver. This means that the singular terms withδ(.) all cancel in the anti-symetrization by w∈S N , so we can evaluate the result by treating theδ(.) as usual δ(.) functions. 19 This leads directly to the NTY conjectured formula: 20 and M and T are the N -vectors defined in (5.4). As pointed in [26], the result is explicitly symmetric under the exchange of the deformed partitions ρ andρ.

JHEP10(2014)117
As a simple consistency check of the validity of our manipulations of matrix models, we provide in appendix C.3 an explicit computation mapping the matrix model of a separated graph (black dots on the right, white dots on the left) to the matrix model of the initial quiver theory.

Perspectives
We have shown how the matrix model giving the exact partition function of an N = 4 theory on S 3 can be expressed as a sequence of elementary factors, mimicking the sequence of 5-branes of its brane realization in type IIB string theory. We have described the action of SL(2, Z) dualities on these 5-brane factors and shown that the partition functions of SL(2, Z) dual theories are equal, up to a phase, which was unphysical in all cases we studied. We found that the Hanany-Witten 5-brane move is expressed by a non-trivial identity for 5brane blocks that we proved. This allowed us to map the partition functions of Yang-Mills mirror-dual theories for linear and circular quivers with unitary nodes of arbitrary ranks, providing a significant extension of the results of [7]. In addition our results go beyond simple mirror symmetry and provide maps between the partition functions for a large web of dualities, generated by SL(2, Z) actions and 5-brane moves. These involve N = 4 level-rank dualities and dualities relating Yang-Mills to Chern-Simons quiver theories.
There are several extensions one can think of. It would be nice to consider the cases of quivers with orthogonal and symplectic gauge nodes realized by brane configurations involving orientifold planes [10] and see if a similar story exists. At the technical level one can try to consider the partition functions on a squashed 3-sphere S 3 b instead of the round S 3 , providing stronger tests of the dualities. An interesting question, which we did not address at all, is the question of how the moduli spaces of the SL(2, Z) dual theories are mapped and how they are affected or not by quantum corrections. Usual mirror symmetry is known to exchange the Coulomb and Higgs branches of dual Yang-Mills theories, the Higgs branch being classically exact (no quantum correction). It would be natural to investigate the properties of the moduli space of dual Chern-Simons theories, as was done in [17].

Aδ distributions
In this paper we consider integrations of meromorphic functions with simple poles, whose integral on the real line is convergent. When a pole lies on the integration contour we choose the principal value prescription to integrate.
Formally, the function x →δ(x−z 0 ), with x ∈ R, z 0 ∈ C, is meant to be the Fourier transform of the function x → e −2πiz 0 x , generalizing the usual Dirac distribution to complex z 0 : With f a meromorphic function on C with simple poles away from z 0 . Concretely we define theδ z 0 ≡δ( . − z 0 ) distribution by the recursion relation: where (z 0 ) = sgn(Im(z 0 )) and u j are the poles of f in the region 0 ≤ Im(u) ≤ Im(z 0 ) for (z 0 ) = +1 or the region Im(z 0 ) ≤ Im(u) ≤ 0 for (z 0 ) = −1. When 0 < |Im(u j )| < |Im(z 0 )|,f (u j ) is the residue at the pole u j . When Im(u j ) = 0 or Im(u j ) = Im(z 0 ),f (u j ) is half the residue at the pole u j . This definition comes down to shifting the contour of the x integration from R to R + iIm(z 0 ), picking pole residues, as can be understood from the heuristic derivation: where at the second line we have moved the contour of integration of x to R + iIm(z 0 ), picking pole residues, and made a change of variable x → x + iIm(z 0 ). The definition (A.2) implieŝ for any function g without poles on the complex plane (or simply without poles in the region 0 ≤ Im(u) ≤ Im(z 0 )). 21 When dealing with multiple integrals, theδ distribution can lead to shifts of contours of integration. For instance:

JHEP10(2014)117
where y 0 ∈ R, g y 0 (x) = g(x+iy 0 ), and the final contour of integration C(y 0 ) of x is obtained by deforming the real line R to a curve in C in such a way that, for y 0 ≥ 0, the contour passes below the poles u of g y 0 in the region −y 0 ≤ Im(u) ≤ 0, or for y 0 ≤ 0, the contour passes above the poles u of g y 0 in the region 0 ≤ Im(u g ) ≤ −y 0 , while the poles of f stay on the same side of the contour.

B Formulas
This appendix contains some formulas we used in our compuations.
• Weyl denominator formula This formula was derived from a similar formula in [41]. 22 • Others identities, for p ∈ N, x ∈ C: 22 We use their formula with xj = e 2π σ j , yj = e 2πσ j .

JHEP10(2014)117
and more generally for A, B ∈ N with p = A + B: We tested these formulas with Mathematica for small values of p, but did not prove them in general.

C Computations
In this appendix we present computations.
It is now possible to rearrange the factors and then to use the Cauchy formula (B.3) backward to obtain When N < N , the computation amounts to changing N ↔ N , σ ↔ − σ, t → −t and q → −q. The above result is invariant under these exchanges, so it holds also for N < N .

C.2 HW-move identity
Here we give the details of the computations proving the identity (4.2).
We consider the case N 1 + p ≤ N 2 ≤ N 3 with p > 0. This implies N 1 + p ≤ N 2 ≤ N 3 . The part of the matrix model corresponding to the graph on the left of figure 17-a is given by the product of the two 5-brane factors: We introduce j * ≡ ∆ 21 +1 2 and first assume j * ∈ N corresponding to ∆ 21 odd. Then we translate the labels j → j + j * , so that ∆ 21 j=1 → j * −1 j=−j * +1 ,m j+j * = m + ij , σ w(j+N 1 ) → σ w(j+µ+1/2) ≡ τ j and we focus on a single integral: −j . The permutation of the σ w(j) eigenvalues affects the total result (C.3) only by a sign (which is the signature of the permutation) that we will not keep track of.
Let us define σ j+N 1 = m (p) j , for j = 1, · · · , p, as p "frozen eigenvalues". Plugging (C.9) back in (C.3) and permuting again the σ w(j) eigenvalues conveniently yields (up to a sign): We have treated the case when ∆ 21 and p are both odd. When ∆ 21 and p are both even, the analysis proceeds similarly and yields the same result (C.12). Together these JHEP10(2014)117 two cases correspond to ∆ 3 2 being even. When ∆ 3 2 is odd, corresponding to ∆ 21 and p with different parities, there is an extra complication in the evaluation of theδ due to the presence of half pole contributions (see appendix A). However the computations can still be performed following the same steps. The "frozen eigenvalues" are σ j+N 1 = m −i p 2 − j in this case and the result is given, up to factors of i, by: We may now consider the other combination of 5-brane factors involved in the HW identity: (111) (SU (3)) quiver SCFT and its separated graph (black dots pushed to the right).

C.3 Matrix model of a separated graph
Here we show explicitly how the matrix model of the separated graph is mapped to the matrix model of the quiver theory in an explicit example. We consider the theory with U(1) × U(1) gauge group, one bifundamental hypermultiplet and one fundamental hypermultiplet in each U(1) node. The corresponding SCFT deformed by mass and FI parameters is T (111) (SU(3)) and its graph is shown in figure 23. After moving the black dots to the right of the graph, one obtains the separated graph of figure 23. The matrix model associated to this graph is: Integrating over λ 1 with theδ distribution yields after simplifications (contributions appear from the poles at λ 1 = σ j + i 2 ):
As expected, we recover the matrix model for the partition function of the quiver theory we started with. The extra phase is also as expected from (5.7) (as usual we ignore overall factors of i).
Open Access. This article is distributed under the terms of the Creative Commons Attribution License (CC-BY 4.0), which permits any use, distribution and reproduction in any medium, provided the original author(s) and source are credited.