Sheldon has been writing to the reclusive scientist Dr. Wolcott (Peter MacNicol) who invites Sheldon to visit him in his completely isolated mountain cabin. The women quickly ask Leonard, Raj and Howard to tag along with him, making this his bachelor party, despite Sheldon's assertions that it shouldn't be called such. Wolcott has a brilliant mind but his behavior is very strange to the guys. He tells Sheldon he cut off all contact with others to focus on science. Though Sheldon enjoys the science, he decides that he doesn't want to live like Wolcott because of his friends and Amy. The guys leave to avoid Wolcott, whose theories about time make him doubt whether the guys were ever there. Meanwhile, Penny and Bernadette throw Amy a quilting bee for her bachelorette party, which she quickly finds boring. When Amy tells them she wants a night full of bad decisions as she earlier implied, they go to a bar where Amy drinks a few shots and passes out in twelve minutes. When she wakes up back at the apartment hungover and disappointed, the women lie and reassure her she had a wild time, involving her drunkenly riverdancing.
However, no legal action was required to end production of the other show: as soon as it became known that the show was unlicensed, the actors quit and the producers canceled it. Dmitriy Tankovich (who plays Leonard's counterpart, "Seva") said in an interview, "I'm upset. At first, the actors were told all legal issues were resolved. We didn't know it wasn't the case, so when the creators of The Big Bang Theory started talking about the show, I was embarrassed. I can't understand why our people first do, and then think. I consider this to be the rock bottom of my career. And I don't want to take part in a stolen show".
With Leonard, Howard, Raj, and Amy accomplishing so much on their respective projects, Sheldon is forced to admit he has nothing important upon which to work. He makes Amy leave the apartment for a few days so he can focus, but cannot come up with any ideas and calls his mother as a distraction. Leonard and Amy have fun recreating experiments from when they were growing up, boring Penny, so she eats with Sheldon as he mulls over his scientific studies. Penny helps him realize that his study of dark matter is his rebound science from string theory, which Sheldon admits he never truly disregarded, but explaining string theory to her inspires Sheldon, helping him discover a potential breakthrough in the field. Meanwhile Howard is too busy with his family to be in the band with Raj, so Raj brings in Bert. But, when Howard annoys Bernadette by writing an astronaut-themed musical while she is on bed-rest, she makes him rejoin the band. The three are poorly received at a Bar mitzvah after singing Bert's original song about the boulder from Indiana Jones .
As Sheldon and Amy start to plan their wedding, they use decision theory to limit the stress of choosing between their competing visions for the big day. After they begin to question each other’s decisions and make deliberately provocative choices, they decide to have a simple wedding at City Hall. As they wait their turn, Sheldon changes his mind and decides he wants a first dance with Amy at a real wedding.
Through the use of his vanity cards at the end of episodes, Lorre alleged that the program had been plagiarized by a show produced and aired in Belarus. Officially titled Теоретики (The Theorists), the show features "clones" of the main characters, a similar opening sequence, and what appears to be a very close Russian translation of the scripts. Lorre expressed annoyance and described his inquiry with the Warner Bros. legal department about options. The television production company and station's close relationship with the Belarus government was cited as the reason that any attempt to claim copyright infringement would be in vain because the company copying the episodes is operated by the government.
Howard dresses as Sheldon for Halloween at work, hurting Sheldon's feelings. When Howard does not apologize, Amy and Sheldon dress as Bernadette and Howard at Penny and Leonard's party, angering Bernadette. Sheldon and Bernadette later bond over their painful childhood memories. Leonard is upset that Penny does not seem to remember that their first kiss was on Halloween. Penny later admits she does remember, but does not like to think of their first kiss as an unromantic drunken hookup. She likes to imagine their first kiss was one they shared on Leonard's birthday, which pleases him.
Sheldon and Amy's wedding day arrives, with many friends and family attending, including Amy's domineering mother (Kathy Bates) and quiet father (Teller); Sheldon's mother Mary, brother George, and sister Missy, who is pregnant with her second child and separated from her husband; and Mark Hamill, who replaces Wil Wheaton as officiant as a favor to Howard who returned his lost dog. Sheldon cannot get his bow-tie to be symmetrical and conversations with Amy and his mother give him an epiphany about superasymmetry. Sheldon and Amy, along with Leonard, get caught up figuring out the math of the theory during the wedding ceremony, making Hamill take Star Wars questions to stall for time. Penny retrieves the couple, who then decide that they have the rest of their lives to make science together. Amy and Sheldon then express their vows. Amy recites a set of heartfelt vows, leaving Sheldon initially at a loss for words, before he reciprocates her loving words. They are pronounced as husband and wife.
Sheldon and Amy go on their honeymoon to New York City, starting with Legoland New York. Sheldon's insistence on scheduling their marital relations stresses Amy. He says he only does it to remind himself to be intimate with her. They compromise by letting him make a schedule without sharing it with her. Leonard and Penny discover Mr. Larry Fowler (Teller) in Sheldon and Amy's apartment hiding from his wife (Kathy Bates). Leonard notices parallels in his own marriage, which offends Penny. Leonard apologizes, and Penny convinces Mrs. Fowler to give her husband a break. When Mrs. Fowler wants to hang out with her regularly, Penny scares Larry out of the building. Raj instigates a Twitter feud with Neil deGrasse Tyson but is scared off when confronted over the phone. Neil then calls Bill Nye to scare him, too.
Raj meets with the woman his father set up for him, Anu. Her commanding personality and practical approach to marriage startle Raj but he agrees to go ahead with it. Howard criticizes him but apologizes; he just never expected Raj to give up on romance. Raj admits this to Anu so she proposes to him, and he says yes. Raj also sends out a relationship questionnaire to Leonard and Penny, which soon reveals that Penny does not think she ever wants kids, upsetting Leonard, who would like to have kids someday, and their friends selfishly badger them on the issue. After telling her father Wyatt who is also upset, Leonard tells Penny that he'll be okay with it, as he never thought he'd have her in his life. To get his mind off of it, Penny rents Leonard a Batmobile to drive in and have fun with for the day. Meanwhile, Stuart starts bringing home Denise at night, which is very uncomfortable for Howard and Bernadette. When they also try to have time to themselves, they wake up their kids.
After Neil Gaiman tweets about Stuart's comic book store, it becomes very popular, and the crowds upset Sheldon. Stuart hires an assistant manager named Denise and she impresses Sheldon with her comic recommendations. Amy goes to her for information on comics to connect to Sheldon but when she tries to tell him, he says he's talked enough about comics with Denise. The store's popularity causes Stuart to be unable to babysit for Howard and Bernadette's date night. They try to have another at home, but Stuart shows up so they hurriedly go out. Meanwhile, as Raj sets up a telescope, Penny sees a new comet. Raj takes sole credit for the discovery, angering Penny. Leonard tries to defend her but feels sorry for hurting Raj's career. Penny confronts Raj herself and he agrees to share credit after Penny doesn't give in like Leonard.
President Siebert charges Leonard with distributing some extra university funds in the form of a grant. Everyone begins sucking up to Leonard. Penny is impressed by Leonard's decisiveness but unimpressed when he cannot decide between Raj, Kripke and Dr. Lee (Maribeth Monroe), an ornithologist who works with crows. Leonard, realizing that people will be angry with him no matter who he gives the funds to, eventually awards the money to himself; many crows swarm his car afterwards. Meanwhile, a stressed out Bernadette starts hiding in Halley's playhouse after work so she can have time to herself. She is eventually joined by Penny and Amy. Howard reveals to Raj that he actually knows that Bernadette has been hiding out, but is keeping quiet about it so she can have her privacy and so he can use it to his advantage.
On October 9, 2007, a full-length (1 minute and 45 seconds) version of the song was released commercially. Although some unofficial pages identify the song title as "History of Everything," the cover art for the single identifies the title as "Big Bang Theory Theme." A music video also was released via special features on The Complete Fourth Season DVD and Blu-ray set. The theme was included on the band's greatest hits album, Hits from Yesterday & the Day Before, released on September 27, 2011. In September 2015, TMZ uncovered court documents showing that Steven Page sued former bandmate Robertson over the song, alleging that he was promised 20% of the proceeds, but that Robertson has kept that money entirely for himself.
Sheldon and Amy struggle to choose a best man and maid of honor from their friends. They secretly decide to test and score them, allowing everyone to have an equal shot at either role. Once the gang finds out, none of them apart from Bernadette and Stuart want to be in the wedding. Sheldon settles for Stuart as best man but, once Leonard tells Sheldon that, as the groom, the decision is his alone, he picks Leonard. Amy is set to call Bernadette but, once Penny realizes Amy is her best friend, she immediately pitches herself for the position and Amy enthusiastically chooses her. Amy later makes Penny tell Bernadette the bad news.
Science has also interfered with the characters' romantic lives. Leslie breaks up with Leonard when he sides with Sheldon in his support for string theory rather than loop quantum gravity. When Leonard joins Sheldon, Raj, and Howard on a three-month Arctic research trip, it separates Leonard and Penny at a time when their relationship is budding. When Bernadette takes an interest in Leonard's work, it makes both Penny and Howard envious and results in Howard confronting Leonard, and Penny asking Sheldon to teach her physics. Sheldon and Amy also briefly end their relationship after an argument over which of their fields is superior.