Nowadays, community detection is one of the important fields for understanding network topology and has many applications in information diffusion, interaction mining and migration behaviour analysis. Therefore, community detection in social networks can help to understand user behaviour and network characteristics. There are many community detection methods, which are often designed for single-layer social networks. However, real-world networks use several types of relationships to establish connections between users, each of which has different characteristics. Hence, real-world networks can be modelled as multiplex networks. In general, multiplex networks are an example of multilayer networks in which the relationships between users in different networks can be considered simultaneously. In these networks, each layer represents the connections between users in a social network. Meanwhile, communities in multiplex networks are identified based on the structure and connections between overlapping users in different layers of the network. In this article, the nonnegative matrix tri-factorization (NMTF) strategy is used to model multiplex social networks, and a solution for community detection is developed based on it. According to this strategy, a common consensus matrix and then an alignment matrix are extracted based on similarity metrics and network structure. The use of these matrices as a flexible modelling framework enables the detection of coherent community between overlapping users in multiplex social networks. We evaluate the proposed NMTF method through various metrics on a multiplex social network. The results of this evaluation show the better performance of NMTF in terms of community quality compared to equivalent methods.