When it comes to income inequality, ignorance apparently is bliss.

America is increasingly transforming into a land of the haves and the have-nots as the wealth and income gap widens between the country's top 1 percent of earners and everyone else. While that raises the hackles of nearly everyone from policymakers to struggling middle-class families, how exactly does income inequality change the way people in different wealth brackets deal with one other?

A group of Yale University scientists investigated that question, and their answer isn't reassuring.

Get Breaking News Delivered to Your Inbox

At the level of social networks -- not on Twitter or Facebook, but the networks of friends and neighbors who comprise a community -- income inequality can have a corrosive impact when that difference in wealth is visible, according to the researchers. That was the result of their online social experiment that tested how people behaved in different scenarios.

When people were unaware of the wealth of those around them (and of the level of inequality in their social network), they were more likely to cooperate, regardless of the level of inequality.

When people were aware of wealth gaps, the rich were less likely to cooperate, leading to a persistence of inequality. In this scenario, the rich got richer, while the poor become worse off relative to their neighbors.

"What we found is the level of social inequality didn't have that much effect on cooperation, but what did was visibility," said David Rand, a co-author of the paper and an assistant professor of psychology, economics and management at Yale. "No matter how much initial inequality there was, when you made wealth visible to their neighbors, you had less cooperation."

To be sure, the researchers were relying on a social experiment that's far afield from the complex dynamics of everyday life. But using a controlled experiment can help single out how people react to specific information or circumstances, such as income inequality. The paper was published Wednesday in the scientific journal Nature.

The researchers, who include Yale Institute for Network Science director Nicholas Christakis, Yale sociologist Hirokazu Shirado and Yale research scientist Akihiro Nishi, created their experiment using software called Breadboard, which allows people to engage in real-time online experiments. The 1,462 subjects were recruited through Amazon's Mechanical Turk, a crowdsourcing service that has become popular with social science experts because it allows them to quickly find respondents for surveys and experiments.

The participants were placed in one of three social divisions with different levels of wealth inequality. In one, the Gini coefficient -- a measure of income inequality -- was set at zero, or no inequality. The second group had a Gini coefficient of 0.2, a level that's seen in many Scandinavian countries. The third segment had a 0.4 Gini coefficient, the type of high inequality that's seen in the U.S.

The participants were given 100 units (representing money) and allowed to either cooperate by reducing their units by 50 and lifting the wealth of their neighbors by 100 units each, or else to defect by paying no units and providing no benefits to their neighbors. Participants started each game with different amounts of units, according to the inequality level of the society they were in.

The third twist in the experiment came with whether the level of inequality was visible or invisible to the participants. The surprising thing, Rand noted, was that the level of inequality alone didn't make much of a difference. What did was whether the participants were aware of the gaps between themselves and others.

In the highly unequal world where participants were aware of each others' wealth, the rich were less likely to cooperate. But the poorer were more likely to invest in the network, leading to what the authors called an "exploitation" scenario: The poor invested in their networks, making them poorer, while the rich hoarded their units. That led to a "rich getting richer" type of world.

"If you are taking the model literally, it's the people you interact with every day. It's more about the wealth of neighbors than the wealth of Bill Gates," Rand noted. "The implication would be within a community or organization, having more transparency about wealth could potentially undermine cooperation and make people feel disgruntled, unless there's a way to act on that."

While people have egalitarian impulses, there's a warring tendency to want to have more than the Joneses -- and to keep that financial edge. Other research has found that money can bring happiness, but only if people perceive themselves as earning more than those in their social network. That may explain why the rich in the Yale study wanted to hold onto their wealth.

But the downside is downright corrosive.

As the Yale paper noted: "Visibility may cause subjects to perceive the situation as a competition, to think that their wealth signals social position, or to fear being near last place, all of which might reduce cooperation."