# Why the representation in the form of $Z'X(X'X)^{-1}X'Z$ can not be simplified into $Z'Z$

Representation similar to $$Z'X(X'X)^{-1}X'Z$$ frequently appear to e.g. 2SLS.

I think that $$Z'X(X'X)^{-1}X'Z = Z'XX^{-1}X'^{-1}X'Z = Z'(XX^{-1})(X'^{-1}X')Z = Z'Z$$. So why it seems that in the context of e.g. 2SLS, the representation can not be simplified? What is the mistake I made?

• How do you make sense of "$X^{-1}$" when $X$ is not a square matrix?
– whuber
Dec 5, 2018 at 14:20

Because $$X$$ is not a square matrix; it has more rows than columns. Typically very very many more.
The matrix $$X'X$$ is invertible if the columns of $$X$$ are linearly independent, but the rows of $$X$$ cannot be linearly independent because there are too many of them in a space of small dimension.