For mat size, I am listing the official competition mat sizes as a reference to help you assess the difference between practicing throws and takedowns and practicing ground techniques: keep in mind that these are large competition areas meant to minimize out-of-bound stoppages and injury risks, and they are a reasonable upper bound for a mat used by two people. For a lower bound I would advise not to go below 3mx3m for ground work though, 4mx4m for throws.
Here are the official sizes:
- Competition Judo mat is squared: outer square side 14m-16m, inner square side 8m-10m.
- Competition BJJ mat is squared: outer square side 8m-10m, inner square side 6m-8m.
- Competition Wrestling mat has an inner circle, an outer circle and outer big square: outer square side 12m, outer circle diameter 9m, inner circle diameter 7m.
For mat construction of both the floor and side panels, you might want to consider these three layers, starting from lowest:
an optional shock absorbtion layer, in order to minimize training injuries from throws. This one (another example) is a cheap and effective solution: it is made of tires and plywood. There is another way that uses foam blocks instead of tires (source, video).
a mandatory soft layer, which is the essential layer of your mat. They are usually made of some kind of foam 40mm-50mm thick, there is a wide variety of types; you can find a good discussion here.
an optional cover for marking areas, good grip, soft layer protection, continuity between soft layer blocks, easy cleaning. They are usually made of vinyl.
Make sure to check out this video, it shows pretty much everything said.