We use complex network theory to study the differences between the friendship concepts in elementary school and university students. Four friendship networks were identified from surveys. Three of these networks are from elementary schools; two are located in the rural area of Yucatán and the other is in the urban area of Mérida, Yucatán. We analyzed the structure and the communities of these friendship networks and found significant differences among those at the elementary schools compared with those at the university. In elementary schools, the students make friends mainly in the same classroom, but there are also links among different classrooms because of the presence of siblings and relatives in the schools. These kinds of links (sibling-friend or relative-friend) are called, in this work, “mixed links”. The classification of the communities is based on their similarity with the classroom composition. If the community is composed principally of students in different classrooms, the community is classified as heterogeneous. These kinds of communities appear in the elementary school friendship networks mainly because of the presence of relatives and siblings. Once the links between siblings and relatives are removed, the communities resembled the classroom composition. On the other hand, the university students are more selective in choosing friends and therefore, even when they have friends in the same classroom, those communities are quite different to the classroom composition. Also, in the university network, we found heterogeneous communities even when the presence of sibling and relatives is negligible. These differences made up a topological structure quite different at different academic levels. We also found differences in the network characteristics. Once these differences are understood, the topological structure of the friendship network and the communities shaped in an elementary school could be predicted if we know the total number of students and the ties between siblings and relatives. However, at the university, we cannot do the same. This discovery implies that friendship is a dynamic concept that produces several changes in the friendship network structure and the way that people make groups of friends; it provides the opportunity to give analytic support to observational studies. Communities were also studied by gender and we found that when the links among relatives and siblings were removed, the number of communities formed by one gender alone increased. At the university, many communities formed by students of the same gender were also found.