The classical Bonnet-Myers theorem states that positive section curvature or positive Ricci curvature controls the scale of a manifold. In general, we do not have such kind of theorem for positive scalar curvature. However, Gromov raised an inequality on cubes that positive scalar curvature controls the scale of the cube in some sense. In this talk, I will discuss the cube inequality and its proof. We proved the inequality for all dimensions with the best constant using a index theoretical approach. This is a joint work with Zhizhang Xie and Guoliang Yu.