Skip to main content

Problem 1.10 Completing the square

Let x,b∈Rnx, b \in \mathbb{R}^n, A∈SnA \in \mathbb{S}^n, c∈Rc \in \mathbb{R}, and let f(x)f(x) be a quadratic function of xx,

f(x)=xTAx−2xTb+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)=(x−d)TA(x−d)+e,(1.29)f(x) = (x - d)^T A (x - d) + e, \qquad (1.29)

where

d=A−1b,(1.30)d = A^{-1}b, \qquad (1.30) e=c−dTAd=c−bTA−1b.(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.