Quadratic function of multiple variables: Difference between revisions
Line 24: | Line 24: | ||
| [[range]] || If the matrix <math>A</math> is not positive semidefinite or negative semidefinite, the range is all of <math>\R</math>.<br>If the matrix <math>A</math> is positive definite or (<math>A</math> is positive semidefinite and <math>\vec{b}</math> is in its image), the range is <math>[m,\infty)</math> where <math>m</math> is the minimum value. If the matrix <math>A</math> is negative definite or (<math>A</math> is negative semidefinite and <math>\vec{b}</math> is in its image), the range is <math>(-\infty,m]</math> where <math>m</math> is the maximum value. || The case of "not positive semidefinite or negative semidefinite" does not arise for <math>n = 1</math>. Moreover, all the semidefinite cases must be definite, so we only have to consider the positive definite case and the negative definite case.<br>The positive definite case corresponds to <math>a > 0</math><br>The negative definite case corresponds to <math>a < 0</math> | | [[range]] || If the matrix <math>A</math> is not positive semidefinite or negative semidefinite, the range is all of <math>\R</math>.<br>If the matrix <math>A</math> is positive definite or (<math>A</math> is positive semidefinite and <math>\vec{b}</math> is in its image), the range is <math>[m,\infty)</math> where <math>m</math> is the minimum value. If the matrix <math>A</math> is negative definite or (<math>A</math> is negative semidefinite and <math>\vec{b}</math> is in its image), the range is <math>(-\infty,m]</math> where <math>m</math> is the maximum value. || The case of "not positive semidefinite or negative semidefinite" does not arise for <math>n = 1</math>. Moreover, all the semidefinite cases must be definite, so we only have to consider the positive definite case and the negative definite case.<br>The positive definite case corresponds to <math>a > 0</math><br>The negative definite case corresponds to <math>a < 0</math> | ||
|- | |- | ||
| [[local minimum value]] and points of attainment || If the matrix <math>A</math> is | | [[local minimum value]] and points of attainment || If the matrix <math>A</math> is negative definite, then <math>c - \frac{1}{4}\vec{b}^TA^{-1}\vec{b}</math>, attained at <math>\frac{-1}{2}A^{-1}\vec{b}</math><br>If <math>A</math> is positive semidefinite but not positive definite, it depends on whether <math>\vec{b}</math> is in the image of <math>A</math>. If yes, replace <math>A^{-1}\vec{b}</math> with the solution <math>\vec{v}</math> to <math>A\vec{v} = \vec{b}</math>, so we get a local minimum of <math>c - \frac{1}{4}\vec{b}^T\vec{v}</math> attained at <math>\frac{-1}{2}\vec{v}</math><br>If <math>A</math> is not positive semidefinite or if <math>\vec{b}</math> is not in the image of <math>A</math>, no local minimum value || The positive definite case corresponds to <math>a > 0</math>: Here, the local minimum value of <math>c - \frac{b^2}{4a}</math> is attained at <math>\frac{-b}{2a}</math> (consistent with the matrix formulation)<br>The negative definite case corresponds to <math>a < 0</math>, and there is no minimum in this case. | ||
|- | |- | ||
| [[local maximum value]] and points of attainment || If the matrix <math>A</math> is negative semidefinite, then <math>c - \frac{1}{4}\vec{b}^TA^{-1}\vec{b}</math>, attained at <math>\frac{-1}{2}A^{-1}\vec{b}</math><br>If <math>A</math> is negative semidefinite but not negative definite, it depends on whether <math>\vec{b}</math> is in the image of <math>A</math>. If yes, replace <math>A^{-1}\vec{b}</math> with the solution <math>\vec{v}</math> to <math>A\vec{v} = \vec{b}</math>, so we get a local minimum of <math>c - \frac{1}{4}\vec{b}^T\vec{v}</math> attained at <math>\frac{-1}{2}\vec{v}</math><br>If <math>A</math> is not positive semidefinite or if <math>\vec{b}</math> is not in the image of <math>A</math>, no local minimum value || The negative definite case corresponds to <math>a < 0</math>: Here, the local maximum value of <math>c - \frac{b^2}{4a}</math> is attained at <math>\frac{-b}{2a}</math> (consistent with the matrix formulation)<br>The positive definite case corresponds to <math>a > 0</math>, and there is no maximum in this case. | | [[local maximum value]] and points of attainment || If the matrix <math>A</math> is negative semidefinite, then <math>c - \frac{1}{4}\vec{b}^TA^{-1}\vec{b}</math>, attained at <math>\frac{-1}{2}A^{-1}\vec{b}</math><br>If <math>A</math> is negative semidefinite but not negative definite, it depends on whether <math>\vec{b}</math> is in the image of <math>A</math>. If yes, replace <math>A^{-1}\vec{b}</math> with the solution <math>\vec{v}</math> to <math>A\vec{v} = \vec{b}</math>, so we get a local minimum of <math>c - \frac{1}{4}\vec{b}^T\vec{v}</math> attained at <math>\frac{-1}{2}\vec{v}</math><br>If <math>A</math> is not positive semidefinite or if <math>\vec{b}</math> is not in the image of <math>A</math>, no local minimum value || The negative definite case corresponds to <math>a < 0</math>: Here, the local maximum value of <math>c - \frac{b^2}{4a}</math> is attained at <math>\frac{-b}{2a}</math> (consistent with the matrix formulation)<br>The positive definite case corresponds to <math>a > 0</math>, and there is no maximum in this case. |
Revision as of 03:41, 26 May 2014
Definition
Consider variables . A quadratic function of the variables is a function of the form:
In vector form, if we denote by the column vector with coordinates , then we can write the function as:
where is a matrix with entries and is the column vector with entries .
Note that the matrix is non-unique: if then we could replace by . Therefore, we could choose to replace by the matrix and have the advantage of working with a symmetric matrix.
Key data
For the discussion here, assume that has been made a symmetric matrix.
Item | Value | Consistency with the case , where , (a matrix), (a 1-dimensional vector) |
---|---|---|
default domain | the whole of | the whole of |
range | If the matrix is not positive semidefinite or negative semidefinite, the range is all of . If the matrix is positive definite or ( is positive semidefinite and is in its image), the range is where is the minimum value. If the matrix is negative definite or ( is negative semidefinite and is in its image), the range is where is the maximum value. |
The case of "not positive semidefinite or negative semidefinite" does not arise for . Moreover, all the semidefinite cases must be definite, so we only have to consider the positive definite case and the negative definite case. The positive definite case corresponds to The negative definite case corresponds to |
local minimum value and points of attainment | If the matrix is negative definite, then , attained at If is positive semidefinite but not positive definite, it depends on whether is in the image of . If yes, replace with the solution to , so we get a local minimum of attained at If is not positive semidefinite or if is not in the image of , no local minimum value |
The positive definite case corresponds to : Here, the local minimum value of is attained at (consistent with the matrix formulation) The negative definite case corresponds to , and there is no minimum in this case. |
local maximum value and points of attainment | If the matrix is negative semidefinite, then , attained at If is negative semidefinite but not negative definite, it depends on whether is in the image of . If yes, replace with the solution to , so we get a local minimum of attained at If is not positive semidefinite or if is not in the image of , no local minimum value |
The negative definite case corresponds to : Here, the local maximum value of is attained at (consistent with the matrix formulation) The positive definite case corresponds to , and there is no maximum in this case. |
gradient vector function (analogous to the derivative) | the derivative is (consistent with the matrix formulation) | |
Hessian matrix (analogous to the second derivative) | (constant matrix-valued function) | the second derivative is the constant function (consistent with the matrix formulation) |
Differentiation
Partial derivatives and gradient vector
The partial derivative with respect to the variable , and therefore also the coordinate of the gradient vector, is given by:
In terms of the matrix and vector notation, the gradient vector, expressed as a column vector, is:
In the case that is a symmetric matrix, this simplifies to:
Hessian matrix
The Hessian matrix of the quadratic function is the matrix . In the case that is symmetric, this simplifies to .
Higher derivatives
All the higher derivative tensors are zero.
Cases
For the discussion of cases, assume that is a symmetric matrix. If is not symmetric, replace it by the symmetric matrix .
Positive definite case
First, we consider the case where is a symmetric positive definite matrix. In other words, we can write in the form:
where is a invertible matrix.
We can "complete the square" for this function:
In other words:
This is minimized when the expression whose norm we are measuring is zero, so that it is minimized when we have:
Simplifying, we obtain that we minimum occurs at:
Moreover, the value of the minimum is: