In this paper, we improve two known invariant subspace theorems. More specifically, we show that a closed linear subspace M in the Hardy space H p ( D ) ( 1 ≤ p < ∞ ) is invariant under the shift operator M z on H p ( D ) if and only if it is hyperinvariant under M z , and that a closed linear subspace M in the Lebesgue space L 2 ( ∂ D ) is reducing under the shift operator M e i θ on L 2 ( ∂ D ) if and only if it is hyperinvariant under M e i θ . At the same time, we show that there are two large classes of invariant subspaces for M e i θ that are not hyperinvariant subspaces for M e i θ and are also not reducing subspaces for M e i θ . Moreover, we still show that there is a large class of hyperinvariant subspaces for M z that are not reducing subspaces for M z . Furthermore, we gave two new versions of the formula of the reproducing function in the Hardy space H 2 ( D ) , which are the analogue of the formula of the reproducing function in the Bergman space A 2 ( D ) . In addition, the conclusions in this paper are interesting now, or later if they are written into the literature of invariant subspaces and function spaces.