A duplex generally is a row house which contains two living units, each with their own external entrances and balconies. A triplex has three living units.

When my family lived in Montreal many decades ago, we occupied the second story unit of a duplex, with a nice Italian-Canadian landlord in the unit below.

Cheers