For me, the minimum would be 5 Gal, though I keep mine in a 7.4 Gal (so I voted for 8 gal).
I used to keep him in a 15L (about 4 Gal) Baby BiOrb and I found it to be rather small for him, though I daresay I don't think the shape helped. Since I put him in his new tank, his behaviour has improved dramatically, from occasionally swimming around the tank and spending most of the time on the substrate to swimming around actively most of the time exploring the plants & decor. I wouldn't like to think of one in a tank much smaller than mine, so it's a 5 gal for me.
I can see how they might be alright in a regular rectangular 3 Gal, though I don't think I personally would do it having seen my bettas behaviour in a larger tank.