Projection of symmetric positive definite matrix onto an affine subspace Let $b \in \mathbb{R}^n$, $c > 0$ and
$$\mathcal{M} := \{X\in \mathbb{R}^{n\times n} \mid b^{\top}Xb = c \}$$ 
Let $\mathcal{S}_n$ be the set of real $n \times n$ symmetric positive definite (SPD) matrices and $Q \in \mathcal{S}_n$. Let $\tilde{Q}$ be the projection of $Q$ onto $\mathcal{M}$. I want to know if $\tilde{Q}$ is still SPD. 
I suspect it is not necessarily so, and in that case I would like to have an analytical expression for $\hat{Q}$, the projection of $Q$ onto $\mathcal{M} \cap \mathcal{S}_n$. Thanks!
 A: Arin's answer is of course correct! Let's derive the formulate for the projection nevertheless. We will assume $b\neq 0$. The projection you're looking for is:
$$\hat{Q} = \mathop{\textrm{arg}\,\textrm{min}}_{X : b^T X b = c} \tfrac{1}{2} \|X-Q\|_F^2$$
The $\tfrac{1}{2}$ multiplier, and even the use of the squared norm, do not change the result but they do simplify the derivation. The Lagrangian is
$$L(X,\lambda) = \tfrac{1}{2} \langle X - Q, X - Q \rangle + \lambda ( c - b^TXb)$$
The optimality conditions are
$$X - Q - \lambda bb^T = 0, \quad b^TXb = c$$
Substituting for $X$ in the second equation gives
$$b^T(Q+\lambda bb^T)b = c \quad\Longrightarrow\quad \lambda = \frac{c - b^TQb}{(b^Tb)^2}$$
So we have
$$\tilde{Q} = Q + \frac{c-b^TQb}{(b^Tb)^2} bb^T$$
I'd say this makes intuitive sense: you add to $Q$ a multiple of $bb^T$ as needed to drive the quantity $b^T\tilde{Q}b$ to the correct value.
A: It is easy to show by a counterexample that $\tilde{Q}$ will not be SPD in general.
Let $Q = \begin{pmatrix} 2 & \sqrt{3} \\ \sqrt{3} & 2 \end{pmatrix}$, $b = \begin{pmatrix} 1 \\ 0 \end{pmatrix}$, and $c=1.$ $\mathcal{M} = \{ X \in \mathbb{R}^{2\times 2} :x_{11} = 1\}.$  So $\tilde{Q} = \begin{pmatrix} 1 & \sqrt{3} \\ \sqrt{3} & 2\end{pmatrix}$ which is clearly not SPD as $\det \tilde{Q} < 0.$
