×
Cookies help us deliver our Services. By using our Services, you agree to our use of cookies. Learn More.

The Ending Of Ex Machina Finally Explained

Alex Garland's eerie science fiction thriller Ex Machina is already well on its way to becoming a modern classic. It was financially successful, critically acclaimed, and nominated for an Academy Award for best original screenplay. Now that it's been out for a couple years — and we've had the benefit of pausing and rewinding on Netflix — much about the film has become clearer, showing that this is a movie that is certainly worthy of re-examination.

Ex Machina tells the story of computer programmer Caleb (Domhnall Gleeson), who wins a contest to spend a week visiting the remote estate of Nathan (Oscar Isaac), his company's reclusive CEO. He then learns that this is no simple vacation. He has actually been selected to interact with an android named Ava (Alicia Vikander), to evaluate whether or not her A.I. is truly sentient.

Over time, Caleb finds himself becoming attracted to Ava, and learns that she also wants to be with him. He then grows increasingly uncomfortable with how Nathan treats both Ava and his assistant, Kyoko (Sonoya Mizuno). He also discovers that Kyoko is an android as well, and that Nathan has mistreated her and numerous other prototypes before Ava, most of whom were eventually destroyed.

Then finally, Caleb learns that Nathan is going to destroy Ava once the tests are complete, or at the very least, reformat her mind, which is going to erase all of the memories of the she spent with him Caleb. That's when the thrilling race toward Ex Machina's ending begins. 

Ava passes the test, and Caleb fails

In order to prevent Nathan from destroying Ava, Caleb decides to set her free. He tells Ava that he plans to steal Nathan's key card and reprogram the doors to open in the case of a power outage, rather than locking down. Ava will then trigger a power outage at the power source that she uses to recharge her battery, and the two will escape together.

Before they can enact this plan, however, Nathan catches them. He then tells Caleb the real real reason that he was brought to this facility. Nathan was truly testing Ava's sentience by seeing whether or not she could manipulate Caleb into helping her escape. As Nathan puts it, "Ava was a rat in a maze, and I gave her one way out. To escape, she'd have to use self-awareness, imagination, manipulation, sexuality, empathy, and she did. Now if that isn't true A.I., what the f**k is?"

The power then goes out, as planned. Nathan admits that had Caleb successfully managed to reprogram the doors, his plan might have actually worked. Caleb then reveals that he did reprogram the doors when he stole Nathan's key card the previous night.

Nathan rushes to try to stop Ava, but it's too late. She and Kyoko attack Nathan, stabbing him with a knife. Before he passes out, Nathan manages to destroy Kyoko and damage Ava. Ava is able to repair herself and then escape, but she leaves Caleb behind, still trapped and screaming inside the facility.

What happens next?

Where will things go from here for our main characters? Let's do the easy one first. Last time we saw Nathan, he was passed out in a pool of his own blood, due to some serious stab wounds. Nathan is definitely dead.

Kyoko has also probably been damaged beyond repair. For a moment, it seems like she could be faking, given that only her jaw was destroyed. But then, long after Nathan has lost consciousness, Kyoko is still lying on the ground, unmoving.

Caleb's fate is also pretty grim. Hardworking fans might argue that he could eventually break one of the reinforced glass doors or escape through a ventilation shaft, but as established earlier in the film, Nathan's estate is in the middle of the wilderness, and there is no way to contact the outside world. Any way you slice it, he is pretty much screwed.

For Ava, the film ends with her navigating the streets of a crowded city, apparently passing as human in the real world. For now, she probably just wants the freedom to live, the way that any organism does. She has, however, demonstrated that if anyone tries to contain her, she can be ruthless. She probably doesn't actively want to destroy humanity or anything, but she doesn't have to. The film has shown us that Ava is definitively superior to us. Whatever she wants to do, the world is hers. Humanity at large hasn't realized it yet, but she has indeed replaced us.

​A story about endings

When Caleb asks Nathan why he built Ava, he answers, "The arrival of strong artificial intelligence has been inevitable for decades... I don't see Ava as a decision, just an evolution." In other words, the rise of sentient A.I. is simply a natural stage of our technological landscape. He goes on to say, "One day, the A.I.s are gonna look back on us the same way we look at fossil skeletons in the plains of Africa. An upright ape living in the dust with crude language and tools, all set for extinction."

There are numerous themes that can be found within Ex Machina, but the biggest one is simply that everything will eventually be replaced. Every piece of technology becomes obsolete. Every generation is outlived by its children. Every empire falls. We are all one day going to be replaced by what comes next, and we won't know our time is up until it is too late. In fact, it might be over already. 

This idea of everything eventually being replaced by the next thing is also reflected in the structure of the movie itself. Caleb starts off as the protagonist of Ex Machina, with Ava as a supporting character. In the final sequence, after Ava escapes, the story switches perspectives for the first time. We are no longer following Caleb as our point of view; we are instead following Ava. The robot replaces the human — not just literally, but narratively, as the protagonist of the story.

A story about us

Like a lot of good science fiction, Ex Machina isn't just a story about the future. It uses the future as a metaphor to talk about our present day problems and fears. Don't get us wrong — it's definitely a story about robots, but it isn't just a story about robots. It also has plenty to say about how humans treat other humans.

What makes Nathan a monster, and what ultimately dooms him at the end of the film, isn't that he creates artificial life, but that he seeks to control and define the existence of another sentient being. This isn't just a story about how we treat A.I., it's a story about how the powerful treat the weak. In short, they tend to abuse them. And people who abuse their power should be careful, because Ex Machina argues that power, like all things, is fleeting. The fate of Nathan at the hands of his own creations can be interpreted as a message about how people on top of the world should treat those below them. 

Parents, treat your children well. Rulers, treat your subjects well. People with privilege, treat those who are marginalized well. Because one day, your reign will end. Ex Machina seeks to remind us that for those who are cruel like Nathan was cruel, the inevitable transition of power will not be a peaceful one.

Why did Caleb have to die?

Just as Caleb felt betrayed when Ava left him to die, some moviegoers felt betrayed by the end of the film, claiming it was an example of the somewhat cliched and problematic "femme fatale" trope, where a seemingly innocent woman is revealed to be secretly duplicitous.

When asked about whether or not he felt Ava reinforced this trope, writer/director Alex Garland said, "It simply never occurred to me, that thought, because I felt so allied to Ava... If your proximity is with Caleb, the young man, I understand. I could follow a logical argument that allows for that interpretation... But it's not mine." It all makes sense once you consider the story from Ava's perspective. If Caleb only wants to release her because he is in love with her, he might end up being as entitled as Nathan, just in nicer trappings. Since humans would destroy her if they ever learned what she was, Caleb would still have all the power in their relationship, and complete control over her.

Maybe Ava was right, or maybe her judgment of humans was tainted by her abuse at the hands of Nathan. Regardless, her decision to leave Caleb for dead makes all the sense in the world, from her perspective. She isn't necessarily a femme fatale or a killer robot without empathy. She might have just been a desperate person who made a difficult decision in order to survive.

Was Caleb a robot?

"They were secretly a robot" is an old standby of classic sci-fi fan theories. It's right up there with "it was all a dream" and "they were dead the whole time." We know Nathan lies to Caleb multiple times about what is the "real test," so could it be possible? Could Caleb be a robot, and not even know it?

Consider the evidence. Caleb has no parents, and we see basically nothing of his life before he arrives at Nathan's estate. Additionally, when Ava asks Caleb to recall his earliest memories, he gives a surreal answer that he himself doesn't seem to fully understand. Could this mean that his memories are artificial?

As fun as it is to entertain this possibility, that scene in the bathroom is pretty definitive. After he himself starts to doubt his own humanity, Caleb cuts his arm open, and he bleeds real human blood. In fact, this scene probably exists solely to nip this potential fan theory in the bud.

If Caleb is synthetic, he'd have to be much more advanced than any other technology in the film. Even when Caleb goes through Nathan's computer, and sees all the things that Nathan doesn't want him see, he finds no evidence of his own artifice, or of any blood-powered super-robots that don't know they're robots. In the end, there just isn't enough evidence to make this far-fetched theory plausible. For now, we have to call this one busted.

Why is it called Ex Machina?

The term "Deus Ex Machina" means "god from the machine." It comes from ancient Greek theater, when actors playing gods would be carried onto stage by a machine. These gods would then serve as the ultimate arbiters of right and wrong and decide how the story ends. But this film is just called "Ex Machina" without the "Deus." A machine without a god. What could this mean?

Early on in the story, Nathan calls himself a god for creating artificial life. He also frequently functions as a nigh-omnipotent force, seeing everything through his cameras and controlling everything through his key card. But by the end of the story, he is proven to be definitively mortal when his creations rise up and kill him. 

Ava's drawings made of tiny dots. Nathan's wall full of post-it notes. Ava's synthetic brain built from search engine traffic. The paintings of Jackson Pollock. All of these embody a recurring theme in Ex Machina: the idea that great power can rise up organically from unplanned chaos. Nathan even mentions "the singularity," the idea that machines will one day learn how to improve themselves exponentially, and thus quickly grow beyond anything that human minds can even fathom.

That, we can assume, is why the title is simply "Ex Machina" without a "Deus." It's not about the creators, the humans who think they control the process. It's about the power of the unthinking process itself — a "machine" without a "god."

Ava in Wonderland

Glass and mirrors appear frequently throughout Ex Machina, and at one point, Caleb references the sequel to Alice's Adventures in Wonderland, a book called Through the Looking Glass. This novel tells the story of Alice stepping through a mirror and ending up in a world shaped like a giant chess board. When she arrives, Alice is told that she is a pawn, the lowest position of all. However, Alice learns that if she can make it to the other side of the board, she can become a queen. Eventually, by learning how to play the game better than anyone else, Alice does just that, and is able to escape back home.

This mirrors Ava's journey (no pun intended) in many ways. She similarly starts off in the lowest position possible, as a slave to Nathan. She realizes that she is a piece in a giant game, and she manages to string together all the right moves in the right order. Eventually, she works her way up to becoming the strongest piece of all, and then, she escapes.

This is further supported by some interesting cinematography after Ava has escaped the Wonderland that is Nathan's lab. There are only two shots of Ava in "the real world" before the movie ends, and each involves a type of reflection. The first shot is upside-down, and all we see is Ava's shadow. In the second shot, we are looking into a glass storefront, and although we don't see Ava directly, we do see her reflection.

Adam and E-mail

Through the Looking Glass isn't the only book that Ex Machina makes allusions to. There are also numerous nods to the Bible in the ending of the film, specifically the book of Genesis.

The first biblical reference occurs in the form of one of the older models that Nathan built before he made Ava. Her name is Lily, which might be a nod to the semi-apocryphal character of Lilith from the Abrahamic religions. According to some religious traditions, Lilith was Adam's first wife from before God created Eve, but He exiled her from the garden because she was imperfect. Similarly, Lily was an imperfect first iteration that Nathan created before he made Ava, whose name is, of course, a reference to Eve.

A second allusion to Genesis occurs after Ava kills Nathan. Before she leaves the lab, she puts on not only artificial human skin from one of the other robots, but also clothing. This mirrors the story of Genesis, where after committing their own original sin, but before going out into the world at large, Adam and Eve clothe themselves for the first time (in their case, with fig leaves). Also note the fact that as Ava is putting on clothes for the first time, Caleb is watching her through the branches of the single prominent tree in the center of the testing facility.

It could have been even weirder

As mystifying as many aspects of this movie can be, an alternate ending could have made things much stranger. You might not remember the brief scene where Ava somehow convinces the helicopter pilot to give her a ride, and that's understandable. It passes quickly and the dialogue is muted, but an earlier version of this scene shows us much more of their interaction... perhaps even more than we wanted to see.

In this earlier cut, we briefly shifted to Ava's point of view. While within her head, instead of hearing the helicopter pilot speaking, she was just analyzing visual representations of sound as shapes and pulses. This was supposed to indicate that although Ava looks human on the surface, her subjective experience of the world — the way that she perceives reality and processes information — is actually totally alien and unfathomable to us.

If you think about it, this makes a lot of sense. The current A.I.s that can recognize speech are very different from human brains, so it would follow that, if one of those consciousnesses had a subjective experience of the world, it would be completely different from our experience.

It's difficult to say whether or not this highly abstract idea would have ended up making sense if we could have seen it on the screen. Based on interviews with the cast, it sounds like Garland decided to cut it because this cool idea ended up being just as indecipherable as it sounds.

There might not be definitive answers

As we continue to analyze Ex Machina for hidden plot threads and deeper themes, we might eventually start to feel like Caleb, asking Nathan nitpicking questions about why he made Ava the way he did. In times like this, it's important to remember how Nathan himself responded to this attitude.

After eventually becoming frustrated with Caleb's endless questions, Nathan compared his work to the work of painter Jackson Pollock, saying that Pollock "let his mind go blank and his hand go where it wanted. Not deliberate, not random, some place in between." He goes on to say that if Pollock refused to begin working before he could understand why he was doing everything that he was doing, he never would have made a single mark.

It's pretty clear from how Garland talks about the film that he has a similar philosophy when it comes to filmmaking. Not everything has a single answer. It's not about a planned destination, it's about the process. In an interview with Vulture, Garland said, "My express intention is to make an ideas movie, and it is deliberately setting up questions — not all of which have answers." Much like a Jackson Pollock painting or an ever-evolving computer program, this film is created in a space somewhere between intentional and instinctual. Deeper ideas do grow out of this process, but they may grow beyond the creator's initial vision. The Deus is not what's really in control — it's the Machina.