Let G be the group M (n, 1) generated by all pseudo-orthogonal transformations and translations of Lorentzian space E n 1 or G = SM (n, 1) is the subgroup of M (n, 1) generated by rotations and translations of E n 1. We describe the correlations between Gram determinant detG(x 1 ,. .. , x m) of the system {x 1 ,. .. , x m } and the number of linearly independent null vectors in the system {x 1 ,. .. , x m }. Using methods of invariant theory and these results, the system of generators of the polynomial ring of all G-invariant polynomial functions of vectors x 1 , x 2 ,. .. , x m in E n 1 is obtained for groups G = M (n, 1) and G = SM (n, 1).