Completing the square using a matrix in quadratic form

PhizKid

New member
Joined
Dec 12, 2013
Messages
1
If I have a symmetric matrix for a given quadratic form, how do I complete the square using this matrix to put the quadratic as the sum and difference of squares?
 
There is NOT necessarily possible to write a quadratic form as a "sum and difference". It is always possible to write a symmetric matrix as either a difference of squares (which can be written as sum and difference) or as a su of squares.

The symmetric matrix \(\displaystyle A= \begin{bmatrix}a & b \\ b & c \end{bmatrix}\) gives the quadratic form \(\displaystyle X^TAX= \begin{bmatrix}x & y \end{bmatrix}\begin{bmatrix}a & b \\ b & c \end{bmatrix}\begin{bmatrix}x \\ y\end{bmatrix}= ax^2+ 2bxy+ cy^2\). Now, because this matrix is symmetric, we know it is "diagonalizable". There exist an invertible matrix, P, and a diagonal matrix, D, such that \(\displaystyle A= P^{-1}DP\) so that we can write \(\displaystyle X^TAX= X^T(P^{-1}DP)X= (X^TP^{-1})D(PX)= Y^TDY\) where Y= PX.

That then gives \(\displaystyle \begin{bmatrix}y_1 & y_2\end{bmatrix}\begin{bmatrix}\lambda_1 & 0 \\ 0 & \lambda_2 \end{bmatrix}\begin{bmatrix}y_1 \\ y_2 \end{bmatrix}= a_1y_1^2+ a_2y_2^2\). Whether that is a difference of squares or a sum of squares depends upon the signs of \(\displaystyle \lambda_1\) and \(\displaystyle \lambda_2\).

Of course, \(\displaystyle \lambda_1\) and \(\displaystyle \lambda_2\) are the eigenvalues of A and the matrix, P, has the eigenvectors of A as columns.
 
You need that A is orthogonally diagonalizable for the above to work, which again is implied by A being symmetric. You must make P orthogonal in order for \(\displaystyle (X^TP^{-1})^T= PX\)
 
Top