Is $R(X'X)^- R'$ always invertible? I'm thinking about the problem of the restricted least squares:
$$
\min_\beta (y-X\beta)'(y-X\beta) + 2\lambda'(R\beta-r),
$$
where $y \in \mathbb{R}^n$, $X \in \mathbb{R}^{n\times k}$, $\beta \in \mathbb{R}^k$, $R \in \mathbb{R}^{q\times k}$, and $r \in \mathbb{R}^q$. Of course, there are fewer than $k$ constraints on $\beta$, so $q < k$ and $\mathrm{rank}(R)=q$. Textbooks and papers comfortably write the solution
$$
\widehat{\beta}_r = \widehat{\beta} - (X'X)^- R'[R(X'X)^- R']^{-1}(R\widehat{\beta} - r),
$$
where $\widehat{\beta}$ is the OLS estimator $(X'X)^- X'y$. The question is whether $R(X^\prime X)^- R^\prime$ is always invertible. $X^\prime X$ doesn't have to be invertible hence the generalized inverse $(X^\prime X)^-$.

Edit: What I did
Two assumptions:

*

*$R$ is full row rank.

*$R\beta$ is estimable. That is, $R(X^\prime X)^-X^\prime X = R$.

I tried to approach this question through rank. For notational convenience, write the generalized inverse as $G$, i.e., $G := (X^\prime X)^-$.
Using the inequality $r(AB) \leq \min\{r(A), r(B)\}$ for conformable matrices $A$ and $B$,
$$\begin{align*}r(R) &= r(RGX^\prime X) \leq \min\{ r(RG), r(X^\prime X)\} \leq r(RG)\\ r(RG) &\leq \min(r(R), r(G)) \leq r(R). \end{align*}$$ $\therefore r(R) = r(RG)$.
I don't know where to go from here. $RGR^\prime$ should always be nonsingular if $R\beta$ is estimable, according to the problem.
 A: to accommodate an arbitrary generalized inverse, here is a somewhat unpleasant blocked argument:
via orthogonal diagonalization, we may assume WLOG that
$X^TX = \begin{bmatrix} D_m &\mathbf {0}\\ \mathbf {0} &\mathbf {0}\end{bmatrix}$
with $D_m$ being a $m\times m$ diagonal matrix with positive entries on the diagonal
and the pseudo-inverse obeys
$(X^TX)(X^TX)^{-}(X^TX)=(X^TX)=\begin{bmatrix} D_m &\mathbf {0}\\ \mathbf {0} &\mathbf {0}\end{bmatrix}$
letting $M$ be the $m\times m$ leading principal submatrix of $(X^TX)^{-}$, this implies
$D_mMD_m = D_m\implies M = D_m^{-1}$

note: $R= R(X^TX)^{-}(X^TX)$.  By taking the ranks we know $q\leq m$ i.e.
$q=\text{rank}\Big(R(X^TX)^{-}(X^TX)\Big)\leq \text{rank}\Big((X^TX)\Big) = m$

using the identity once more
$R = R(X^TX)^{-}(X^TX) = R\begin{bmatrix} I_m &\mathbf {0}\\* &\mathbf {0}\end{bmatrix}$
where $R$ has $q$ rows all of which are linearly independent-- this implies column vector $\mathbf r_{j}=\mathbf 0$ for $j\gt m$.
i.e. we have  $R=  \begin{bmatrix} R_m &\mathbf {0}\\\end{bmatrix}$, where $R_m$ is $q\times m$ and has rank $q$
finally
$R(X^TX)^{-}R^T = \begin{bmatrix} R_m &\mathbf {0}\\\end{bmatrix}\begin{bmatrix} D_m^{-1} &*\\* &*\end{bmatrix}\begin{bmatrix} R_m^T \\ \mathbf {0}\\\end{bmatrix}=\begin{bmatrix} R_m D_m^{-1}R_m^T &*\\* &*\end{bmatrix}$
the leading $m\times m$ principal submatrix is diagonalizable with the same non-zero eigenvalues as the diagonalizable matrix $D_m^\frac{-1}{2} R_m^TR_m D_m^\frac{-1}{2}$ (and hence their rank's are the same) which is congruent to $R_m^TR_m$ which has the same rank as $R_m$, i.e. rank of q.  So putting this all together we have
$q \leq \text{rank}\Big(R(X^TX)^{-}R^T\Big)\leq \text{rank}\Big(R\Big)=q$
addendum
a shorter approach, assuming generalized inverse refers to Moore-Penrose inverse:
is to note  $X^T X$ is symmetric PSD, as is its pseudo inverse, using this we can see
$R(X^T X)^-X^T X = R\implies  X^T X(X^T X)^-R^T  = R^T$
since the columns of $R^T$ are linearly independent, we know
$X^T X(X^T X)^-R^T\mathbf v  = R^T\mathbf v = \mathbf 0\implies \mathbf v =\mathbf 0$
Now for any $\mathbf v \neq \mathbf 0$
$R^T\mathbf v \not\in \ker:(X^T X)^-\implies R^T\mathbf v \not\in \ker:\Big((X^T X)^{-}\Big)^{\frac{1}{2}}\implies \Big\Vert\Big((X^T X)^{-}\Big)^{\frac{1}{2}}R^T\mathbf v\Big\Vert_2^2\gt 0$
i.e. the right hand side says
$0\lt \mathbf v^T \Big(R(X^T X)^{-}R^T\Big)\mathbf v \implies \Big(R(X^T X)^{-}R^T\Big)\succ \mathbf 0$
hence $\Big(R(X^T X)^{-}R^T\Big)$ is invertible
