Like her new CD, Rihanna's outfit is "Rated R." Photo: Theo Wargo/Getty Images

At her first New York gig since she was abused by her ex-boyfriend, sexy singer Rihanna came on like a real-life wonder woman.

Decked out in a silvery, Barbarella-like costume, Rihanna projected an attitude of strength and confidence at her Hammerstein Ballroom performance Thursday.

The 40-minute show — her first in support of her just-released “Rated R” album — was brief by any concert standard, but, despite this, there wasn’t a weak tune or even a slight lull in the momentum.

The set opened with material from “Rated R” segueing from “Mad House” into the surging, percussion-heavy “Wait Your Turn,” whose dark melody belies the optimistic message that there’s love for those who are patient.

If you saw what I heard, the traces of scars from her relationship with Chris Brown were most apparent in the song “Russian Roulette.” The moody power ballad demanded volume and was made for an arena much larger than the Hammer. It was the night’s most emotional piece with the singer pleading, “You can see my heart beating . . . just pull the trigger.”

Material from the new record had depth, rawness and an undercurrent of aggressive hard rock in concert. Yet, just when the show was about to descend into darkness that would have marred it, the mood switched to a party atmosphere with “Don’t Stop the Music.”

During this upbeat tune, the Bajan beauty bounced along the lip of the stage, touching the fans and seeming as if she had found her groove.

While this performance had elements of the hip-pop that her fans expected, there was also a very strong rock vibe to the music. The band — a couple of guitars, bass and drums — was really aggressive in its attack. With musicians like these, Rihanna did miss a trick by not performing the new “Rated R” song “Rockstar 101.”

Her career-making hit “Umbrella” — saved for last — also benefited from the band’s guitar-based boost. Plenty of fans brought umbrellas as props for the song, but, if this show was telling, Rihanna didn’t need them — she’s out of the storm.