For a nilpotent group G without π-torsion, and x, y∈G, if xn=yn for a π-number n, then x=y; if xmyn=ynxm for π-numbers m, n, then xy=yx. This is a well-known result in group theory. In this paper, we prove two analogous theorems on matrices, which have independence significance. Specifically, let m be a given positive integer and A a complex square matrix satisfying that (i) all eigenvalues of A are nonnegative, and (ii) rankA2=rankA; then A has a unique m-th root X with rankX2=rankX, all eigenvalues of X are nonnegative, and moreover there is a polynomial f(λ) with X=f(A). In addition, let A and B be complex n×n matrices with all eigenvalues nonnegative, and rankA2=rankA, rankB2=rankB; then (i) A=B when Ar=Br for some positive integer r, and (ii) AB=BA when AsBt=BtAs for two positive integers s and t.