> ## Content Index
> Fetch the complete content index at: https://youthstemline.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# The Social Media Algorithm Explained
- URL: https://youthstemline.com/the-social-media-algorithm-explained/
- Published: 2026-08-30T16:15:37.000Z
- Updated: 2026-08-30T16:16:01.000Z
- Author: Youth Stemline
- Tags: Mathematics, Technology, social media, apps, online, algorithm, graph, influencer, theory, echochambers, opinion, content, information, trend

By Aashritha Shankar

\~ 5 minutes \~

---

The moment you open social media, your For You page is waiting, eerily curated to show you everything you *should* want to see. Is your phone psychic? Many of us conflate this effect to the social media “algorithm,” but how exactly does that algorithm work, and how does it know us *so well*? To answer this question, it is crucial to dissect the mathematics behind algorithmic systems.

## Graph Theory

Graphs, at their core, are mathematical structures used to model relationships between objects. Every graph is composed of nodes (points) and edges (lines). However, the graphs that we are familiar with are wildly different from the graphs that support graph theory. In graph theory, these links don’t represent the transition from point to point, but instead they symbolize the connection of two distinct entities. 

![](https://storage.ghost.io/c/83/34/833489ef-ec5a-4a18-ac41-0819108bed89/content/images/2026/08/data-src-image-0d733490-c91e-4f49-b682-27f1c6bc08eb.png)

A Simple Graph / Introduction to Graph Theory / GeeksforGeeks

In social media, graph theory is applied to demonstrate the connections between people or posts. Undirected graphs show connections regardless of power imbalances while directed graphs show the flow of power / viewership. Undirected graphs signify the connections of two people in an equivalent manner (ex. a friendship). On the other hand, directed graphs can be used to show how one person looks towards another (ex. an influencer). Furthermore, these edges can be weighted to show the relative strength of different relationships. Ultimately, these graphs can be used to find the underlying pattern that people are reduced to, weighting on all sorts of factors such as watch time , scroll frequency, etc. For example, if one person is consistently viewing another person’s content but the other person doesn’t interact with them, that would create a directed graph. Meanwhile, if two people are simply friends in an undirected graph, then, while they may view similar content, there is no imbalance in viewership generated by the algorithm. 

While this approach may seem infeasible at scale, the 1960s small world experiment by Stanley Milgram suggests that almost everyone on earth is connected by less than six acquaintances. While the research varies between five and seven steps, this theory allows a feasible map due to its boundedness, the quality of being finite. Because the distance between people isn’t as large as we would assume, these maps are applicable to both small and large scale social media platforms. Ultimately, these social media algorithms employ these simple maps within communities of like-minded individuals and connect them to one another creating an overall large map. 

## Influencers

Not only can these graphs show connections between people, but they can help understand the driving force in those connections. Are people viewing a post because they’re interested in the content itself or is there engagement because it’s being posted by an influencer? Through graph theory, the sheer number of edges adjacent to a person distinguishes a typical consumer from an influencer. 

![](https://storage.ghost.io/c/83/34/833489ef-ec5a-4a18-ac41-0819108bed89/content/images/2026/08/data-src-image-5bda6f8c-2ff5-4ef1-8ec2-c0c85860fd9b.png)

C looks like an influencer while D represents a typical consumer / pinniped.page

Aside from furthering their content in the algorithm, these influencers also act as bridge nodes. Followers of the same influencer are now perceived to have a connection or similarity because of this bridge node. This plays into the creation of a small world on social media by effectively connecting people from a diverse range of backgrounds through a similar set of likes or dislikes. 

These bridges are also crucial for creating trends, as they are connected to such a large group of people. When multiple people who are connected to a certain bridge node engage in a trend, the trend is then directed towards everyone who engages with that bridge node. Because of the consistent push of this trend towards the bridge node, the algorithm believes that it is relevant to everyone who engages with that node. In doing so, it blasts this trend to a larger group of people who are all connected to this bridge node. 

## Echochambers

While this system can create many beneficial outcomes in terms of connectivity, it also risks creating echo chambers. These echo chambers are primarily generated through homophily, the mathematical tendency to cluster similar nodes. This is largely because users with similar ideologies are more likely to create edges with one another, while simultaneously avoiding people with opposing viewpoints because they appreciate wholly different content 

Over time, the topology of the graph shifts from a diverse field of connections between individual groups into large clusters of people who view similar content. Because the graph theory behind the system encourages content that maintains high levels of engagement, these algorithms effectively strain out diverse views from an individual’s recommended feed. 

This system creates a closed loop where the more content you view, the more similar content you are shown. This looks like a person who enjoys watching cat videos, continuing to see more cat videos, and never being exposed to anything different.

Within these separated clusters, information travels much more effectively. This means that over 75% of content that a person sees is typically content that aligns with their views. However, echo chambers like these are net- harmful because people within them often become more polarized or extremist due to a lack of productive discourse and interaction with opposing perspectives. 

## Conclusion

In order to create a society in which people are able to contribute meaningfully to constructive conversations, it is important not to isolate people into echochambers. When viewing content on social media, it is vital that we stay open to different perspectives, and remember that just because we see one opinion, that does not mean that it’s the only opinion out there. 

---

## References

Ai, J., He, T., Su, Z., & Shang, L. (2022). Identifying influential nodes in complex networks based on spreading probability. *Chaos, Solitons & Fractals*, *164*, 112627\. [https://doi.org/10.1016/j.chaos.2022.112627](https://doi.org/10.1016/j.chaos.2022.112627?ref=youthstemline.com)

*Echo Chamber Effect | EBSCO*. (2021). EBSCO Information Services, Inc. | Www.ebsco.com. [https://www.ebsco.com/research-starters/communication-and-mass-media/echo-chamber-effect](https://www.ebsco.com/research-starters/communication-and-mass-media/echo-chamber-effect?ref=youthstemline.com)

*Electronic Journal of Graph Theory and Applications (EJGTA)*. (2024). Ejgta.org. [https://www.ejgta.org/index.php/ejgta](https://www.ejgta.org/index.php/ejgta?ref=youthstemline.com)

Gao, Y., Liu, F., & Gao, L. (2023). Echo Chamber Effects on Short Video Platforms. *Scientific Reports*, *13*(1). [https://doi.org/10.1038/s41598-023-33370-1](https://doi.org/10.1038/s41598-023-33370-1?ref=youthstemline.com)

Journal of Graph Theory. (2006). *Journal of Graph Theory*. [https://doi.org/10.1002/(issn)1097-0118](https://doi.org/10.1002/%28issn%291097-0118?ref=youthstemline.com)

Kim, J., Jeong, S., Kim, J., & Lim, S. (2025). Bridges in social networks: current status and challenges. *PeerJ Computer Science*, *11*, e3122\. [https://doi.org/10.7717/peerj-cs.3122](https://doi.org/10.7717/peerj-cs.3122?ref=youthstemline.com)

Penn, A. (2019, November 25). *Milgram’s Small-World Experiment: Connected by 6 Degrees*. Shortform Books. [https://www.shortform.com/blog/milgrams-small-world-experiment/](https://www.shortform.com/blog/milgrams-small-world-experiment/?ref=youthstemline.com)

Putri, S. D. G., Purnomo, E. P., & Khairunissa, T. (2024). Echo Chambers and Algorithmic Bias: The Homogenization of Online Culture in a Smart Society. *SHS Web of Conferences*, *202*(1), 05001\. [https://doi.org/10.1051/shsconf/202420205001](https://doi.org/10.1051/shsconf/202420205001?ref=youthstemline.com)

Travers, J., & Milgram, S. (1969). An Experimental Study of the Small World Problem. *Sociometry*, *32*(4), 425\. [https://doi.org/10.2307/2786545](https://doi.org/10.2307/2786545?ref=youthstemline.com)

---