Last summer, you may remember, Mitt Romney was all but beaten in the polls. But by November 6 he had transformed himself into a serious contender, with the potential to pull out a victory up to the moment the polls closed. As it is, he earned 7 million more votes in losing than George W. Bush did in winning in 2000.

It’s actually pretty simple how Mitt Romney came so close to victory. He managed the impressive feat of turning his negative campaign into a positive one. In short, Romney became the candidate of optimism.

The United States is a nation built on optimism. It is part of our national DNA. It is enshrined in our founding documents. It is what brought to this particular part of North America all those immigrants looking for a better life. It is what inspires the men and women of our military and gives them the courage and the strength to risk their lives for us. It lies at the heart of all the major religions in this most religious of industrialized nations. And it drives our economic system, dependent as it is on the free exchange of goods and services that allow people to improve their lives.

Above all, it is what we look for in our leaders.

Not just our political leaders, either. In business, too, great leaders inspire those around them with a higher purpose and a vision of a better future. Think of Steve Jobs creating “bicycles for the mind.” Or Bill Gates and his dream of putting a computer on every office desk and in every home. Or Sam Walton, whose aim was to lower the cost of living for everyone. Or Henry Ford’s goal of producing simple, reliable cars that the average American worker could afford.

There are no more optimistic people in the world than entrepreneurs.

You have to be an optimist to think you can build a business from scratch. You also have to be able to convince other people--investors, lenders, suppliers, customers, employees--that you can do it. The more successful you are, the more important it is to be able to project optimism convincingly. That means painting a picture of a brighter future, backed up by a solid record of achievement and a good plan for fulfilling your goals.

I don’t know much about Mitt Romney’s management style at Bain Capital, which he co-founded, or at Bain & Company, where he served as CEO in 1991 and 1992. I do know, however, that the latter was a turnaround assignment and required him to, among other things, rally the firm’s 1,000 employees, who stood to lose all of the money owed to them through Bain’s employee stock ownership plan. Romney succeeded in saving the ESOP and returning Bain & Co. to profitability in a year or so. He couldn’t have done it if he hadn’t been able to convince all the players involved that things would get better if they just worked together.

So I was baffled at first by his campaign’s early strategy of making the election a referendum on the Obama administration. There are only two sides in a referendum: pro and con. Had he stuck with that plan, Romney would have had to wage an almost purely negative campaign from beginning to end. Negativity and pessimism are not the same, but they’re related, and they feed off each other. If you talk only about the other guy leading us into a ditch, pretty soon all we can see is the ditch.

For months, Romney hammered away at the dismal economic record of the Obama administration while saying little more about himself than that he had a résumé qualifying him for the job. Exactly how it qualified him, he didn’t explain. The strategy didn’t work, mainly because the Obama campaign was doing an even more effective job of turning the race into a referendum on Mitt Romney.

Someday, no doubt sooner rather than later, we will learn exactly what led Romney to change course. The transition seemed to begin with the selection of Paul Ryan as his running mate, picked up some steam around the Republican convention, and then emerged full-blown during the debates. By the final month of the campaign, the difference between Romney’s and Obama’s messages was striking.

While Obama continued to want a referendum on Romney and intoned that “voting is the best revenge,” the governor was providing a vision of a better future for America and asking people to vote for “love of country.” The effect was reflected both in the size of the crowds that Romney drew wherever he went in the past few weeks and in the spirit of those who attended. They were no longer just enthusiastic to vote against Obama. They were excited about voting for Romney.

In the end, despite the outcome, the message of optimism carried the day, as it almost always does.