Why does a building on solid bedrock resist better to an earthquake than a building on sediment or reclaimed land?

The reaction of a building to an earthquake depends on two major parameters: the technique used for its construction and the kind of ground it is built on.

Buildings on solid bedrock tend to shake less than buildings on sediments or reclaimed lands because the bedrock itself shakes less than sediments or reclaimed land. The bedrock vibrates a lot less than sediments because of its structure: it is much more compact than the sediments, which are composed of multiple thin and inhomogeneous layers.