Tennis champion Serena Williams is bringing out her inner nerd for her latest commercial.

The 31-year-old top-ranked player is in Miami for the Open, after dropping out of the Dubai Championships last month following a back injury.

Wearing a floppy hat, nerd glasses and a mini purple-and-orange striped tennis dress, Williams looked to be in good spirits, as she was photographed laughing and smiling while on the set for a Wilson commercial.

Prior to the shoot, Williams was training for the Open, tweeting, “Tough day at the office today @pmouratoglou but I am done and now at a @WilsonTennis shoot.”

French coach Patrick Mouratoglou is not only Williams’ trainer but also her rumored boyfriend.

In September, Williams was spotted in Paris with Mouratoglou, sparking speculation that the two were an item.

"If it was anybody other than Serena on the other side of the court, I'm not sure we'd be talking now," Mouratoglou, who has been working with Williams, told the Associated Press, after the tennis champ's U.S. Open win last summer. "But it was Serena. She was there. She's a winner, and she's a champion."

Days later, the two were snapped in the city of love, with their hands in each other's pockets and embracing as they walked down the street.

This is not the first time Williams and Mouratoglou have been seen together in Paris. In June, they also sat next to each other at the French Open.

Williams will be the oldest No. 1 WTA to play in the Miami Open since 1975. But Williams seems determined to stay on top.

“There were times I thought the hill seemed nearly impossible to climb. During that whole time, I wasn’t even thinking about reaching No. 1 again,” she told the Miami Herald last week.

“Wasn’t thinking about tennis. I was just thinking about getting up out of bed. Then when I came back in the summer of 2011, I started playing really, really well. I thought, ‘OK, I can play tennis again.’

"I started setting short-term goals. Get back to the top 10. Pass this person. Be the best American. Little by little, I climbed my way back. It feels good to be No. 1 again. I feel I should be here,” Williams continued.

The first round of the Miami Open Women’s Singles begins on Tuesday.