The song "S&M" by Rihanna is in the original key of C# minor. It was released on January 21, 2011, as the third single from her fifth studio album "Loud." The track was written by Mikkel S. Eriksen, Tor Erik Hermansen, Sandy Wilhelm, and Ester Dean, with production by Stargate and Sandy Vee. "S&M" incorporates elements of dance-pop, electro-pop, and R&B genres. The song's lyrics explore themes of sexual exploration and dominance. It became a commercial success, reaching the top ten in various countries and receiving Platinum certifications in multiple territories. The melody of "S&M" is characterized by catchy hooks and an energetic, pulsating beat.