How did nationalism encourage European countries to expand their empires?

Nationalism caused countries to form colonies so they could become more diverse.
Nationalism caused countries to expand their empires to encourage equality.
Nationalism fueled competition between European nations for access to new technology.
Nationalism fueled competition between European nations for land, resources, and power.