Congruent memory (also called [[ state-dependent learning]] according to TheOtherWiki) is the idea that someone who learns something in a certain environment or emotional or physical state is more likely to remember what they've learned when in that same state. For example, if a rat learns its way through a certain maze while drugged, it may be able to run the maze ''only'' while drugged -- or if you study for your math test while listening to a certain song, you may be more likely to remember the formulae when listening to that song.

When this phenomenon shows up in fiction, it's often played for comedy: Usually a character will have to precisely replicate the circumstances in which he or she learned something in order to be able to recall it, or the circumstances themselves will be somewhat bizarre (or both).

Obviously RealityIsUnrealistic, because while this is a legitimate idea in modern psychology, it's never taken to the [[ExaggeratedTrope absurd levels that fiction shows]].



[[folder:Anime & Manga]]
* ''Manga/RanmaOneHalf'': Tatewaki Kunō once learns an absolutely devastating TornadoMove that can beat even Ranma Saotome after some TrainingFromHell. Problem is, it is intended purely as a [[SmashingWatermelons watermelon-cutting move]], and Tatewaki is only able to use it if there are watermelons around to target.
* In book 9 of the ''Manga/GirlsBravo'' manga, LethalChef Kirie is taught how to cook properly by Fukuyama. Problem, since he's a LovableSexManiac, he forces her to do so while wearing a NakedApron. In the end, Kirie can only cook edible stuff while nude under her apron.

[[folder:Comic Books]]
* ''Franchise/ArchieComics''
** There was one ''Betty and Veronica'' comic where Veronica was studying for a test while lying on the floor of her room. When the day of the test came around, she couldn't remember any of the information -- until she lay down on the floor of the classroom in the same position she'd studied in.
** In another ''Archie Comics'' story, Jughead could [[SnowballFight throw snowballs]] easily, but couldn't get the same feeling when handling a normal baseball.
** In the same vein, Jughead was once scouted for the opera thanks to his bombastic singing voice -- unfortunately, he only sang well in enclosed spaces because he did most of his singing in the bathtub.
* One of ''[[ComicBook/MonicasGang Tina's Pals]]'' could only study while listening to music. The louder the better. When it was time to take the test, the teacher wouldn't allow any noise and he forgot everything.

[[folder:Films -- Live-Action]]
* Used almost by name (Fink calls it his "theory of Drunken Recall") in ''Film/{{Beerfest}}''. Jan Wolfhouse has to get utterly plastered to recall how to get to the secret underground beer-drinking contest. He still can't yodel, though.
* In ''Film/IronEagle'', Doug Masters learned to fly in an F16 simulator, while listening to his favorite rock tunes on his Walkman. Turns out that as long as he's got his music to listen to, he's a great pilot; without the music, he sucks.
* In ''Film/AkeelahAndTheBee'', Akeelah practices spelling while jumping rope. During the spelling bee, she has to jump to remember a particularly difficult word.
* In ''Film/CityLights'', a millionaire regards Charlie Chaplin as his best buddy when drunk, but as a vagrant stranger when sober.

* In the Creator/RobertAHeinlein novel ''Literature/GloryRoad'', when Rufo gives Oscar a shave, he tells him he can't shave someone who's sitting up because he learned shaving by preparing corpses for burial.
* One of the pieces in Douglas Adams' ''The Salmon of Doubt'' says this is why you can't remember your New Year's resolutions. When you write them and put them away, you're in a post-party state: stuffed, hungover, dehydrated, possibly ashamed. Once you're back to normal, you forget them until the next time you're in the same state, next New Year's Day.
* Marcel Proust's [[DoorStopper mammoth novel]] ''Remembrance of Things Past'' is centered on the flood of memories triggered by the scent of a madeleine (a particular kind of cookie).
* In ''Literature/TheGhostBrigades'', the character Jared is a failed copy of the main villain who gradually recovers the villain's memories over the course of the book, triggered by congruent experiences. The first time it happens involves food, causing another character to namecheck ''Remembrance of Things Past''.
* ''Literature/CamJansen'', a girl detective from a series of kids' books, says "Click!" when hunting for clues, then later repeats it to help herself remember the details of what she saw. This is explained as her having a "photographic memory," but is closer to this trope in practice. [[DontExplainTheJoke Because "Cam" is short for "Camera", see?]]
* In the tale of Ali-Baba and the Forty Thieves from ''Literature/ArabianNights'', a tailor is blindfolded and led to a certain house where the protagonist is hiding. When Ali-Baba's men try to discover the house, they blindfold the tailor and he is able to find it again.
* In ''Literature/TheWheelOfTime'', channelers' habits of using certain hand gestures while preparing Weaves of the One Power are explained as deeply ingrained muscle memory. One powerful channeler observes that almost nobody can prepare a fireball -- otherwise an exceptionally simple Weave -- without making some sort of throwing motion, simply because everybody learns to associate the hand gesture with the Weave.

[[folder:Live-Action TV]]
* In ''Series/{{Friends}}'', Joey practices for a commercial by repeating, "Mmmm, soup," while eating tomato soup. When auditioning for the commercial, they use a bowl of noodle soup and he is unable to get the simple "Mmmm, soup" line right.
* ''Series/MalcolmInTheMiddle'':
** In an episode, Hal goes bowling and gets a strike every time. As the episode goes on, he develops an increasingly elaborate routine for throwing the ball, to the extent that toward the end, Hal refuses to let one of his observers go to the bathroom.
** There was another episode where Francis teaches Otto to waltz, to surprise Gretchen on their anniversary. But when the moment comes, Otto fails miserably. He comes to realize he could only waltz with Francis.
* Played for a non-comedic (although somewhat absurd) bent in the Season 4 finale episodes of ''Series/{{House}}'', where the good doctor tries to fight the amnesia that is crippling his ability to diagnose what may be afflicting victims of a bus crash he just survived. Ultimately subverted in that he chooses to just fry his frontal lobe with electricity to induce the memories ([[spoiler:and a seizure -- that should have shredded his brain, what with the wires inside it]]).
* In ''Series/{{Heroes}}'', initially Isaac Mendez could only use his precognition powers while drugged on heroin. However, he later learned how to use them without it. And since everyone else who's acquired that power since has been perfectly able to use it straight away, one suspects it was a MagicFeather. A different character has a similar problem with alcohol.
* In the "Get Down, Study-udy-udy" episode of ''Series/HannahMontana'', Miley creates a song and dance to help her remember all 206 bones in the human body. On the day of the test, she can't remember them because she can't dance and sing.
* On ''Series/{{Fringe}}'', [[MadScientist Walter Bishop]] frequently requests different foods while recreating his old experiments; his son Peter explains to Agent Dunham that he's trying to recover his memories. Often these food requests are for commercial food products that are no longer in production, leading to Walter purchasing multiple brands trying to find the one that comes closest.
* One episode of ''Series/DharmaAndGreg'' features Larry, Dharma's post-hippy memory trainwreck father, regaining his memory every time he smells Hai Karate.
* In the ''Series/{{MASH}}'' episode where Father Mulcahy is volunteered to race the 8063's chaplain for charity, Mulcahy's training sequence includes jump rope. It wouldn't be odd if he didn't have to do it to a schoolyard rhyme.
* An episode of ''Series/CharliesAngels'' has the Angels undercover at a 10K footrace. Kris sees something important but when talking to Bosley about it she doesn't remember exactly what, so she starts running in place. When Bosley asks what she's doing, Kelly tells him she's "jogging her memory."
* In the ''Series/WhiteCollar'' episode "Controlling Interest", Neal is [[SlippingAMickey drugged with a substance called "Goodnight, Cinderella"]] by a crooked psychiatrist and apparently interrogated. To remember what happened, Neal lets Mozzie drug him again. It works, but the effects make him impulsive and suggestible. Neal ends up nearly spilling all his secrets to Peter.
* Brought up in an episode of ''Series/{{NCIS}}''. Tony is interviewing a pair of witnesses who had been drinking wine while a getaway was happening. They don't get drunk, but he does encourage them to sniff the wine, and its fragrance helps them recall more details.

[[folder:Web Animation]]
* In ''Machinima/RedVsBlue'', Donut tries to recount to Grif the things he did during the day that led to him losing an important part for Simmons' cyborg operation. Among these steps was him asking himself where he could hang out with no pants on.

[[folder:Web Comics]]
* Tedd of ''Webcomic/ElGoonishShive'' is [[ better at cooking]] when [[GenderBender female]]. He is, however, fully aware of how absurd this is. (The gender bending part, not congruent memory as a whole.) This doesn't stop him in the slightest.
* In ''Webcomic/FunnyFarm'', Ront's brother Pom keeps failing tests due to being DistractedByTheSexy. Ront creates a revision technique where he associates what he needs to learn with the female anatomy. This works fine, except ''after'' the test Pom finds it also works backwards and he can't stop thinking about his schoolwork when admiring a woman.

[[folder:Western Animation]]
* ''WesternAnimation/SpongebobSquarepants'':
** [=SpongeBob=] practices driving while blindfolded. When it comes time for him to take his driving test, he finds he can't drive without the blindfold. Oddly this one provides a justification: when he can see what he's doing, it terrifies him.
** Another episode had him forget where he put his nametag. So he repeats his morning routine ad infinitum, ''exactly'', until he remembers.
* In an episode of ''WesternAnimation/{{Arthur}}'', Arthur practices for a spelling bee by singing the word "aardvark". Then, when the time comes to spell the word for the bee, he does the same little song.[[note]]Possibly TruthInTelevision for anyone who has ever tried to remember the order of the alphabet, and sung the Alphabet Song. Or who find themselves [[ singing the Preamble to the US Constitution.]] (Note: the song ''does'' omit part of one line to scan better...)[[/note]]
* In ''WesternAnimation/FamilyGuy'', Peter could play the piano only when plastered. However, it wasn't a straight example of this trope. They didn't suggest this idiosyncrasy was because he learned to play the piano while drunk. Instead, apparently without learning to play or practicing beforehand, he just inexplicably developed a talent for playing the piano that required him to be drunk.
* And in an episode of ''WesternAnimation/AmericanDad,'' Roger sells a Senator's daughter to a drug lord and can't remember who he is or where to find him because he's always high when they interact. Sure enough, taking a hit (I think it was cocaine) enables him to give perfectly lucid directions.
* On ''WesternAnimation/HeyArnold'', Grandpa learned to play golf by watching a video presented in rhyme. He could then only hit the ball correctly if he first recited one of the rhymes. When he came to a particularly daunting hole that the video didn't cover, he made up his own rhyme, and was still successful.
* Averted on ''WesternAnimation/SouthPark'': Towelie claims that, since he was high when he learned the passcode to enter the secret government base, he needs to get high in order to remember it. Once he ''does'' get high, all he manages to do is pound on the front door keypad to reproduce the EpicRiff from "Funkytown".
* Played straight in an episode of ''WesternAnimation/TheFlintstones'', in which Fred took ballet lessons to improve his bowling skills, and then find that he can only bowl perfectly to ballet music.

[[folder:Real Life]]
* Have you ever tried to remember song lyrics with the melody removed? Or tried to recall song lyrics without humming the tune to yourself/singing it? Some people can't even recall the order of the alphabet without the song.
* Or had to mime entering in a telephone number on an invisible phone in order to recall a number?
* How about moving your fingers when trying to recall a web address?
* The above two are actually examples of procedural memory, or, colloquially, "muscle memory." It's what happens when you perform a specific action the same way so many times that the brain eventually just gives that particular action its own subroutine, so you don't have to consciously think about doing it anymore.
* Have you ever tried to remember why you went to a particular room by going back to a room where you knew? Often justified or subverted in that the objects or situation that made you go to the other room in the first place may still be there. Also subverted by the way your brain classifies short-term memory: it classifies memory by location and doors triggers in your mind a change of location, so you forget almost everything from the other room unless you go back.
* Being able to play certain drinking games only while drunk/drinking such as [[ Quarters]] or [[ Baseball]].
* Often invoked as "study aids" for students. This is why, among other things, you're supposed to be sitting at a desk as you study the material -- so you can remember the material when you're sitting at a desk for the test. Many teachers also recommend studying in conditions that will exist during the exam. Set a time limit equal to how long you'll have on the exam. Use the exact same pencil. Depending on if the school allows it, you can even go to the classroom and sit in the seat you'll take the exam in and study there.
* On a related note, you're supposed to only use your bed for sleeping[[note]]and sex, of course[[/note]] because if you try studying in bed, you'll find yourself getting sleepy because you've strongly conditioned yourself to associate your bed with sleep. This works both ways: some people have problems with insomnia because they've stopped being conditioned to associate their bed/bedroom with sleep. The remedy for this is to move things like computers, TVS, and exercise equipment out of the bedroom and to minimize non-sleeping time spent there.
* This is also why is not a good idea to stoke yourself up on coffee or energy drinks to cram in your revision, as you won't remember it until you're stoked up on coffee or energy drinks -- probably not a good idea when you're about to go into an exam.
* Studies have shown that smells are also quite good at evoking memories. So study while wearing a ''highly unique'' perfume and then wear it again the day of the test. Legend has it the ancient Greeks were fond of rosemary.
* Averted with performance under extreme stress. It used to be approached under two theories: learn the action normally and then apply stress ''versus'' learn action under stress. Extensive research has proven beyond a shadow of a doubt that the former is a far better way. In the book ''Extreme Fear'', the author goes into the psychology, but essentially your brain shuts down too much in panic mode and focuses only on what it knows will work for it to learn successfully while under duress. So learn calmly, and then introduce distractions.
* There are people who become used to listening to a certain noise at night find it harder to get to sleep if it stops.
* Most men, when teaching how to tie a tie, must stand behind the person they're helping, because [[DamnYouMuscleMemory that's the only way they can remember how the knot goes.]] The opposite can true for women: because they're more likely to learn by tying someone else's tie, if they have to wear a tie themselves[[note]]for instance, some restaurant uniforms call for ties for both waiters and waitresses[[/note]], they [[DamnYouMuscleMemory essentially have to re-learn how to do it]].
* Many basketball players have a short ritual before shooting a free throw-- usually bouncing the ball a certain way-- in order to trigger their muscle memory.