Sandstone forms wherever sand is buried under the right conditions to pack it into a solid rock. This often occurs in offshore river deltas; however, sandstone is also found in desert dunes and on beaches.
Sandstone is created from sand that has been cemented together to make a rock. Sandstone is a sedimentary rock because it is formed from sediments, which are formed by pieces of minerals and fragments of rocks. Sandstone usually contains a large amount of sand, but there are instances in which sandstones contain other materials that are fine and coarse. Matrix and cement are also found in sandstone. The matrix is created by the fine-grained particles in the sand. The cement acts as the binding force and is found in the minerals that get into the sand. These minerals bind the sediments into the rock. The cement in sandstone is usually made from quartz, iron oxide or calcium carbonate. Sandstone that contains a lot of matrix is considered poorly sorted. Well-sorted sandstone contains a small amount of matrix and is called arenite. The mix of matrix and cement is what gives sandstone its color. Since many kinds of minerals can make up sandstone, it is found in several different colors.