Algebraic quantum groupoids have been developed by two of the authors of this note (AVD and SHW) in a series of papers [A. Van Daele and S. Wang, Weak multiplier Hopf algebras. Preliminaries, motivation and basic examples, Banach Center Publ. 98 (2012) 367–415; A. Van Daele and S. Wang, Weak multiplier Hopf algebras I. The main theory, J. Reine Angew. Math. 705 (2015) 155–209; A. Van Daele and S. Wang, Weak multiplier Hopf algebras II. The source and target algebras, preprint (2014), arXiv: 1403.7906v2 [math.RA]; A. Van Daele and S. Wang, Weak multiplier Hopf algebras III. Integrals and duality, preprint (2017), arXiv: 1701.04951 [math.RA]], see also [A. Van Daele, Algebraic quantum groupoids. An example, preprint (2017), arXiv: 1702.04903 [math.RA]]. By an algebraic quantum groupoid, we understand a regular weak multiplier Hopf algebra with enough integrals. Regular multiplier Hopf algebroids are obtained also by two authors of this note (TT and AVD) in [T. Timmermann and A. Van Daele, Regular multiplier Hopf algebroids. Basic theory and examples, Commun. Algebra 46 (2017) 1926–1958]. Integral theory and duality for those have been studied by one author here (TT) in [T. Timmermann, Integration on algebraic quantum groupoids, Int. J. Math. 27 (2016) 1650014, arXiv: 1507.00660 [QA]; T. Timmermann, On duality of algebraic quantum groupoids, Adv. Math. 309 (2017) 692–746, arXiv: 1605.06384 [math.QA]]. In these papers, the term algebraic quantum groupoid is used for a regular multiplier Hopf algebroid with a single faithful integral. Finally, again two authors of us (TT and AVD) have investigated the relation between weak multiplier Hopf algebras and multiplier Hopf algebroids in [T. Timmermann and A. Van Daele, Multiplier Hopf algebroids arising from weak multiplier Hopf algebras, Banach Center Publ. 106 (2015) 73–110]. In the paper, Weak multiplier Hopf algebras III. Integrals and duality [A. Van Daele and S. Wang, Weak multiplier Hopf algebras III. Integrals and duality, preprint (2017), arXiv: 1701.04951 [math.RA]], one of the main results is that the dual of an algebraic quantum groupoid, admits a dual of the same type. In the paper, On duality of algebraic quantum groupoids [T. Timmermann, On duality of algebraic quantum groupoids, Adv. Math. 309 (2017) 692–746, arXiv: 1605.06384 [math.QA]], a result of the same nature is obtained for regular multiplier Hopf algebroids with a single faithful integral. The duality of regular weak multiplier Hopf algebras with a single integral can be obtained from the duality of regular multiplier Hopf algebroids (see [T. Timmermann, On duality of algebraic quantum groupoids, Adv. Math. 309 (2017) 692–746, arXiv: 1605.06384 [math.QA]]). That is however not the obvious way to obtain this result. It is more difficult and less natural than the direct way followed in [A. Van Daele and S. Wang, Weak multiplier Hopf algebras III. Integrals and duality, preprint (2017), arXiv: 1701.04951 [math.RA]]. We will discuss this statement further in the paper. Nevertheless, it is interesting to investigate the relation between the two approaches to duality in greater detail. This is what we do in this paper. We build further on the intimate relation between weak multiplier Hopf algebras and multiplier Hopf algebroids as studied in [T. Timmermann and A. Van Daele, Multiplier Hopf algebroids arising from weak multiplier Hopf algebras, Banach Center Publ. 106 (2015) 73–110]. We now add the presence of integrals. That seems to be done best in a framework of dual pairs. It is in fact more general than the duality of these objects coming with integrals. We are convinced that the material we present in this paper will provide a deeper understanding of the duality of algebraic quantum groupoids, both within the framework of weak multiplier Hopf algebras, as well as more generally for multiplier Hopf algebroids. Finally, we feel it is also appropriate to include some historical comments on the development of these duality theories.