Let U(n,Q)be the group of all n x n(upper)unitriangular matrices over rational numbers field Q.Let S be a subset of U(n,Q).In this paper,we prove that S is a subgroup of U(n,Q)if and only if the(i,j)-th entry Sij satisfies some condition(see Theorem 3.5).Furthermore,we compute the upper central series and the lower central series for S,and obtain the condition that the upper central series and the lower central series of S coincide.