In the minds of some American trade restrictionists, the vision of a perfect world economy seems to go something like this: U.S. companies produce things in the U.S. Foreign companies produce things in foreign countries. Goods made in the U.S. by U.S.-owned companies then outcompete foreign-made goods in international markets, thereby winning the competition. Restrictionists worry not just about U.S. companies shipping jobs overseas, but about overseas companies owning assets in the U.S. In reality, things work very differently. U.S. companies invest and hire overseas, as everyone knows. But foreign companies also invest a great deal in the U.S. and hire American workers. Take Toyota Motor Corp., for example. During the next five years, the Japanese carmaker intends to invest $10 billion in the U.S. That money will be used to hire American workers at American factories. But even if some of that $10 billion doesn’t materialize, Toyota already employs huge numbers of Americans—more than 100,000, by its own count. The company recently added more than 700 employees at its plant in Georgetown, Kentucky, which produces the Toyota Camry. Toyota is far from unique. According to Cars.com, the five most American-made cars are all Toyotas and Hondas, with the Camry leading the pack. Nor is Japan the only country that invests in the U.S.: That data is from a recent report by the U.S. Department of Commerce. The report confirms the importance of foreign direct investment in the U.S.: 6.1 million Americans were employed by U.S. affiliates of overseas companies in 2014, more than a third of whom were in manufacturing. The steady drumbeat of rhetoric about U.S. companies shipping jobs overseas has created an impression that no one wants to invest in the U.S. and in American workers. That’s very mistaken. The U.S. is one of the world’s largest destinations for foreign direct investment: Many of the leading countries, such Ireland, are where companies invest to avoid paying high taxes. But countries invest in the U.S. for other reasons. According to the Commerce Department report, 36 percent of FDI in the U.S. goes into manufacturing—multinationals want to make things in the U.S. American workers, offices and factories are highly productive, enabling Toyota, Honda Motor Co. and other multinationals to use the country as a production base, just like they do in China. Also, the U.S. has a big, rich domestic market—making cars in Kentucky or Tennessee allows companies to avoid having to ship from overseas, and helps them to be more responsive to American buyers’ rapidly changing tastes. If President Donald Trump and the country’s other leaders really want to see “Made in America” regain its glory, foreign direct investment will inevitably be part of the equation. China rose to manufacturing greatness using FDI, and if the U.S. intends to do the same, it must also attract multinational dollars. Right now, it seems to be doing a good job. Investment in the U.S. increased in recent years, jumping from $172 billion in 2014 to $348 billion in 2015, for example. But it’s too early to tell if that increase is durable. FDI fell in the early 2000s, and drifted lower during the Great Recession: It would be nice to see this volatile performance replaced with a clearer upward trend. To do so, the U.S. should make attracting more FDI a priority in the years ahead. Standard approaches to boosting FDI include cutting corporate taxes, building infrastructure and entering into multilateral trade agreements. Certainly, the U.S. should try all of those, initiatives that would be useful for domestic investment as well. But according to research by economists Bruce Blonigen and Jeremy Piger, those factors are not quite as important as one might think. Instead, Blonigen and Piger find that one of the most important ways to attract FDI is simply to have a big market that is close to other big markets. They also find that cultural distance is important—having a common language, for example, facilitates investment. That’s why the U.K. and Canada are two of the U.S.’s main investors. Regional trade agreements, like the North American Free Trade Agreement, are also useful. So in order to attract FDI and give more Americans good jobs, the U.S. government needs to ensure that it remains a big market that is culturally in sync with other countries. Among other things, that means encouraging immigration. Immigration not only  increases the size of the U.S. market, but taking in people from China and India also draws the U.S. closer to those countries. The U.S. already gets lots of investment from rich countries, but it needs more from China and India, and the best way to do that is to bring more residents of those countries to the U.S. Finally, the U.S. should go to great lengths to keep all signs of xenophobia in check. Trump’s combative rhetoric, combined with seemingly anti-immigrant moves, risks creating the impression of a country that wants to shut itself off to the world. Already, tourism to the U.S. has taken a noticeable hit. If FDI were also to drop, it would be bad news for American workers in Kentucky, Tennessee and many other places that depend on investment from overseas. If Trump really wants to win in the global economy, he needs to do everything he can to keep those investment dollars flowing. This column does not necessarily reflect the opinion of the editorial board or Bloomberg LP and its owners.