A duplex is a building which must meet the same size restrictions as a single family dwelling but which contains two separate dwelling units. The dwelling units are often placed side-by-side with a common wall; however, they can also be built front-to-back or stacked vertically, which can enable them to fit on narrower lots. Duplexes may include a backyard and a garage for each unit. Duplexes can be built to have the appearance of single unit dwellings.