When a firm purchases a good or service from abroad, this purchase increases the investment component of GDP. Similarly, if this purchase was made by a household, then the consumption component of GDP would increase. If the purchase was made by the government, then the government purchases component of GDP would increase.
However, this transaction has a counterbalancing effect that shows up in the net exports component of GDP. Recall that net exports equal exports minus imports. Because foreign-made goods and services purchased by domestic parties (consumers, firms, and the government) are imports, their value is subtracted from exports and shows up in the GDP calculation as a debit entry (with a minus sign).
In this case, because an American company has purchased and imported automotive parts, the investment component increases by the value of the automotive parts. However, since theautomotive parts were imported from Canada, net exports decreases by the same amount (the value of the automotive parts). Although the investment and net exports components of GDP have changed, there is no overall change in GDP.