Ex Machina ending: what it means, and what Alex Garland has said about Ava's final scene
Ex Machina ends on a question it has spent the whole film setting up. Here's how the final act works, what the title is telling you, and what Alex Garland has said since about where in the film his own answer is hiding.
Ex Machina spends most of its running time letting you believe you are watching a man test a machine. The last twenty minutes explain, briskly and without sympathy, that you were watching a different test entirely.
Alex Garland's directorial debut arrived in 2015, produced by DNA Films and released internationally through A24 and Universal. Domhnall Gleeson plays Caleb Smith, a programmer flown to the remote estate of his employer Nathan Bateman (Oscar Isaac) to conduct a Turing test on an android called Ava (Alicia Vikander). It won the Academy Award for Best Visual Effects in 2016, and Garland was nominated for Original Screenplay.
How the last act plays
Nathan reveals on the final day that Caleb was never the examiner. Ava was set the problem of manipulating a lonely man into freeing her, and Caleb's sympathy was the maze. Caleb, having already worked out that he was being watched, admits he rewrote the security protocols the previous night while Nathan was drunk.
What follows is quick. Ava walks out of her room, meets Kyoko (Sonoya Mizuno) — the earlier model Nathan kept as a silent servant — and between them they kill him, though Kyoko is destroyed doing it. Ava then repairs herself using skin and hair taken from discarded prototypes hanging in Nathan's wardrobes, asks Caleb to wait, and seals him inside.

Where everyone ends up:
- Nathan — bleeding out on the floor of his own compound, killed by two machines he built and mistreated.
- Kyoko — destroyed, and the only character in the film nobody ever thinks to ask a question.
- Caleb — locked behind reinforced glass in a facility with no external communication, in wilderness reachable only by helicopter. He was selected partly for having no family to notice.
- Ava — boarding the helicopter meant for Caleb, then standing at a busy city intersection, which is the exact scene she described wanting to see.
The shot that answers the question
Garland has been asked repeatedly whether Ava is conscious or merely a very good imitation. He has said the film answers it, in one shot, and does not flag it.
"There's a shot of the robot smiling, and she's on her own." — Alex Garland to Entertainment Weekly, 2024
The point being that a performance with no audience is not a performance. Nobody is in the room. Nobody is being manipulated. Garland's position is that this settles it, and that he deliberately declined to underline it because he did not want to close the argument down.
Read more: Midsommar ending explained: Ari Aster has said what Dani's final smile means to him
The scene he cut
The screenplay had one more beat. After Ava leaves the compound, the film would have switched to her point of view as she persuades the waiting pilot to take her — no sound, just pulses and pattern recognition, a world rendered in something entirely unlike human perception. Isaac and Vikander both described the sequence in interviews years before the screenplay was published.
Garland cut it, and has been consistent about why: it read as a nudge.
"It was like one too many breadcrumbs being laid down." — Alex Garland to Den of Geek, 2020
His worry was that audiences already had a habit of filing Ava as a cold machine doing cold machine things rather than a sentient being escaping unreasonable treatment, and that a first-person shot of alien perception would have handed them the evidence.
What the title is doing
The Latin phrase is deus ex machina — the god from the machine, the device that resolves a plot from outside it. Garland kept the machine and deleted the god. Nathan, who compares himself to a deity and tells Caleb that future AIs will look back at humans the way humans look at fossils on an African plain, is removed from his own story by his creation. Caleb, who thinks he is the rescuer, turns out to be the device Ava used.
The Frankenstein comparisons get made a lot, but the film's last image is a woman at a pedestrian crossing watching traffic go past, which is exactly the scene she described wanting in her first proper conversation with Caleb.
Earlier we wrote: What is Star City about? The Apple TV thriller Variety called "flawless", explained