A duplex house is a dwelling comprising two units, usually side-by-side, but sometimes on two different floors. The former often looks like two houses put together, sharing a wall (compare semi-detached); the latter usually appears as a townhouse, but with two different entrances. Duplexes are especially common in the Northeastern United States and urban areas throughout the United States.
The line between an apartment building and a duplex is therefore somewhat blurred, with apartment buildings tending to be bigger, while duplexes are usually the size of a normal house.
Unlike townhomes, in most areas of North America, when purchasing a duplex the entire building is purchased as a single piece of real estate, whereas a townhome is usually purchased by a single unit that is attached to the other unit(s) which are owned by other homeowners. However, in some areas, it is possible for units of a duplex (or triplex or fourplex) to be owned by different owners (see the link below for semi-detached, which is the technical name for this form of housing but in practice is often referred to as duplex).
Especially in dense areas like Manhattan, a duplex apartment refers to a maisonette, a single dwelling unit spread over two floors connected by an indoor staircase. Similarly, a triplex apartment refers to an apartment spread out over three floors. These properties can be quite expensive, and include the most expensive property in Manhattan as of 2006 (according to Forbes Magazine), a triplex atop The Pierre Hotel.
Other major cities use the term duplex, but do not specify the physical relationship between the two dwelling units. Dallas defines the term duplex as "two dwelling units located on a lot. Philadelphia defines a duplex dwelling as "a dwelling occupied as the home or residence of two (2) families, under one (1) roof, each family occupying a single unit.
Other major cities do not use the term duplex in their zoning or Land Use bylaws. San Francisco and Vancouver use the term Two-family dwelling. Winnipeg uses the term Dwelling, two-family. The definitions of these terms do not specify the physical relationship between the two dwelling units in the building. Chicago uses the term Two-flat and defines it as a "residential building that contains 2 dwelling units located on a single lot. The dwelling units must share a common wall or common floor/ceiling.
Where cities do not define the relationship of the dwelling units to one another, units may be built one on top of the other, or one beside the other. The latter arrangement is more specifically referred to as a semi-detached building.