complete the square: Nonlinear Function
Created: February 09, 2014
Modified: March 16, 2022

complete the square

This page is from my personal notes, and has not been specifically reviewed for public consumption. It might be incomplete, wrong, outdated, or stupid. Caveat lector.

Multivariate Completion of Squares

A useful trick: if AA is a symmetric, nonsingular matrix, then

12zTAz+bTz+c=12(z+A1b)TA(z+A1b)+c12bTA1b.\frac{1}{2}z^TAz + b^Tz + c = \frac{1}{2}(z + A^{-1}b)^TA(z + A^{-1}b) + c - \frac{1}{2}b^TA^{-1}b .

This is easy to see just by expanding out the right side.