Three homeless people rest near Coyote Creek, San Jose. Robert Johnson for Business Insider Silicon Valley has a serious homeless problem, despite the fact that the Valley is home to some of the richest zip codes in the nation.

Over the past eight years the U.S. watched its homeless population decline by more than 130,000 people.

That's a nearly 17 percent drop that flies in the face of Silicon valley's 8 percent increase in its homeless population over the last two years.

Click here to see the photos »

Not including San Francisco — which has a serious homeless problem of its own — the Silicon Valley stretches through the Santa Clara Valley down from Redwood City, through Palo Alto, Mountain View, and San Jose.

What is causing the trend-bucking homelessness problem in the area? In addition to the rising cost of housing and lack of adequately paying jobs, we found that mental illness and substance abuse are problems in the Valley's homeless community like elsewhere in the country. Forty percent of the country's homeless suffer from substance abuse or mental illness and though the National Alliance on Mental Illness calls California's mentally ill housing the "gold standard," the state cut its mental health budget by 21 percent from 2009 to 2012.

"It's a perfect storm of homelessness," San Jose's Housing 1000's Jennifer Loving told Business Insider referring to the budget cuts, lack of allocated housing, recession-era tax breaks in the county, a lack of adequately paying jobs, a growing wealth gap, and rising home prices for sales and rentals.

Barry Swenson Builders told Business Insider that Silicon Valley's residents can expect a 1,000-square-foot "tear down" home to sell for more than a million dollars. Then there's the rental market. A two-bedroom rental at the low end of the $1,800 to $4,800 market, can be tough to find. The apartments that do come to market often receive hundreds of applicants.

Barry Swenson Builders also said it had more than 600 applications for a 29-unit complex they were building in Mountain View, just south of Palo Alto. Rental prices went from an all-time 2009 low to the highest-priced market in the U.S. in 2013.

It is no wonder that in the midst of this collection of wealth and crazy real estate there is a serious problem with homelessness. More than 7,600 people are sleeping homeless on any given night in the Valley. In Palo Alto — ground zero for Silicon Valley wealth — the city council has made clear the 157 homeless have worn out their welcome.

How homelessness is dealt with varies from city to city but is no less of an issue in each. Palo Alto has a robust police force and the city just passed legislation outlawing people from sleeping in their cars. The city also just imposed restrictions keeping homeless people from sleeping at the one place in town that has public showers. That center was just blocks from Larry Page's home.

In San Jose, hundreds of police officers have quit for higher-paying jobs. A lack of police presence combined with open land along creeks and trails has made San Jose a go-to destination for many of Silicon Valley's homeless.

Business Insider spent a week in mid-July visiting the Valley, talking to government workers, volunteers, non-profits, and the homeless residents themselves. We also spent a day on San Francisco Bay with Larry Ellison's Team Oracle to see what a pair of $10 million sailboats can really do. The contrast was stark.

These photos and this series take a close look at the homelessness problem in the Silicon Valley, including profiles of former coders who lived on the streets, Vietnam Vets, working mothers who can't afford rent, and the people and organizations who are trying to affect change.

We looked more at the homeless issues in the South Bay compared to San Francisco, as the homeless problem in San Francisco proper is already a well-documented problem.

Author's note: In response to offers of assistance and requests for local information, contact Jennifer Loving at Housing 1000. The organization works closely with public and private agencies throughout the Santa Clara Valley.