Indeed, Berlin is in area larger than Hamburg:
The surface of the (city)state Berlin is 891.82 km² (
1) with a population of 3.402.312 and a density of 3.815/km². The population of Berlins urban area is 3,675,000, but i don't know the surface area.
The surface of Berlin metropolitan area is 5.370 km² (
2) with a population of 4.262.480.
The surface of the state of Hamburg is 755,264 km² (
3) with a population of 1.750.194 and a density of 2317 Einwohner / km².
These are the metropolitan areas of Germany, number 1 on the map is Berlin metro and number 4 is Hamburg. The metropolitan area of Hamburg is much bigger, and has a population of 4.266.000. But most of that has a low density.