Okay, so the whole dorm life as a setting for exploring friendship versus rivalry? It's everywhere once you start looking, and honestly, I think a lot of it hinges on forced proximity. In books like 'A Deadly Education' by Naomi Novik, the Scholomance is basically a magical death trap dorm, and the alliances formed there are purely survival-based at first. You get thrown together, you have to share resources, navigate the same dangers—that creates an intense pressure cooker. The friendship that blossoms between El and Orion is born from that shared, life-or-deadly-homework scenario, but it's always edged with a weird competitive tension because of their different magical strengths.
But the rivalry angle can be subtler too. I'm thinking of 'The Secret History', where the classics students at Hampden are in their own insular world. Their bond is deep, intellectual, almost cult-like, but it's laced with jealousy, one-upmanship, and the terrifying need to be the professor's favorite. The dorm-like closeness of their group house amplifies every slight. It shows how friendship and rivalry aren't opposite ends of a spectrum; they can be the same toxic soup simmering for too long in a confined space.
What I find less common are stories that explore the mundane, slow-building rivalries—the kind over who borrowed your good pen and never returned it, escalating over months into silent wars over shower times. That's the real dorm experience for most of us, and maybe that's why we read the heightened, magical versions instead.