1: \begin{abstract}
2: Multi-agent models often describe populations segregated either in the physical space, i.e. subdivided in metapopulations,
3: or in the ecology of opinions, i.e. partitioned in echo chambers.
4: Here we show how the interplay between homophily and social influence controls the emergence of both kinds of segregation
5: in a simple model of mobile agents, endowed with a continuous opinion variable.
6: In the model, physical proximity determines a progressive convergence of opinions but differing opinions result in agents moving away from each others.
7: This feedback between mobility and social dynamics determines to the onset of a stable dynamical metapopulation scenario
8: where physically separated groups of like-minded individuals interact with each other through the exchange of agents.
9: The further introduction of
10: confirmation bias in social interactions, defined as the tendency of an individual to favor opinions that match his own,
11: leads to the emergence of echo chambers where different opinions can coexist also within the same group.
12: We believe that the model may be of interest to researchers investigating the origin of segregation in the offline and online world.
13: \end{abstract}
14: