This page is part of the website

Mathematics Goes to the Movies

by Burkard Polster and Marty Ross


Good Will Hunting (1997)

Will Hunting, played by Matt Damon, is a mathematical wunderkind without any formal mathematical education. When we encounter him for the first time he is 20 years old and he is working as a janitor at MIT. He solves a couple of supposedly hard problems on a blackboard in a hallway that were left there by Lambeau, played by Stellan Starsgard, one of the math professors at MIT. Lambeau is suitably impressed and tries to help Will sort out his somewhat messed up life. To this end he enlists the help of one of his friends, Sean, played by Robin Williams, who teaches psychology.


Lecture theatre

LAMBEAU: Mod squared dx. So, please finish Perceval, by next time. And I know many of you had this as undergraduates, but it won't hurt to brush up ... Thank you, Steven ... I also put an advanced Fourier system on the main hallway chalkboard. I'm hoping that one of you might prove it by the end of the semester. Now, the person to do so will not only be in my good graces, but also go on to fame and fortune by having their accomplishment recorded and their name printed in the auspicious MIT Tech. Former winners include Nobel Laureates, Fields Medal winners, renowned astrophysicists, and lowly MIT professors. Well, that's all. If you have any questions, I'm sure that Tom has the answers.


Will sees math problem on the blackboard in the hallway (this is the problem that Lambeau just talked about in his lecture).


Will scribbles solution on a mirror in his apartment.


MIT reunion

STUDENT: Professor Lambeau.


STUDENT: I'm in your applied theories class. We're all up at the Math and Science building.

LAMBEAU: Come 'ere ... ... It's Saturday! Unless you wanna' have a drink with me tonight.

STUDENT: Maybe . . . We just couldn't wait until Monday to find out.

LAMBEAU: Find out what?

STUDENT: Who proved the theorem?

MIT hallway. Lambeau discovers Will's solution to his problem. The four questions on the left side have been rewritten since we last had a look at this blackboard.


LAMBEAU: This is correct. Who did this? Jack?

MIT STUDENT: Wasn't me.

LAMBEAU: Nemesh?



Lecture Hall

LAMBEAU: Is it just my imagination or has my class grown considerably? Well, by no stretch of my imagination do I believe you've all come here to hear me lecture. But rather to ascertain the identity of the mystery mathmagician. So, without further ado, come forward silent rogue and receive thy prize ... . Well, I'm sorry to disappoint my spectators, but it seems there will be no unmasking here today. However, my colleagues and I have conferred, and there is a problem on the board right now that took us more than two years to prove. So, let this be said: the gauntlet has been thrown down, but the faculty have answered, and answered, with vigor.


MIT hallway. Will is scribbling his answer to the second problem on the blackboard as Lambeau and Tom, his assistant, surprise him.

WILL: Sorry.

LAMBEAU: What're you doing?

WILL: Sorry.

LAMBEAU: That's peoples' work, you can't graffiti here. Don't you walk away from me!

WILL: Hey, fuck you!

LAMBEAU: Oh, you're a clever one. What's your name?

Will escapes. Lambeau looks at the blackboard. Oh my God ... .

TOM: Looks Right.


In Jail Interrogation Room (Will got into trouble after beating somebody up)

COURT OFFICER: Have a seat.

WILL: Thank you. Nice talking to ya' ... ... What the fuck do you want?

LAMBEAU: I'm Gerald Lambeau, the professor you told to fuck himself.

WILL: Well, what the fuck do you want?

LAMBEAU: I've spoken to the judge. And he's agreed to release you, under my supervision.

WILL: Really?

LAMBEAU: Yeah. But under two conditions.

WILL: What're those?

LAMBEAU: The first condition is that you meet with me every week.

WILL: What for?

LAMBEAU: Well, the proof you're working on ... .can do some, more advanced combinatorial mathematics. Finite math.

WILL: Sounds like a real hoot.

LAMBEAU: And the second condition is that ... that you see a therapist. And I'm responsible to submit reports on this ... ... ye ... and if you fail to meet with any of those conditions you will have to serve time.

WILL: All right, I'll do the math, but I'm not gunna meet with any fuckin' therapist.

LAMBEAU: It's better than spending that time in jail, isn't it?


Lambeau and Will are doing math together.

Will get up and we see what is happening on the blackboard that Will and Lambeau are staring at. Will completes the formula. Then they take turns canceling common factors in the fraction to arrive at the following simple formula.


In a hallway. Lambeau is waiting for Will.

LAMBEAU: A difficult theorem can like a ... symphony. It's very erotic.




Bunker Hill Community College classroom. This is where Lambeau teaches psychology.

LAMBEAU: Hello, Sean...

SEAN: Hey, Gerry. Um ... .Ladies and Gentlemen, we're in the presence of greatness. Professor Gerald Lambeau. Fields Medal Winner for Combinatory Mathematics.


SEAN: Anyone know what the Fields Medal is? It's a really big deal. It's like the Nobel Prize for math, except they only give it out once every four years. It's a great thing. It's an amazing honor. Okay, everybody, that's it for today. Thanks and ... .we'll see you Monday? We'll be talking about Freud, and why he did enough cocaine to kill a small horse. Thank you. How are you?


Back at the restaurant

SEAN: I've got a full schedule.

LAMBEAU: Sean, Sean.

SEAN: And I'm very busy with a full schedule.

LAMBEAU: This--this boy is incredible. I've never seen anything like him.

SEAN: What makes him so incredible, Gerry?

LAMBEAU: Ever heard of Ramanujan?

SEAN: Yeah, I ... no.

LAMBEAU: It's a man.

SEAN: hmm.

LAMBEAU: Lived over a hundred years ago. He was Indian.

LAMBEAU and SEAN: Dots not feathers.

SEAN: Yeah.

LAMBEAU: And he lived in this tiny hut somewhere in India. He had no formal education. He had no access to any scientific work, but he came across this old math text. And from this simple text, he was able to extrapolate theories that had baffled mathematicians for years.

SEAN: Yeah ... continued fractions. He wrote it with a ... a ... .

LAMBEAU: Well he mailed it to Hardy at...

SEAN: Yeah.

LAMBEAU: Cambridge.

SEAN: Yeah.

LAMBEAU: And Hardy immediately recognized the brilliance of his work.

SEAN: Hmm.

LAMBEAU: And brought him over to England. And then they worked together for years creating some of the most exciting math theory ever done. Now this Ramanujan, his genius was unparalleled, Sean. Now this boy is just like that.


Lambeau's Office. Will does what nobody else can do. It becomes clear that he is far more talented than any of the professors at MIT.

LAMBEAU: We know your theory, Alexander, but the boy's found a simple geometrical picture.

OTHER PROFESSOR: A tree structure won't work.

LAMBEAU: Look, now, he's joining the two vertices.

OTHER PROFESSOR: But I can do the sum.

LAMBEAU: Well, it's how you group the terms, Alexander.

OTHER PROFESSOR: But, Gerry, if we do the whole thing this way then--

WILL: Hey, look, look. I wrote it down. It's--it's simpler this way.

TOM: Sometimes people get lucky. You're a brilliant man.


A pub.

LAMBEAU: Have you talked to him at all about his future?

SEAN: No ... we haven't gotten into that yet. We're still banging away at the past.

LAMBEAU: Well, maybe you should. My phone's been ringing off the hook with job offers.

SEAN: What kind?

LAMBEAU: Well, cutting edge mathematics. Think tanks. The kind of place where a mind like Will's is given free reign.

SEAN: That's great that there are offers, but I--I don't really think he's ready for that.

LAMBEAU: I'm not sure you understand, Sean. .

SEAN: Well, what don't I understand?

TIMMY: Here you go guys.

SEAN: Thanks, Tim.

LAMBEAU: Yeah, thank you.

TIMMY: So, you don't get sticky fingers.

LAMBEAU: Tim, can you help us? We're trying to settle a bet.

TIMMY: Uh-oh.

LAMBEAU: You ever heard of Jonas Salk?

TIMMY: Sure. Cured polio.

LAMBEAU: And you've heard of Albert Einstein?

TIMMY: hmph. . Hey ...

LAMBEAU: How about, Gerald Lambeau? Ever heard of him?


LAMBEAU: Thank you, Tim.

TIMMY: So, who won the bet?

LAMBEAU: I did. This isn't about me Sean. I'm nothing compared to this young man.


LAMBEAU: In 1905 there were hundreds of professors renowned for their study of the universe, but it was a ... it was a 26 year old Swiss patent clerk, doing physics in his spare time who changed the world. Can you imagine if Einstein would have given that up just to get drunk with his buddies and bombed (?) every night. We all would have lost something. Tim would never have heard of him.

SEAN: Pretty dramatic, Gerry.

LAMBEAU: No it isn't, Sean . This boy has that gift. He just hasn't got the direction, but ... we can give that to him.

SEAN: Hey, Gerry. In the 1960's there was a young man graduated from the University of Michigan. Did some brilliant work in mathematics. Specifically bounded harmonic functions. Then he went on to Berkeley, was assistant professor, showed amazing potential, then he moved to Montana and he blew the competition away.

LAMBEAU: Yeah, so who was he?

SEAN: Ted Kaczynski.

LAMBEAU: Never heard of him.

SEAN: Hey, Timmy!


SEAN: Who's Ted Kaczynski?

TIMMY: Unabomber.

LAMBEAU: That's exactly what I'm talking about. We gotta' give this kid direction. He can contribute to the world and we can help him do that.

SEAN: Direction's one thing. Manipulation's another. All right?


SEAN: We hafta' let him find his own--

LAMBEAU: Sean ! I'm not sitting at home every night twisting my mustache and hatching a ... hatching a plan to ruin this boy's life. I was doing advanced mathematics when I was 18, and it still took me over 20 years to do something worthy of a Fields medal.

SEAN: Well, maybe he doesn't want what you want. There's more to life than a fuckin' Fields medal.


Lambeau's Office. Lambeau is commenting on one of Will's proofs.

LAMBEAU: Well, let's see ... Good ... This is correct. I see you used McLauren here.

WILL: Yeah, I dunno what they call it, ...

LAMBEAU: This can't be right. It would be very embarrassing. Did you ever consider--

WILL: I'm pretty sure it's right. Hey look, can we do this at Sean's office from now on, because I gotta' knock off work to come here and the commute is killin' me.

LAMBEAU: Yeah sure. But did you think of the possibility--

WILL: It's right. It's right. Just take it home with you.


WILL: Look. Maybe I don't want to spend the rest of my fuckin' life sittin' around explaining shit to people.

LAMBEAU: I think you could show me some appreciation.

WILL: A little appreciation? Do you know how easy this is for me? Do you have any fuckin' idea how easy this is? This is a fuckin' joke. And I'm sorry you can't do this. I really am because I wouldn't have to fuckin' sit here and watch you fumble around and fuck it up.

LAMBEAU: Then you'd have more time to sit around and get drunk instead, wouldn't you?

WILL: You're right. This is probably a total waste of my time.

Will burns the proof. Lambeau tries to save it.

LAMBEAU: You're right, Will. I can't do this proof. But you can, and when it comes to that it's only about ... it's just a handful of people in the world who can tell the difference between you and me. But I'm one of them.

WILL: Sorry.

LAMBEAU: Yeah, so am I. Most days I wish I never met you. Because then I could sleep at night, and I wouldn't have to walk around with the knowledge that there's someone like you out there ... . And I didn't have to watch you throw it all away ...


Sean's Office

SEAN: You think I'm a failure. I know who I am, and I'm proud of what I do. It was a conscious choice. I didn't fuck up. And you and your cronies think I'm sort of pity case. You and your kiss ass chorus, following you around going, "The Fields Medal, The Fields Medal." Why are you still so fuckin' afraid of failure?

LAMBEAU: It's about my medal, is it? Oh God, I can go home and get it for you. You can have it.

SEAN: You please don't, you know--

LAMBEAU: I mean that--

SEAN: You know what, Gerry? Shove the medal up your fuckin' ass, all right? Cus' I don't give a shit about your medal because I knew you before you were a mathematical god. When you were pimple-faced and homesick, and didn't know what side of the bed to piss on.

LAMBEAU: Yeah, you were smarter than me then and you're smarter than me now. So, don't blame me for how your life turned out it's not my fault.

SEAN: I don't blame you! It's not about you, you mathematical dick! It's about the boy! He's a good kid, and I won't see you fuck him up like you're trying to fuck up me right now. I won't see you make him feel like a failure too.


Sean's Office

SEAN: Yes, sir, this is the one. This is my ticket to paradise.

LAMBEAU: Sean , you know what the odds are against winning the lottery?

SEAN: What? Four to One?

LAMBEAU: About 7,000,000 to one.

SEAN: I still have a shot.

LAMBEAU: Yes. It's about as big a chance as you being hit by lightening right here on the stairs ...

Some notes:

1. The official math consultant for the movie was Professor Patrick O'Donnell, a physicist from the University of Toronto. His homepage is O'Donnell makes a short appearance as a drunk in a bar (21:50). In the credits Patrick O'Donnell is also listed as the person playing Marty, the assistant custodian. However, this Patrick O'Donnell is really a different person.

2. Daniel J. Kleitman is professor of Mathematics at the Massachusetts Institute of Technology. In Kleitman, Daniel J. My Career in the Movies, Sidebar to Mark Saul's review of Good Will Hunting, Notices of the American Mathematical Society 45 (4), 502 he is telling about his role as math adviser for the initial script of the movie and his appearance in the background of one of the scenes of the movie (the man with the blue shirt). In fact, he walks by the window twice in this scene. First from right to left, then from left to right (43:20).