A kancha is an Inca rectangular or trapezoidal walled enclosure composed of single-room buildings that face onto a common open courtyard or inner patio in the middle of the enclosure. Kanchas are widespread in the Inca Empire and normally have only one entrance gate. An Inca kancha includes constructions intended for a single function: housing, temples, palaces.  In Cusco, the capital of the Empire there existed many kanchas, among them the Coricancha, the Sun temple, the Hatunkancha that housed  the house of the acclas (chosen women of the sun) and Amarukancha, the large hall facing the main square called Huakaypata. Other notable kanchas are found   in Ollantaytambo and Patallaqta. 

Kanchas could have quite different sizes ranging from a large city block to a small enclosure. Also the number of buildings within a kancha varies, including up to eight or more structures. Kanchas were sometimes laying side by side forming a larger unit, or a block. These were generally surrounded by streets or alleys and the entrances to single kanchas would lay on different sides.

While remains of kanchas are found in all the settlements in the territory of the Inca Empire, the best preserved examples are found in Ollantaytambo which, although modified, are still inhabited.

The origin of kanchas may have derived from pre-Inca coastal architecture, especially from the Chimú culture, which flourished between 900 CE and the conquest by the Inca emperor Topa Inca Yupanqui around 1470 or from the Wari culture which developed in the south-central Andes and coastal area of modern-day Peru, from about 500 to 1000 CE.

The name kancha is a Quechua term meaning patio or courtyard bordered by a wall. In modern Spanish the term  refers to a sport playground such as for football or tennis, recalling the enclosed space.

Layout and distribution
The presence of kanchas was ubiquitous in Cusco and in other Inca settlements. Some of them were regarded as "palaces" by the Spanish chroniclers. Among them Bernabé Cobo stated «the main houses of the caciques (native lords) […] had large patios − where the townspeople gathered to drink during their festivals and celebrations − and more rooms».

The Inca people gave great importance to open spaces for their social life. Even the first Quechua dictionaries by Santo Tomás and González Holguín have different words for open spaces:  to describe an open, common space translated into Spanish as 'plaza' or a place where there are no houses or a space for eating, drinking and merrymaking;  normally referred to a terrace, an andén or an elevated area, and finally "kancha" with the meaning of space delimited by buildings

The most sacred temple in Cusco the Coricancha (also spelled  Kancha) meaning the golden enclosure was in its layout a kancha, the one with the highest symbolic hierarchy: an area of about  enclosed by a stone wall with a central patio bordered by six single room shrines, each of them dedicated to a god of the Inca pantheon. It served as a model for the temples in other planned Inca settlements.
Also the Cusco palaces built in the sacred part of the city, that was between the two rivers Saphi and Tullumayo, large kanchas were positioned having the extension of a city block. A single gate gave access to each compound providing also adequate security. 

Despite important modifications carried out by the Spaniards by splitting into smaller properties and opening of more access gates, extensive remains of the fine stonework enclosing walls are found in Cusco. Many colonial buildings in Cusco have a lower floor which is the original Inca building and a first floor with a balcony or loggia built according to the Spanish tradition representing the stratification which allows for cultural continuity in the Cusco architecture.

In various archaeological sites there are remains of building groups that show the layout of a kancha. Sometimes these are well defined, with enclosure walls and a single entrance, other times, where there is no evidence of the enclosing wall, the remains of two, three, or more separate one-room buildings stand around a patio. In Patallaqta, for example, there are repetitive groups formed by two small houses, one in front of the other, looking towards a patio; groups of three rectangular constructions arranged as a U around a patio; and finally, groups of four one-room buildings that form a quadrangular courtyard. This type of arrangement is very frequent in the roundabouts of Cusco in the settlements of the Urubamba river valley (Sacred valley), but the same characteristic is also repeated in settlements far away from the capital.

It can be stated that the rectangular kancha layout was the basic of the Inca living space both for family needs and for palaces and temples. Thus it remains a challenge for archaeologist to understand, when discovering new kancha-like structures to understand what their functions were. The function of the hundreds of kanchas in Huánuco Pampa is still a puzzle for archaeologists

Origin of kanchas
It has been suggested  That the origin of kanchas may derive from pre-Inca coastal architecture, especially from the Chimú culture, which flourished between 900 CE and the conquest by the Inca emperor Topa Inca Yupanqui around 1470 or from the Wari culture which developed in the south-central Andes and coastal area of modern-day Peru, from about 500 to 1000 CE. The northern pre-Inca kanchas have an enclosure wall but a different internal layout. 

Hyslop underlines that the Cusco kanchas were developed before a contact between the Incas and the Chimu civilization was established and he sees «little solid proof to suggest that the origins of the kancha are to be found on the north coast».

Hyslop suggests another possible origin: the rectangular enclosures and the grid arrangement are found in the per-Inca Wari culture in the southern Peruvian Andes, close to Cusco. The Incas modified the Wari model e.g. building lower walls, before distributing them as a typical Inca architecture form, in all the Inca empire.

Kanchas in Ollantaytambo

The best-preserved example of kanchas is found in the planned settlement of Ollantaytambo.
Each rectangular block is surrounded by alleyways on all four sides and contains two completely independent kancha units with a single entrance for each unit facing opposite streets.
The two units repeat symmetrically the same layout: they consist of four rooms placed around a patio. The only entrance gives access to a construction that today, in all the sets, is the most destroyed. In the patio, two equal rooms, one facing the other are found and, in the background, the main house with barn has a dividing wall that separates one housing unit from the other. Consequently, only one of the two slopes of the roof of the house corresponds to one of the housing units.
The entrance gate to the kancha have double jambs, and the doors of the rooms around the patio have monolithic lintels. Both kinds of gates have a remarkable  height.
These measures, together with the quality of the stonework, do not allow to classify these constructions as rural houses, but nothing is known as the hierarchical level of its original inhabitants is concerned. 
Today, although partly modified, without their imposing thatched roofs and deteriorated, they are inhabited by peasant families from Ollantaytambo, making this probably the oldest case of continuous occupation in all of South America.

See also
 Inca architecture
 Kallanka
 Tambo
 Qullqa
 Pukara
 Ushnu

References

Inca
Architectural history
Architectural styles
Archaeological sites in Peru
Pre-Columbian architecture