First we have to express the quadratic form in terms of a symmetric matrix (A) so that it is equivalent to xTAx.
A is 2x2, where A11 is the coefficient of x12, A22 is the coefficient of x22, and the two off-diagonal entries are each equal to half of the x1x2 coefficient:
[4 2] =. A
We eliminate the cross term by diagonalizing A (i.e. change to the eigenvector basis). Start by finding the eigenvalues:
(2-λ)2-16 = 0
λ2-4λ-12 = 0
λ1= 6; λ2= -2
When the product of the eigenvalues is negative, the quadratic form represents a hyperbola. (A positive product represents an ellipse, and 0 is a parabola.) The product of the eigenvalues is also equal to the determinant of A, so that is an alternate/quicker way to classify the quadratic form.
We will use the eigenvalue matrix D later, so we can define it here as:
[0 λ2] = D
For each eigenvalue we need the corresponding eigenvector:
v1 = [1 1]T; v2 = [1 -1]T,
and the eigenvector matrix P is formed by putting each eigenvector in a column of the matrix:
[1 -1] = P.
(the order of the eigenvector columns in P must correspond to the order of the eigenvalues in D)
Because the eigenvectors came from a real, symmetric matrix, they are automatically orthogonal to one another. If we go back and scale the eigenvectors to be unit length, they become orthonormal. Their resulting matrix gains the property that P-1=PT. For this specific case, the orthonormal P is
[1/√2 -1/√2] = P (with P-1=PT)
I will use this version of P going forward.
The eigenvectors and eigenvalues satisfy AP = PD, or equivalently A = PDPT. The quadratic form becomes
Letting y = PTx:
xTAx = (PTx)TD(PTx) = yTDy = λ1y12 + λ2y22.