# Rank of an expression in Linear Model (Reference Searle)

Linear model in matrix form is

$\mathbf{y}=\mathbf{X}\beta+\epsilon\textrm{ where }\epsilon\sim\mathbb{N}\left(0,\sigma^{2}\mathbf{I}\right).$

If $\mathbf{K}^{\prime}\left(\mathbf{X}^{\prime}\mathbf{X}\right)^{-} \mathbf{K}$ is nonsingular, then

$\textrm{rank}\left[\mathbf{K}^{\prime}\left(\mathbf{X}^{\prime}\mathbf{X}\right)^{-} \mathbf{K}\right] = \textrm{rank}\left(\mathbf{K}^{\prime}\right).$ (From Linear Models by Searle)

I'm struggling to understand the last expression invloving ranks. Is this a result of any theorem? I'd highly appreciate if you explaing this to me. Thanks

Suppose $\mathbf{K}$ is a $p\times k$ matrix. $\mathbf{K}'(\mathbf{X}'\mathbf{X})^-\mathbf{K}$ is $k\times k$ and by hypothesis is nonsingular, so it has rank $k$. Now consider the rank of $\mathbf{K}'$. If it were less than $k$, then the rank of $\mathbf{K}'(\mathbf{X}'\mathbf{X})^-\mathbf{K}$ would also be less than $k$, since the rank of a product of matrices is no greater than the rank of any one of the matrices. Thus the rank of $\mathbf{K}'$ cannot be less than $k$. But it also can't be greater than $k$, since the rank of a matrix can't be greater than its least dimension. So the rank of $\mathbf{K}'$ is also $k$, and you have your result.