The origin of architecture dates back to the time of the primitive communal system, when the first artificially constructed dwellings and settlements arose. The simplest methods of organizing space on the basis of a rectangle and a circle were mastered, and the development of structural systems with support-walls or posts, conical, gable or flat beam coverings began. Natural materials (wood, stone) were used, raw bricks were made. The end of the existence of primitive society is marked by the construction of fortresses with walls or earthen ramparts and ditches. In megalithic structures (menhirs, dolmens, cromlechs), the combination of vertical and horizontal blocks of stone testifies to the further development of the laws of architectonics (cromlech in Stonehenge, Great Britain).
With the emergence of states, a new form of settlement developed - the city as a center of administration, handicraft production and trade. The number of types of buildings increased, the difference between which began to be determined not only by their function, but also by their intended use for the ruling class or the exploited masses. In a class society, social relations, and not the relationship between man and nature, became decisive for architecture. In large slave-owning despotisms, the concentration of power and material resources in the hands of a small elite, the exploitation of a huge number of slaves, successes in the field of science and technology became the basis for the construction of large irrigation facilities, monumental palaces and temples, designed to assert the inviolability and power of the power of a deity and deified rulers (pyramids in Giza and the temples at Karnak and Luxor are all in Egypt; the ziggurats of Assyria and Babylonia, the palaces of ancient Iran, the stupas of India, the temples and palaces of Central and South America). In the era of slavery, the construction of the world's largest fortification, the Great Wall of China, began. The construction of grandiose buildings, overwhelming with the massiveness of structures, was based on enormous expenditures of primitive physical labor. The creation of such structures indicates the accumulation of building experience, the established principles of the composition of the building and the ensemble.