SEATTLE — The Seattle area, home to both Microsoft and Amazon, is a potent symbol of the affordable housing crisis that has followed the explosive growth of tech hubs. Now Microsoft, arguing that the industry has an interest and responsibility to help people left behind in communities transformed by the boom, is putting up $500 million to help address the problem.

Microsoft’s money represents the most ambitious effort by a tech company to directly address the inequality that has spread in areas where the industry is concentrated, particularly on the West Coast. It will fund construction for homes affordable not only to the company’s own non-tech workers, but also for teachers, firefighters and other middle- and low-income residents.

Microsoft’s move comes less than a year after Amazon successfully pushed to block a new tax in Seattle that would have made large businesses pay a per-employee tax to fund homeless services and the construction of affordable housing. The company said the tax created a disincentive to create jobs. Microsoft, which is based in nearby Redmond, Wash., and has few employees who work in the city, did not take a position on the tax.

The debate about the rapid growth of the tech industry and the inequality that often follows has spilled across the country, particularly as Amazon, with billions of taxpayer subsidies, announced plans to build major campuses in Long Island City, Queens, and Arlington, Va., that would employ a total of at least 50,000 people. In New York, elected officials and residents have raised concerns that Amazon has not made commitments to support affordable housing.