In SF, some of the immediately adjacent areas (connected by subway) are drastically cheaper, like South SF, Oakland and Alameda. Like 50% of the cost if you look at the median sales prices. There are definitely some expensive suburbs, but they're either to the north in Marin or much further south down the peninsula down by Stanford.
It's worth noting that after New York and Brooklyn merged (I think around 1900), SF considered merging with Oakland.
It's worth noting that after New York and Brooklyn merged (I think around 1900), SF considered merging with Oakland.