These compositions work very well because the square brings an element of stability and harmony (with the four equal sides), while the rectangle creates a secondary interest.
Here are a few example of compositions based on a square in a rectangle in addition to the ones shown by Stapleton Kearns.
Seaport with the Embarkation of Saint Ursula by Claude Lorrain, [Source: Wikimedia]
Diego Velázquez, The Forge of Vulcan (1630) - Oil on canvas, 223 x 290 cm (87 3/4 x 114 1/8 in), Museo del Prado, Madrid [Source: Wikimedia]
Painting by Diego Velazquez, 1628-1629, titled The Triumph of Bacchus, or the Drunkards. [Source: Wikimedia]
In The Triumph of Bacchus, you can see how one of the diagonals of the square goes along the back of the character beeing crowned.
The use of the square in a rectangle can be associated with the golden ratio. The value of the golden ratio (also called the “divine proportion”) is approximately 1.6180339887.
There is an easy way to build a rectangle which proportions are based on the golden ratio without any calculation. The method, illustrated below, has the following steps:
• Draw a square as a starting point
• Divide the square in two equal rectangles
• Trace a diagonal in one of the rectangles (see illustration below)
• Using a pair of compasses and that diagonal as the radius, draw an arc that defines the long dimension of the rectangle.
The ratio between the long dimension of the rectangle and the short dimension is the golden ratio. Another interesting fact is that it is also true for the smaller rectangle (light pink one).
Practically, you may not be able to use these proportions if you buy ready made canvasses. However, if you make your own boards for acrylic or oil painting, or work on paper, you can try the square in rectangle composition based on the golden ratio.