The formal approach to shapes and their algebras, as it appears in shape grammar theory, has been reviewed. It starts with geometric elements and their partial algebras, continues to shapes, their algebras, and boundaries, as well as algebras that calculate with shapes and their boundaries. There is a number of new concepts introduced along the way. These include diagonal decompositions and their algebras which simplify calculations with shapes, b-paired diagonal decompositions which extend calculations with shapes and their boundaries from diagonal shapes only to all shapes, and m-order boundaries which extend the concept of shape boundaries and allow for calculations with multiple representations of shapes. It also shows that algebras of shapes are infinite direct sums of diagonal algebras.