Linear Regression, Residual Sum of Squares

Suppose the columns of a rank 4 design matrix

come in three groups

Group 1: ,

Group 2: and

Group 3: so that if i and j are indicies from different groups.

Next consider 4 models, with design matricies:

Model 1:

Model 2:

Model 3:

Model 4:

Now then the question asks to show that where is the residual sum of squares (SS error) for the ith model.

is the only formula for SS error that I know, which I believe does not apply in this situation. So it means that I'm absolutely stuck! I think I'm looking at this the wrong way to be honest. Where should I look into? Any hints?