White House audience members laughed when Lin-Manuel Miranda told them he was writing "a concept album about the life of somebody who I think embodies hip-hop: Treasury Secretary Alexander Hamilton." But Miranda had the last laugh.

In a before-they-were-stars way, it's moving to watch the 2009 video of Miranda spitting "Alexander Hamilton" at a poetry slam, with Barack and Michelle Obama snapping their fingers and joining a standing ovation. Seven years later, the former FLOTUS would call the resulting musical "the best piece of art in any form that I have ever seen in my life."

But back then, Miranda hadn't figured out "Hamilton" would be a show, much less the biggest in decades. He thought it would be a record. It was the seed of a phenomenon that would sweep the 2016 Tony Awards, earn a Pulitzer Prize, prompt fans to cough up the equivalent of a house payment for tickets and spawn four satellite productions, including a tour coming to Minneapolis this week. All of that would have been unimaginable to the chuckling audience.

Even so, you can see the roots of everything in that first song, which opens the show. It lays down the foundation for the musical, borrowing details from Ron Chernow's 2004 bestselling "Alexander Hamilton" bio ("Started workin' — clerkin' for his late mother's landlord/Tradin' sugar cane and rum and all the things he can't afford"), which voracious pop-culture consumer Miranda read while vacationing in Mexico in 2008, as well as concepts from "Sweeney Todd" and the Harry Potter books.

Throughout "Hamilton," Miranda lifts ideas and words liberally, like a rapper employing samples. He documents it all in his annotated "Hamilton, the Revolution" book, which cites as influences not just hip-hop (Hamilton never sounds more like a rap MC than when he brags, "With every word I drop knowledge" in his big number, "My Shot") but also musical theater, classic TV, movies and, inevitably, Beyoncé.

Consider this knowledge — from "Hamilton, the Revolution" — dropped on you:

Beatles: Orchestrator Alex Lacamoire says King George's "You'll Be Back" reminded him of another British invasion. So he incorporated bits of three songs from "Sgt. Pepper's Lonely Hearts Club Band": "Getting Better," "Penny Lane" and "Being for the Benefit of Mr. Kite!" Paul McCartney, who took a backstage photo with Lacamoire and Miranda, seems to have approved.

Brown, Jason Robert: Miranda realized he accidentally plagiarized a notion from a song in Brown's musical "The Last Five Years" (produced last winter at Artistry in Bloomington). He asked the composer for permission to repurpose it and Brown OK'd the idea of a big ballad about infidelity that hinges on the punny use of "no" and "know," "Say No to This."

"Caroline, or Change": Ending a show in which the title character gets murdered was always going to be a problem. Do you send a bummed-out audience to the exits or come up with a way to turn their frowns upside-down? Miranda says "Caroline" (performed at the Guthrie in 2009) showed he could get away with a finale with the title character offstage.

"Crazy in Love": Male rappers often break onto the charts by pairing with female singers, his bad-boy commentary contrasting with her melodic singing. That's what Miranda does with "Helpless," which he likens to Beyoncé and Jay-Z's "Crazy in Love." Cocky Hamilton ("We'll get a little place in Harlem and we'll figure it out") is countered by a more romantic Eliza, who seems to be quoting Brandy and Monica ("That boy is mine!").

Gilbert & Sullivan: In "Right Hand Man," George Washington refers to himself as "the very model of a modern major-general," which means that he came up with the title of a song from "The Pirates of Penzance" 100 years before G&S got around to writing it.

Jay-Z: Burr's pickup line in "The Schuyler Sisters" calls back to the Jay-Z/Pharrell collaboration "Excuse Me Miss" from "The Blueprint 2."

Lamar, Kendrick: Miranda says Thomas Jefferson's part in "Washington on Your Side" is an ode to the speedy rapper, particularly the syllable-stuffed, assonant "If Washington isn't gon' listen/To disciplined dissidents, this is the difference/This kid is out."

Laurie, Hugh: Miranda played the lead character's roomie in a psychiatric ward on the TV series "House" and he and Laurie became buds. Over dinner, Miranda says he talked about writing a kiss-off from King George to the American colonies, and the English Laurie, improvising as the king, purred, "You'll Be Back." Which became the title of the king's song.

Lambert, Hendricks and Ross: The '60s vocalese group inspired the jazzy way Thomas Jefferson raps. Miranda wanted Jefferson, born a decade before Hamilton and Aaron Burr, to sound more old-school.

"My So-Called Life": "Hamilton goes full Jordan Catalano here," writes Miranda, naming the TV series heartbreaker played by Jared Leto. He is describing the statesman telling Angelica Schuyler (sister of his eventual wife, Eliza), "You strike me as a woman who has never been satisfied." A classically terrible pickup line, it's the Founding Father equivalent of, "You know what would look great on you? Me."

The Notorious B.I.G.: The slain rapper's "Ten Crack Commandments" ("Rule Numero Uno: Never let no one know") provided the framework for "Ten Duel Commandments" ("Number One! The challenge: demand satisfaction"), which foreshadows Burr's and Hamilton's deadly duel.

"Parks and Recreation": The Amy Poehler sitcom about a do-gooder named Leslie Knope is the reference for a line in "Your Obedient Servant," when Hamilton presents Burr "an itemized list of 30 years of disagreements." Writes Miranda, "Such a Leslie Knope thing to do."

Potter, Harry: Miranda seems to be a big Potterhead, often using the books as a reference point. For instance, when Burr describes Hamilton heading from his birthplace in the Caribbean island of Nevis to New York, where "you can be a new man," Miranda compares it to the moment Potter realizes he's a wizard. When Hamilton and Burr meet onstage, Miranda likens it to Potter encountering Draco Malfoy.

"1776": Fans of an earlier hit that depicted John Adams and kicks off in the same year will find references to that revolutionary musical in "The Adams Administration." The song's final line, "Sit down," echoes the "1776" song "Sit Down, John," albeit with less gravity and more swearing.

Shakespeare, William: Angelica quotes Macbeth in "Take a Break" ("Screw your courage to the sticking place"). Renee Elise Goldsberry, the original Angelica, said speaking Shakespeare's iambic pentameter prepared her to perform "Satisfied," the trickiest, fastest-rapping song in "Hamilton."

Sondheim, Stephen: In New York theater circles, the composer's nickname is "God." Miranda refers to his musical theater idol as "The God MC Sondheezy," à la Lil Wayne and Kanye West nicknames Weezy and Yeezy. The work of Sondheim, who unofficially consulted during the early days of "Hamilton," influenced reversing the chronology of "Satisfied" (Sondheim did that in "Merrily We Roll Along"), incorporating rap into musical theater (something Sondheim did in the '80s with "Into the Woods") and, as in "Sweeney Todd," opening with an epic song in which everyone else sings about the title character before we meet him.

"South Pacific": In "My Shot," when Burr sings, "I'm with you, but the situation is fraught/You've got to be carefully taught," it's a callback to "You've Got to Be Carefully Taught," a "South Pacific" song about racism written by Richard Rodgers and Oscar Hammerstein.

Chris Hewitt • 612-673-4367