Madrid is 5 million people. Not even close to being one of the biggest cities in the world. Heck, there are probably ten cities in the US that have more people than Madrid.
TWO US cites, New York City and Los Angeles, have more people than Madrid, which is the 45th largest city in the world based on city proper. Based on metropolitan area, Madrid would likely be the 6th or 7th largest city in the United States, and would probably rank in the 40s or 50s in the world.
Spain...economic powerhouse...dream on.
What are you talking about? Spain has the world's 10th largest economy, and Europe's fifth largest economy. Spain's Gross Product is $102B more than India's, $160B more than South Korea's, $202B more than the Netherland's, and $336B more than Switzerland's, just to name a few. Needless to say, thier Gross Product is still $507B short of Europe's #4, Italy (and $9,626B short of the United States'), but considering that Spain was pretty much a "nothing" as recent as the 1970s, their progress has been remarkable.