Positive invariant set is an important concept of dynamic systems. The purpose of this paper is to study the sufficient and necessary conditions that the set of ellipsoids and the Lorenz cone are positive invariant sets of discrete time systems. By means of nonlinear programming and induced norm, the problem of positive invariance is formulated as an optimization problem, and the equivalent dual form optimization is also presented using the dual optimization method. Our results provide more alternative methods for determining the positive invariance of quadratic form convex sets from the point of view of optimization and dual optimization. The effectiveness of this method is demonstrated by numerical examples.