Madrid is about 2,017 times smaller than South Africa.

South Africa is approximately 1,219,090 sq km, while Madrid is approximately 604 sq km, making Madrid 0.05% the size of South Africa.
Tip: This to-scale comparison of South Africa vs. Madrid uses the Mercator projection, which distorts the size of regions near the poles.