It is generally assumed that the allocation and synthesis of total cellular resources in microorganisms are uniquely determined by the growth conditions. Adaptation to a new physiological state leads to a change in cell size via reallocation of cellular resources. However, it has not been understood how cell size is coordinated with biosynthesis and robustly adapts to physiological states. We show that cell size in Escherichia coli can be predicted for any steady-state condition by projecting all biosynthesis into three measurable variables representing replication initiation, replication-division cycle, and the global biosynthesis rate. These variables can be decoupled by selectively controlling their respective core biosynthesis using CRISPR interference and antibiotics, verifying our predictions that different physiological states can result in the same cell size. We performed extensive growth inhibition experiments, and discovered that cell size at replication initiation per origin, namely the initiation mass or "unit cell," is remarkably invariant under perturbations targeting transcription, translation, ribosome content, replication kinetics, fatty acid and cell-wall synthesis, cell division, and cell shape. Based on this invariance and balanced resource allocation, we explain why the total cell size is the sum of all unit cells. These results provide an overarching framework with quantitative predictive power over cell size in bacteria.