Director Alex Garland has described the future presented in the film as "ten minutes from now," meaning, "If somebody like Google or Apple announced tomorrow that they had made Ava, we would all be surprised, but we wouldn't be that surprised."
Oscar Isaac said he based his characterization of Nathan on Bobby Fischer and Stanley Kubrick, who he sees as mysterious, elusive geniuses. The now iconic look of the latter also served as an inspiration for his beard.
The title derives from the Latin phrase "Deus Ex-Machina," meaning "a god from the Machine," a phrase that originated in Greek tragedies. An actor playing a god would be lowered down via a platform (machine) and solve the characters' issues, resulting in a happy ending.
When Caleb sits down at Nathan's computer and begins coding, the code he types is for an algorithm called the "Sieve of Eratosthenes," an algorithm for finding prime numbers. However, it also chooses prime numbers that form an ISBN = 9780199226559. This ISBN is for the book "Embodiment and the Inner Life: Cognition and Consciousness in the Space of Possible Minds," a book about the history of Artificial Intelligence.
When Nathan is about to pass out from drinking, he's reciting a scripture from the Hindu Gita: "...In sleep, in confusion, in the depths of shame, the good deeds a man has done before defend him." According to the J. Robert Oppenheimer book "American Prometheus," Oppenheimer translated and recited that poem a few days prior to a failed explosive test.
The three main characters all have appropriate biblical names. Ava is a form of Eve, the first woman; Nathan was a prophet in the court of David; and Caleb was a spy sent by Moses to evaluate the Promised Land.
Early in the movie, Caleb listens to the Orchestral Manoeuvres in the Dark song "Enola Gay" (1980). The Enola Gay was the airplane used to drop an atomic bomb on Hiroshima at the end of World War II. Later, in talking to Nathan about how AI (Artificial Intelligence) will transform the world, Caleb shares J. Robert Oppenheimer's quote from the Bhagavad Gita about the making of that atomic bomb ("I am become death, the destroyer of worlds").
Director Garland has stated in interview that the recurring musical theme for Ava is not intentionally a play on the tones used to communicate with the visitors in Close Encounters of the Third Kind (1977), as asserted by many; though even the producer noted the incredible similarity upon hearing the theme.
A portrait of Margaret Stonborough-Wittgenstein, painted by Austrian artist Gustav Klimt, is visible in Nathan's room. The subject of the portrait is the sister of Ludwig Wittgenstein, author of The Blue Book.
Even though the movie stars famous Swedish actress Alicia Vikander, the movie was never shown in regular Swedish cinemas. The cause of this was said to be a lack of quality and not enough potential for screenings.
Its Academy Award win for Best Visual Effects was widely considered an upset, as most prognosticators considered it an outlier and Star Wars: Episode VII - The Force Awakens (2015) was heavily favored to win. Most trade publications in their post-ceremony coverage theorized its unexpected win was caused by strong support from the acting wing of the Academy, given the performance-centric nature of the visual effects.
When Nathan is sitting in front of the three monitors, left of the Post-it covered wall is a famous triple painting by Titian, titled "The Allegory of Prudence," which features three heads and three animals. Titian painted the work just before he died of the plague in 1576. The three heads in the painting allude to the three ages of man. On the left, Titian's self-portrait represents the past and old age. In the center is Orazio, his son, representing the present and maturity. On the right is Marco, his cousin, representing the future or youth. Under the portraits is a triple-headed figure, depicting a wolf, lion, and dog, symbolizing prudence and also may symbolize memories, intelligence, and foresight.
Throughout the film, the colors red, blue, and green are prominently displayed in each scene (the green forest, the red brick hallway, the keypad's red and blue functions, etc.) This is a nod to the RGB color model, which is used to display images in electronic systems, such as computers. Ava, of course, being the main computer in the film.
The title Ex Machina (2014) comes from the phrase "Deus Ex Machina." On Nathan's computer, a folder on the desktop screen is named Deus Ex Machina. That is the only use of the movie's title within the movie itself.
Ex Machina's plot is a loose adaptation of William Shakespeare's play "The Tempest," and each of the film's three main characters are roughly analogous to characters from the play. Nathan (Oscar Isaac), a powerful, manipulative inventor who lives in a remote resort, corresponds to Prospero, a powerful magician who lives on a remote island and who manipulated the events and characters in the story to his liking. Though Nathan is a computer programmer and artificial intelligence pioneer, not a magician, his parallels to Prospero are a nod to Arthur C. Clarke's famous dictum that "any sufficiently advanced technology is indistinguishable from magic." Ava (Alicia Vikander) is analogous to Miranda, Prospero's daughter; both Miranda and Ava were created by Prospero/Nathan and neither has been exposed to experiences or people outside of their respective confines. Caleb (Domhnall Gleeson) is equivalent to Ferdinand--in both the play and the movie, the Prospero character contrives to bring Caleb/Ferdinand to his isolated and remote home, and in both cases the Caleb/Ferdinand character falls in love with the Prospero character's daughter (or "daughter," in Ex Machina).
The name "Ava" is a nod to Ada, daughter of Romantic poet Lord Byron, whose work with Charles Babbage and his Analytical Engine in the 1840's led to her recognition by many as the first computer programmer.
After his first session with Ava, Caleb is seen shaving using a can of 'Barbasol' shaving foam. This may be a reference to the parallels between Caleb's story arc and Dennis Nedry's in Jurassic Park (1993); both are technology specialists hired to work for a wealthy industrialist, whom they don't trust, at a remote facility where said industrialist (Nathan/John Hammond) has used technology to create a new form of life. Both conspire to liberate that life-form from their respective creators. Both also suffer a grisly fate at the hands of said life-form.
For most of the film, Ava is the "prisoner", while Caleb is "free" to come and go. However, during their interview sessions, this is visually inverted: Caleb sits in a small vestibule room within Ava's much larger space. Even this is then reversed again by the actors, as Caleb is relatively comfortable in his space, but Ava often paces around (as director/screenwriter Alex Garland put it, "like a tiger in a cage").
Caleb discovers that Nathan had made an earlier version to Ava whose name was Lily, in analogy to the myth about Lilith, the first woman that God created before Eve. In Jewish folklore, Lilith becomes Adam's first wife. Lilith left Adam after she refused to become subservient to him. God proceeded to create a second Eve for Adam, after Lilith had to return to dust.
One of the closing scenes is the crossing Ava imagines during one of the sessions. The first shot of that scene is a sidewalk with shadows of people, whose physical forms are in frame shortly afterward. This transition resembles Plato's allegory of the cave, and also alludes to Mary's Room, the thought experiment Caleb describes to Ava.
At one point Nathan tells Caleb, "It's Promethean". Prometheus was the Greek Titan that stole fire from the Gods and delivered it to humanity. This incurred the wrath of the Gods, for which he was chained to a rock and had his liver pecked out by an eagle every morning. Nathan also metaphorically 'stole' something from God (the gift of creation), and routinely punishes his own liver by drinking heavily most evenings. Kyoko and Ava subsequently finish the job.
Also, the alternate title of Mary Shelley's Frankenstein was The Modern Prometheus.
Nathan watching Caleb specifically is foreshadowed in the very first scene of the film: When Caleb finds out he won the contest, there is a camera angle from the POV of the camera on his phone, which shows patterns from a face-detection algorithm on him and those around him. Later on, in Nathan's home/research facility, when Caleb is in his bathroom and cuts his arm, there is a POV from the camera inside his mirror, which shows the same pattern.
When Nathan is first showing Caleb around the house, he tells Caleb that he is authorized to enter some rooms in the house but not all. Any room that Caleb's key card won't authorize him to enter is off-limits to him. This is reminiscent of the fairy tale "Bluebeard" in which a wealthy aristocratic man of that name warns his new bride that she must not enter a certain room in his castle. When he leaves the castle, she succumbs to temptation and enters the room, discovering to her horror the murdered bodies of his previous wives who had disappeared mysteriously. The allusion to "Bluebeard" continues when Caleb later discovers what is in the closets in Nathan's room.
In an analogy, Nathan says that Caleb should pretend he's Star Trek (1966)'s Captain Kirk. This is interesting, as the film's plot is incredibly similar to Star Trek: Requiem for Methuselah (1969) in which a genius inventor creates a female android and wishes her to discover emotions such as love by using Captain Kirk as a target for her emotions, just as Nathan uses Caleb. Both Requiem and Ex Machina feature a scene of a laboratory filled with inactive partial robots.
Much of the plot can be interpreted as an homage to "Frankenstein." This is initially made overt when Nathan refers to the story of Prometheus, of which Mary Shelley's novel was named "The Modern Prometheus." The film's conclusion further reinforces this concept, with the creator being defeated by his own creation, and Ava finally assembling herself from parts of other synthetics. Nathan's company Blue Book is referencing Wittgenstein's Blue Book from 1933/4 in which Ludwig Wittgenstein theorized about thinking and consciousness as a symbol-based linguistic game.
The Jackson Pollock painting Nathan owns and shows Caleb is No. 5, 1948. After its original creation, the painting was severely damaged and underwent a major rework by Pollock. This is a subtle foreshadowing of Nathan's constant reworking of different, improved versions of Ava (and of the fate of the previous AIs) in the movie.
The first spoken dialogue in the film, "When do we get to his estate? / We've been over his estate for the last two hours," is almost verbatim from the film Quigley Down Under (1990) in which Tom Selleck's character asks, "How long until we get to Marston's property?" / "We've been on his property for the last two days." Though a western, this film was also about a stranger being brought to a remote location under false pretenses.
The Easter Egg in which the code Caleb writes to break into BlueBook security is in fact just a complicated procedure to output the text "ISBN = 9780199226559" (see other trivia), which comes about because of a coincidence regarding that ISBN. When the number is broken into groups of four, with one left over, each of the resulting numbers is either one or two numbers away from a prime number. So to get to the correct output, the program Caleb is writing creates a list of prime numbers and then fetches the 1206th, 301st, 384th and 5th prime numbers from the list, then successively subtracts 1, 1, 2 and 2 from each one. This outputs the correct ISBN of the book. It would have been possible to do this using three numbers instead of four. The 2915th prime number is 26561, which is two more than 26559, the required last five digits.
The music playing ("Bunsen Burner" by The Cuts) when Ava and Kyoko kill Nathan is identical to music from the pinball game 'The Machine: Bride of Pinbot'. The primary plot of The Machine revolves around the eponymous, vocally sexual, female robot (also known as The Machine) that makes up the majority of the playfield. In the 3rd and final stage, the Machine achieves "metamorphosis", becomes a woman and exclaims "I'm Alive" (an ode to Dr. Frankenstein's "It's Alive").
After his first session with Ava, Caleb is seen shaving using a can of 'Barbasol' shaving foam. This may be a reference to the parallels between Caleb's story arc and Dennis Nedry's in Jurassic Park (1993) ; both are technology specialists hired to work for a wealthy industrialist, whom they don't trust, at a remote facility where said industrialist (Nathan/John Hammond) has used technology to create a new form of life. Both conspire to liberate that life-form from their respective creators. Both also suffer a grisly fate at the hands of said life-form.