A determinant formulation of the Cauchy-Schwarz inequality