A geometric characterization of the classical Lie algebras