Housing markets get discussed in the media mostly through the channel of prices. Rising prices are considered good for the economy. They can connote increased sales, which would lead to more construction and real estate-related jobs. They also give homeowners more equity in their homes, and the consequent "wealth effect" – studies show personal spending jumps when people perceive an increase in their wealth – can benefit the economy.

But there's a darker side to rising home prices. They harm affordability, particularly for first-time homebuyers. Since the collapse of the housing bubble, this group of potential purchasers has not returned to the market at the historical level of 2006. Because first-time homebuyers allow sellers to purchase bigger homes, their absence has blunted the impact of rising prices; the Bureau of Economic Analysis reports that residential housing investment remains lower than the depths of any housing crash over the past 40 years.

Housing affordability is a major problem in the Golden State. The California Association of Retailers' most recent Housing Affordability Index (HAI) shows that only 30 percent of the state's households can afford to purchase an average-priced home in their area.

The situation is worse in the biggest cities. Los Angeles and San Diego's HAI is 25 percent. Orange County sits at 20 percent. The nine counties of the Bay Area are at 21 percent. San Francisco, San Mateo and Marin counties? Fifteen percent. And they all have gotten worse since last year. For context, the national Housing Affordability Index from the National Association of Home Builders is 61.8 percent.

Rental prices are similarly out of reach. The National Low-Income Housing Coalition rates California as the second-priciest state for home rentals in the nation, behind only Hawaii. One study shows that the average resident in Los Angeles must devote 47 percent of his or her income to rent.

You can't have a great city if so many of the people who work in it every day cannot afford to live there, and too much of California falls into this category. But at some level this shouldn't make sense. How can prices be rising in cities that are already unaffordable? Who buys the homes and rents the apartments?

The answer is that the state of inequality dominating the economy in California and nationally also affects housing in powerful ways. The only growing home sales are for million-dollar properties, and all-cash purchases remain historically high. So despite the affordability challenges, this outsized demand from wealthy buyers pushes all prices up.

Consider this incredible statistic from the research analyst Redfin: Through last April, sales of the top one percent of homes by price rocketed up 21 percent on a year-over-year basis. But sales of the other 99 percent of homes were down 7.6 percent. In other words, we don't just have two Americas; we have two housing markets, one for the rich and one for the rest.

One school of thought claims that the remedy is to simply build more properties. That would reduce prices through the law of supply and demand, and make cities more affordable to all residents. Supporters of this theory argue that burdensome regulations depress housing construction in desirable areas of California and that changing zoning codes to increase density, particularly around mass transit lines, would deliver opportunity to everyone.

There's no question that pervasive single-family zoning, and a protracted approval process for large developments, makes some California cities less dense than they could be. Multi-unit, transit-oriented development would benefit the environment along with the economy. But if it were true that simply dismantling zoning codes and unleashing the free market would generate affordable housing, then we would expect results from a natural experiment in downtown Los Angeles.

Long neglected among the city's glitzy attractions like Hollywood or Beverly Hills or the beach, downtown L.A. is now defined by the construction crane. Last year, the largest continuous concrete pour in history, certified by Guinness World Records, laid the foundation for a 73-story hotel, retail and office project called the Wilshire Grand Center, slated to be the tallest building west of the Mississippi. Overall, 94 new real estate projects are either under construction or in the works, adding to the tens of thousands of new residences and office spaces built in the past several years.

This has revitalized downtown, bringing back museums, restaurants and brand-name shopping, and making a walkable, urban lifestyle possible in a city dominated by single-family homes, freeways and sprawl. Six rail lines now feed into downtown L.A., as many as into downtown Chicago.

Relaxed regulations brought about this boom – in particular an adaptive-reuse ordinance that allowed developers to take existing buildings and convert them into residences, without having to comply with various parking and zoning requirements. The population of downtown L.A. has doubled over the past decade, and residents want even more development, rarely exhibiting the "NIMBYism" that supply-side housing supporters say kills big projects. Proposed changes to simplify the review process for large developments would make high-rises even easier to build.

Los Vientos via AMCAL

But while more density should theoretically increase the housing supply and drop prices, new condominiums and apartments downtown have not delivered on that promise. Condos are seen as less profitable than apartments, so construction has stalled, but even before that, purchase prices shot up nearly 100 percent in five years. And even with apartment building surging in the least affordable city in America for renters, downtown rents are rising, and projected to keep going up. The median household income in downtown in 2013 was $98,700, almost twice the national average.

The reason for this goes back to the two housing markets. Because the market is hottest at the high end, developers understandably put more homes up for sale in higher price ranges. After all, that's where the demand is located, in the lucrative luxury market.

Los Angeles had an affordable housing ordinance for new projects, but developers schemed to get around it. Geoffrey Palmer, a local apartment builder known for luxury dwellings, successfully sued the city in 2009 to toss out the inclusionary zoning mandate. As a result, large developments frequently have zero affordable units within them. (Palmer achieved some notoriety last December when one of his projects, a 526-apartment building called the Da Vinci, burned to the ground. He plans to rebuild it.) While the city offers developers more density and height variances if they include affordable housing units, the adaptive-reuse ordinance supersedes that, and allows big projects to go forward with no market-rate housing.

Other trends frustrate the effort to make more housing affordable. Supply-side utopians believe that building luxury units will even open up opportunities in the older residences, which filter down to first-time buyers. But increasingly, those are turned into permanent vacation rentals with Airbnb, or snapped up by developers and renovated upmarket. Los Angeles has no policy for tear-downs that would preserve any affordable units bulldozed in the renovation.

So in downtown Los Angeles, you have a perfect opportunity for abundant, quality, affordable housing near transit corridors, and a community wanting to build higher and loosen any restrictions that stand in the way. But instead of the predicted mix of income levels and lower housing prices overall, you get young professionals flocking to an urban playground, keeping the transit-dependent out.

"The question being raised is who is this development for and at what cost," said Larry Gross, executive director of the nonprofit Coalition for Economic Survival, in an interview with me last year.

The only affordable housing for the masses of L.A.'s working poor, then, gets shunted into low-income areas, further stressing the neighborhoods' meager resources and reinforcing the tremendous income segregation in the city. The lack of middle-class homeowners paying property taxes means badly-funded schools in those poorer areas. And the concentration of low-income housing often keeps businesses away, meaning fewer job opportunities. As inequality affects housing, so too does housing affect inequality.

We need to think seriously about these challenges. Deregulation won't solve California's seemingly intractable affordable housing crisis on its own. The truth is that most Americans don't have the money to afford a house and, increasingly, not enough to make the rent. The median household net worth is a paltry $45,000. Gains since the Great Recession have gone entirely to the very top.

Encouraging affordable housing through the zoning code is a good start. But until we see real increases in wages, or make the unwise choice of handing out risky mortgages again (remember, the financial industry used to call subprime loans "affordability products"), we will continue to have separate and unequal neighborhoods in Los Angeles and throughout California.

(David Dayen is a contributing writer to Salon who also writes for The New Republic, The American Prospect, Politico, The Guardian and other publications. He lives in Los Angeles.)