He was not naturally inclined to soaring oratory, so on his rare forays, the eloquence was indelible. Practically alone among elected officials in the United States, Mr. Bloomberg spoke in 2010 for the right of a Muslim group to open a mosque a few blocks from the site of the World Trade Center attacks, citing the founding principles of the nation. As he stood on Governors Island, with the Statue of Liberty visible over his shoulder, Mr. Bloomberg said: “We would be untrue to the best part of ourselves and who we are as New Yorkers and Americans if we said no to a mosque in Lower Manhattan.”

Last week, during a news conference in City Hall, the same mayor snarled at a judge for ruling that in searching the pockets of millions of young black and Latino men who had done nothing wrong, the police and the city had violated their constitutional rights. The moment lacked even a whisper of the grace that had made his voice so powerful on Governors Island.

It would be futile to try squaring those two Bloombergs.

Yet as he enters his final months in City Hall, the full arc of his era is coming into view. Mayors are often spectators, forced to play the hands dealt them by history, the economy, the public, their allies or campaign contributors. As much as any mayor of modern New York, Mr. Bloomberg has been a transformative figure, a shaper of his time.

Elected to lead a city that was the grieving, wounded site of an atrocity, he will depart as mayor of a city where artists have been able to decorate a mighty park with thousands of sheets of saffron, for no reason other than the simple joy of it; where engineers figured out how to turn sewage gas into electricity; where people are safer from violent crime than at any time in modern history.

He is shrewd and has often had good luck, and when that happy combination was in short supply, his vast personal fortune helped patch things over, do good deeds, buy allies. He was not conventionally partisan, and was clumsy in dealing with the baroque centers of power in Albany. The ideology that shaped his goals was, broadly, the allure of large numbers: get enough rich people and companies here, and they will support a government that can keep the city running for everyone else; make policies in public health, education and policing that, when multiplied across eight million people, will create a healthier, smarter, safer city. The love of big numbers led to great success and, at times, toxic excess.

Perhaps most important, he has had a knack for avoiding unnecessary political fights, and little anxiety about trying and failing. At his best, that combination of emotional efficiency and fearless experimentation changed not only the city, but the world. He didn’t want to know what couldn’t be done.

Imagine the deep, drawn breaths of the audience — the gasps — at the finale of a special show held at the Time Warner Center in Columbus Circle on Feb. 24, 2005.