Quadratic function of multiple variables

From Calculus

Definition

Consider variables x1,x2,,xn. A quadratic function of the variables x1,x2,,xn is a function of the form:

(i=1nj=1naijxixj)+(i=1nbixi)+c

In vector form, if we denote by x the column vector with coordinates x1,x2,,xn, then we can write the function as:

xTAx+bTx+c

where A is the n×n matrix with entries aij and b is the column vector with entries bi.

Key data

Item Value
default domain the whole of Rn
range If the matrix A is not positive semidefinite or negative semidefinite, the range is all of R.
If the matrix A is positive semidefinite, the range is [m,) where m is the minimum value. If the matrix A is negative semidefinite, the range is (,m] where m is the maximum value.

Cases

Positive definite case

First, we consider the case where A is a positive definite matrix. In other words, we can write A in the form:

A=MTM

where M is a n×n invertible matrix.

We can "complete the square" for this function:

f(x)=(Mx+12(MT)1b)T(Mx+12(MT)1b)+(c14bTMb)

In other words:

Failed to parse (syntax error): {\displaystyle f(\vec{x}) = \left \| M\vec{x} + \frac{1}{2}(M^T)^{-1}\vec{b}\right \|^2 + (c - \frac{1}{4}\vec{b}^TM\vec{b}\right)}