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 A=[abbc]\displaystyle A= \begin{bmatrix}a & b \\ b & c \end{bmatrix} gives the quadratic form XTAX=[xy][abbc][xy]=ax2+2bxy+cy2\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 A=P1DP\displaystyle A= P^{-1}DP so that we can write XTAX=XT(P1DP)X=(XTP1)D(PX)=YTDY\displaystyle X^TAX= X^T(P^{-1}DP)X= (X^TP^{-1})D(PX)= Y^TDY where Y= PX.

That then gives [y1y2][λ100λ2][y1y2]=a1y12+a2y22\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 λ1\displaystyle \lambda_1 and λ2\displaystyle \lambda_2.

Of course, λ1\displaystyle \lambda_1 and λ2\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 (XTP1)T=PX\displaystyle (X^TP^{-1})^T= PX
 
Top