Skip to main content

Problem 1.10 Completing the square

Let x,bRnx, b \in \mathbb{R}^n, ASnA \in \mathbb{S}^n, cRc \in \mathbb{R}, and let f(x)f(x) be a quadratic function of xx,

f(x)=xTAx2xTb+c.(1.28)f(x) = x^T A x - 2x^T b + c. \qquad (1.28)

Show that f(x)f(x) can be rewritten in the form

f(x)=(xd)TA(xd)+e,(1.29)f(x) = (x - d)^T A (x - d) + e, \qquad (1.29)

where

d=A1b,(1.30)d = A^{-1}b, \qquad (1.30) e=cdTAd=cbTA1b.(1.31)e = c - d^T A d = c - b^T A^{-1} b. \qquad (1.31)

Rewriting the quadratic function in (1.28) as (1.29) is a procedure known as "completing the square", which is very useful when dealing with products of Gaussian distributions.