And they have to agree, because the column space of the two is the same.

So, what we know then, is that beta 1 hat,

which is Y1 bar, has to equal to gamma 1 hat plus gamma 2 hat.

And beta 2 hat, which is equal to y2 bar, has to equal to gamma 1 hat.

We can use that to now solve for gamma 1 hat and

gamma 2 hat, without actually having to go to the trouble of inverting this matrix.

Now, it's a 2 by 2 matrix, so it shouldn't be that hard to invert.

But let's suppose you had a little bit harder of a setting,

then it would be a little bit harder to invert.

Let's suppose we just had ten columns.

And this is kind of a common trick in these ANOVA type examples where

you can re-parameterize to the easy case where you get a bunch of block diagonal

1 vectors like in the case of x1 in which case x

transpose x works out to be a diagonal matrix, and then very easy to invert.

And then if your want any different reparameterization,

which would result in an x transpose x that's hard to invert,

you can use the fact that you know the fitted values have to be identical

to convert between the parameters after the fact.

So in this case you know that gamma 1 hat has to be equal to beta 2 hat.

And then you know that gamma 2 hat then just plugging in with those

two equations has to be equal to beta1 hat minus beta2 hat.

Okay, and so that gives you a very quick way to go between parameters.

In the equivalent linear models with different specifications,

with just different organization, okay?

So it's a useful trick when you're trying to work with these ANOVA type models.