You might well be interested in my answer to this questionthis question, as it details minimum requirements. In it, I do some calculation to find out that to feed one average human for a year, you need 5110 potatoes and 460 square metres of space.
That takes care of one year, but if you plant potatoes again the next year you need to plant them somewhere different next year. That means you need 920 square metres per person per two years. You can cycle between two different locations with potatoes so that's all you'll need. So:
There are $ 1000^2 = 1,000,000 $ square metres in one square kilometre.
There are $ \frac{1,000,000}{920} = 1086.9565 $ 920-square-metre plots in a square kilometre, so you'd just about squeeze 1087.
So, you can feed a maximum of 1087 people per square kilometre (ppsk) if they all live on nothing but potatoes. You would of course also need living space for all of them.
That gives a bit of an estimate to what you can do. Let's compare that with population and see what the ratio of living space to farmland is.
A decent size, single person house is around 50 square metres floor space. If you have 1087 people and a square kilometre of farmland, that means you're going to need:
$$ 1087 \times 50 = 54350 $$
square metres of living space. That's 0.054 square kilometres. Therefore the ratio is:
$$ \text{farmland} : \text{ living land} $$ $$ 1 : 0.054 $$ $$ 18.8 : 1 $$
That's quite a large space requirement. If you have a 5km radius city, it needs a 21km wide farming zone around it to fully support all its inhabitants. This is possible, but inefficient - this is why much of our food is imported from other countries with lower population and more farming space.