# Matrix transformation

Let an expression $$X^T AX+B^TX$$, how can I transform it as $$Y^T C Y$$; where $$Y=[X, 1]$$, find $$C$$ in terms of $$A$$ and $$B$$ using Mathematica?

• $C=A+(X^t)^{-1}B^t$? – AccidentalFourierTransform Jul 1 at 12:44
• C will be only in term of A and B. – user199 Jul 1 at 13:11
• Impossible. Your first expression has non-zero derivative at X=0, while your second does not. They are not equal, unless $C=C(X)$. – AccidentalFourierTransform Jul 1 at 13:13
• @AccidentalFourierTransform edited. – user199 Jul 1 at 13:41
• $$C=\begin{pmatrix}A&\frac12B\\\frac12B^t&0\end{pmatrix}?$$ – AccidentalFourierTransform Jul 1 at 14:08