His words were, for the most part, the kinds of platitudes to be expected at a commencement (in addition to urging grads to be activists, he also told them to "persevere" and "never underestimate the power of your example"). But the location was particularly notable – just as it was for Mitt Romney's commencement address two days earlier.

Mr. Obama, whose campaign has been targeting women voters this election year, zeroed in on Barnard – a top women's college that has been affiliated with Columbia University since 1900 – back in February. He requested the speaking slot back then, and the Barnard president replaced New York Times executive editor Jill Abramson, who had originally been designated the speaker.

It's a natural fit for Obama. It helps reach women and young people – both key parts of the electorate he wants to mobilize. Moreover, Obama's half-sister, Maya Soetoro-Ng, graduated from Barnard, and Obama graduated from Columbia.

Mr. Romney's choice of commencement venue was also illuminating – and perhaps not quite so comfortable for the GOP presidential candidate.

On Saturday, he spoke at Liberty University, the Evangelical college founded by the late Rev. Jerry Falwell.

For a candidate who has been struggling to resonate with evangelicals – though his approval ratings among that group are finally rising – it seemed like a very targeted appeal.

And coming shortly after Obama's headline-making support for gay marriage, Romney earned some of his loudest applause for stating his position on the issue:

"As fundamental as these principles are, they may become topics of democratic debate. So it is today with the enduring institution of marriage. Marriage is a relationship between one man and one woman."

Romney went on to emphasize America's Christian roots. "It strikes me as odd that the free exercise of religious faith is sometimes treated as a problem, something America is stuck with instead of blessed with," he told his audience. "From the beginning, this nation trusted in God, not man. Religious liberty is the first freedom in our Constitution."

And he added that “culture – what you believe, what you value, how you live – matters."

The speech was a major foray into a key constituency that Romney needs to step up for him this fall – and that, during the early primary season at least, was reluctant to embrace him.

In Obama's Barnard talk, meanwhile, the president was urging young people to be politically active – and, presumably, to head to the polls for him in November.

"It’s up to you to hold the system accountable and sometimes upend it entirely," he told his audience. "It’s up to you to stand up and to be heard, to write and to lobby, to march, to organize, to vote. Don’t be content to just sit back and watch."

The audiences couldn't be more different, though Romney did, through some creative advertising, try to reach some of those same New Yorkers and young people interested in Obama's Barnard remarks.

According to Politico.com, Romney's campaign on Monday purchased Web ads targeted specifically to the 10027 ZIP Code in which Barnard is located. When Google users in that area searched for "barnard commencement" Monday – perhaps looking for logistical information about the speech – the first ad they saw was a link to Romney's website entitled "Obama's Wasteful Spending." (Underneath, it said: "leaving graduates with an economy not creating the jobs they deserve.")

Obama's speech was just the beginning of a swing through friendly New York territory. He also taped an interview on ABC's "The View," (which will air Tuesday) and planned to attend a fundraiser hosted by singer Ricky Martin.