A duplex is a type of housing where a single building contains two single-family homes. It is different from a townhouse, which shares its walls with more than one other unit, and a house, which shares no common walls with any other dwelling. Some duplexes have upstairs and downstairs units while others are side by side. The term “duplex” may in some cases be extended to three- or four-unit dwellings as well. These are more properly known as triplexes or quadruplexes but are sometimes lumped in with duplexes. However, the term duplex comes from “duo,” meaning “two,” so the term is properly reserved for double-unit buildings. Synonyms used in some areas include two-family dwelling and two-flat. In dense urban areas, the term duplex may be used to describe a dwelling with two stories within a larger building as opposed to two separate homes.