Filmmaker Dan Edge knew he had to make a documentary about solitary confinement after the head of Colorado's prison system was murdered.

Edge had gotten to know Tom Clements while working on a film about veterans struggling with PTSD, some of whom had ended up in prison. Clements told Edge he was concerned that solitary confinement was being overused in U.S. prisons, and that instead of rehabilitating inmates, it was making them much worse.

Then, a few years later, Clements was killed at home by a former inmate -- one who had spent a long time in solitary.

In the year that followed, Edge spent several months filming in the segregation unit of Maine's state prison. "Solitary Nation," the resulting documentary premiering Tuesday on PBS Frontline, takes a raw, sometimes painful look at a practice that has become heavily relied upon inside America's prisons.

While solitary confinement is meant to keep the most dangerous inmates away from the rest of the prison population, that isn't how it ends up working out in practice.

"I think one of the misconceptions about solitary confinement is that it's for the worst of the worst, that you're going to walk into one of these units and just find psychopaths," Edge said. "It's really not like that at all. The unit we were filming on has an average of about 40 inmates, and on a given day, maybe one or two of them fit into the category I just mentioned. A lot of them are very young -- 18, 19, 20 years old. They're in prison for fairly minor stuff, they're on short sentences, and they're in solitary confinement because for one reason or another they're not doing well in general population. They might be disruptive, they might need protection themselves from other inmates. It's often the most vulnerable inmates, and it's often inmates who are on the brink of mental illness."

"Solitary Nation" follows a few young men over the course of their time in solitary. As their mental states worsen, many of them turn to extreme behavior -- pushing feces under their doors, cutting themselves with razor blades and smearing their walls with blood.

Edge was able to get so much access to film inside the solitary confinement unit because, like Clements, the warden of the Maine prison was also concerned about the way solitary is being used.

"I think he was prepared to let us go in to film because he wanted the United States to have a grown-up conversation about this issue," Edge said.