A duplex is a type of residential building where two separate dwelling units are built together, usually sharing a common wall, and each unit has its own entrance. This is a common type of housing in many countries, and it can be a good solution for families or individuals who want to live close to each other but also want to have their own private sphere.