The M-P inverse of the design matrix for a balanced factorial design with interactions can be computed by an iterative procedure using the M-P inverse of a partitioned matrix. From this result we can easily obtain the projection matrix P_X=XX^+ of the model y=Xβ+ε. Also matrices that result at each iteration are useful to compute sums of squares in analysis of variance. To obtain the projection matrix and sums of squares it is not necessary to compute any inversion of matrices but they can be obtained by multiplications of matrices.