You're still presupposing that there's a linear (or at least linear enough to be significant amongst the myriad other factors involved) relationship between square footage of house and cost. And that that relationship extends arbitrarily downwards as you reduce the square footage.
It's one of the main factors. And it can be reduced to almost nothing if a small single family housing zone is turned into a skyscraper providing accommodation for thousands