Linear functions and quadratic forms
Summary
Linear function of several variables
- \(f\) is a real valued function of \(m\) variables \(x_1, \ldots ,x_m\) , \(f:R^m→R\) .
- Definition: linear function. We say that
\[f\left( x_1, \ldots ,x_m \right)=a_1x_1+ \ldots +a_mx_m=\sum_{i=1}^{m}{ a_ix_i }\]
- is a linear function (linear in all variables) if \(a_1, \ldots ,a_m\) are \(m\) constants.
- Define \(x={\left( x_1, \ldots ,x_m \right)}'\) and \(a={\left( a_1, \ldots ,a_m \right)}'\) as \(m×1\) vectors. We can write
\[f\left( x \right)=a'x\]
Quadratic forms
- \(f\) is a real valued function of \(m\) variables \(x_1, \ldots ,x_m\) , \(f:R^m→R\) .
- Definition: quadratic form. We say that
\[f\left( x \right)=x'Ax\]
- is a quadratic form if \(A\) is a square \(m×m\) matrix. \(x={\left( x_1, \ldots ,x_m \right)}'\) is \(m×1\) and \(f\left( x \right)\) is a scalar.
- Example. If \(A\) is the identity matrix and \(m=2\) then
\[f\left( x_1,x_2 \right)=x_1^2+x_2^2\]
- Example. If \(m=2\) and
\[A=\begin{bmatrix}a_{1,1} & a_{1,2} \\ a_{2,1} & a_{2,2}\end{bmatrix}\]
- then
\[f\left( x_1,x_2 \right)=a_{1,1}x_1^2+a_{2,2}x_2^2+\left( a_{1,2}+a_{2,1} \right)x_1x_2\]
- Example. The quadratic form \(f\left( x_1,x_2 \right)=x_1^2+x_2^2+2x_1x_2\) may equally well be represented by the matrices
\[\begin{bmatrix}1 & 2 \\ 0 & 1\end{bmatrix} \textrm{ or } \begin{bmatrix}1 & 0 \\ 2 & 1\end{bmatrix} \textrm{ or ...} \]
- We always pick the symmetric representation
\[A=\begin{bmatrix}1 & 1 \\ 1 & 1\end{bmatrix}\]
- For the quadratic form \(f\left( x \right)=x'Ax\) we have
- \(A\) is positive definite: \(f\left( x \right)>0\) for all \(x≠0\)
- \(A\) is negative definite: \(f\left( x \right)<0\) for all \(x≠0\)
- \(A\) is positive semidefinite: \(f\left( x \right)≥0\) for all \(x\)
- \(A\) is negative semidefinite: \(f\left( x \right)≤0\) for all \(x\)
- \(A\) is indefinite: \(f(x)\) may take values of different sign