Set in South Boston, Good Will Hunting is about Will Hunting (Matt Damon), a young man who immerses himself in books, drinking and friends to escape his anger and frustration stemming largely from his past experiences with abusive foster families. Will and his best friend, Chuckie Sullivan (Ben Affleck), hang out together with their small group of friends in impoverished areas of Boston, drinking and occasionally fighting down in Southie. Will works menial jobs, hiding his incredible genius (such as a talent for memorizing facts and an intuitive ability to solve complex math equations).
While Will is working as a janitor at MIT, Professor Gerald Lambeau (Stellan Skarsgård), a Fields Medalist and combinatorialist, puts a difficult problem for his graduate class on a chalkboard in the hallway, hoping that someone would be able to solve the 'challenge' by the end of the term. Will solves it overnight and secretly posts the answer the next day. This throws the classes and professors into confusion, wondering who could have solved the equation.
At some point during the next few days, Will meets Skylar (Minnie Driver) at a Harvard bar, and she gives him her phone number. Meanwhile, at MIT, Lambeau and the other professors decide to put up a much more complicated problem one that had taken him and his colleagues two years to prove. Soon after they have put up this second problem, Lambeau and his assistant find Will, in his janitor's uniform, writing on the chalkboard. Lambeau (thinking Will is vandalizing the board) is incensed and chases Will away, but then returns to the board to find his astonished assistant staring at the correctly solved theorem.
While Lambeau is in the process of trying to track Will down, Will and his friends pick a fight. Will continues brutally beating a man who once picked on him in kindergarten, even as the police arrive and his friends escape. Will is arrested, and during his arrest hits a cop, which seems to guarantee that he will be facing jail time.
Lambeau meets with Will after the court hearing and lays out his options: Either he can go to jail, or he can be released under Lambeau's personal supervision, as per a deal that Lambeau worked out with the judge privately. The latter option comes with two conditions: Firstly, Will must work on advanced mathematics with Lambeau, and secondly, he must see a therapist.
Will does extremely well in the math sessions with Lambeau; however, he is averse to seeing a therapist, and quickly drives off several well known therapists whom Lambeau has arranged for him to see. On the verge of giving up, Lambeau takes Will to meet his former college roommate, a psychologist, Sean Maguire (Robin Williams), who teaches at Bunker Hill Community College, to mostly uninterested, uninspired students.
After a difficult start, Sean concludes that Will's defensiveness is the result of years of physical and emotional abuse, (as well as intense isolation), and that his hostile,...