Command Palette

Search for a command to run...

Linear Methods of AI

Real Axis Transformation

Quadratic Forms with Symmetric Matrices

When you encounter a general quadratic equation, the best way to understand it is by looking at its structure in matrix form. Imagine you have a symmetric matrix AA with elements:

A=(ab/2b/2c)A = \begin{pmatrix} a & b/2 \\ b/2 & c \end{pmatrix}

This matrix has eigenvalues λ1,λ2R\lambda_1, \lambda_2 \in \mathbb{R} and corresponding orthonormal eigenvectors v1,v2R2v_1, v_2 \in \mathbb{R}^2. Something interesting happens when we use coordinate transformation through the matrix S=(v1v2)R2×2S = (v_1 \quad v_2) \in \mathbb{R}^{2 \times 2}.

For coordinate transformation, we use (δϵ)=ST(de)\begin{pmatrix} \delta \\ \epsilon \end{pmatrix} = S^T \begin{pmatrix} d \\ e \end{pmatrix}. In the new coordinates ξ=STx\xi = S^T x, the equation becomes:

λ1ξ12+λ2ξ22+δξ1+ϵξ2+f=0\lambda_1 \xi_1^2 + \lambda_2 \xi_2^2 + \delta \xi_1 + \epsilon \xi_2 + f = 0

Completing the Square Process

For both variables with λ1,λ20\lambda_1, \lambda_2 \neq 0, the completing the square process is performed separately:

0=λ1(ξ12+2δ2λ1ξ1+δ24λ12)δ24λ1+λ2(ξ22+2ϵ2λ2ξ2+ϵ24λ22)ϵ24λ2+f\begin{aligned} 0 &= \lambda_1 \left( \xi_1^2 + 2 \frac{\delta}{2\lambda_1} \xi_1 + \frac{\delta^2}{4\lambda_1^2} \right) - \frac{\delta^2}{4\lambda_1} \\ &\quad + \lambda_2 \left( \xi_2^2 + 2 \frac{\epsilon}{2\lambda_2} \xi_2 + \frac{\epsilon^2}{4\lambda_2^2} \right) - \frac{\epsilon^2}{4\lambda_2} + f \end{aligned}

The result of this process gives a simpler form:

=λ1(ξ1+δ2λ1)2+λ2(ξ2+ϵ2λ2)2+(fδ24λ1ϵ24λ2)\begin{aligned} &= \lambda_1 \left( \xi_1 + \frac{\delta}{2\lambda_1} \right)^2 + \lambda_2 \left( \xi_2 + \frac{\epsilon}{2\lambda_2} \right)^2 \\ &\quad + \left( f - \frac{\delta^2}{4\lambda_1} - \frac{\epsilon^2}{4\lambda_2} \right) \end{aligned}

By determining the center point (m1,m2)=(δ2λ1,ϵ2λ2)(m_1, m_2) = \left( -\frac{\delta}{2\lambda_1}, -\frac{\epsilon}{2\lambda_2} \right) and the constant γ=δ24λ1+ϵ24λ2f\gamma = \frac{\delta^2}{4\lambda_1} + \frac{\epsilon^2}{4\lambda_2} - f, we obtain:

λ1(ξ1m1)2+λ2(ξ2m2)2γ=0\lambda_1 (\xi_1 - m_1)^2 + \lambda_2 (\xi_2 - m_2)^2 - \gamma = 0

For γ>0\gamma > 0, various curve forms can emerge depending on the signs of the eigenvalues.

Curve Classification

Both Eigenvalues Positive

If λ1>0\lambda_1 > 0 and λ2>0\lambda_2 > 0, then the conic section formed is an ellipse:

(ξ1m1)2r12+(ξ2m2)2r22=1\frac{(\xi_1 - m_1)^2}{r_1^2} + \frac{(\xi_2 - m_2)^2}{r_2^2} = 1

With semi-axis lengths r1=γλ1r_1 = \sqrt{\frac{\gamma}{\lambda_1}} in the direction of v1v_1 and r2=γλ2r_2 = \sqrt{\frac{\gamma}{\lambda_2}} in the direction of v2v_2.

Ellipse Visualization in Coordinates ξ1,ξ2\xi_1, \xi_2
Ellipse curve with both positive eigenvalues and principal axes aligned with eigenvector directions.

Eigenvalues with Opposite Signs

When λ1>0\lambda_1 > 0 and λ2<0\lambda_2 < 0, the conic section formed is a hyperbola:

(ξ1m1)2r12(ξ2m2)2r22=1\frac{(\xi_1 - m_1)^2}{r_1^2} - \frac{(\xi_2 - m_2)^2}{r_2^2} = 1

With semi-axis lengths r1=γλ1r_1 = \sqrt{\frac{\gamma}{\lambda_1}} in the direction of v1v_1 and r2=γλ2r_2 = \sqrt{\frac{\gamma}{-\lambda_2}} in the direction of v2v_2.

Hyperbola Visualization in Coordinates ξ1,ξ2\xi_1, \xi_2
Hyperbola curve with principal axes aligned with eigenvector directions and center transformation.

One Eigenvalue Zero

A special condition occurs when λ10\lambda_1 \neq 0 and λ2=0\lambda_2 = 0. Completing the square gives:

0=λ1(ξ12+2δ2λ1ξ1+δ24λ12)δ24λ1+ϵξ2+f0 = \lambda_1 \left( \xi_1^2 + 2 \frac{\delta}{2\lambda_1} \xi_1 + \frac{\delta^2}{4\lambda_1^2} \right) - \frac{\delta^2}{4\lambda_1} + \epsilon \xi_2 + f
=λ1(ξ1+δ2λ1)2+ϵξ2+(fδ24λ1)= \lambda_1 \left( \xi_1 + \frac{\delta}{2\lambda_1} \right)^2 + \epsilon \xi_2 + \left( f - \frac{\delta^2}{4\lambda_1} \right)
=λ1(ξ1m1)2+ϵξ2γ= \lambda_1 (\xi_1 - m_1)^2 + \epsilon \xi_2 - \gamma

The conic section formed is a parabola:

ξ2=λ1ϵ(ξ1m1)2+γϵ\xi_2 = -\frac{\lambda_1}{\epsilon} (\xi_1 - m_1)^2 + \frac{\gamma}{\epsilon}
Parabola Visualization in Coordinates ξ1,ξ2\xi_1, \xi_2
Parabola curve with one zero eigenvalue and coordinate axis transformation aligned with eigenvectors.

Two-Dimensional Example

Conic sections in R2\mathbb{R}^2 satisfy the general quadratic equation:

ax12+bx1x2+cx22+dx1+ex2+f=0ax_1^2 + bx_1x_2 + cx_2^2 + dx_1 + ex_2 + f = 0

Which can be written in matrix form as:

(x1x2)T(ab/2b/2c)(x1x2)+(de)T(x1x2)+f=0\begin{pmatrix} x_1 \\ x_2 \end{pmatrix}^T \begin{pmatrix} a & b/2 \\ b/2 & c \end{pmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix} + \begin{pmatrix} d \\ e \end{pmatrix}^T \begin{pmatrix} x_1 \\ x_2 \end{pmatrix} + f = 0

Quadratic Surfaces and Transformation

For a symmetric matrix ARn×nA \in \mathbb{R}^{n \times n}, vector bRnb \in \mathbb{R}^n, and scalar cRc \in \mathbb{R}, the quadratic surface QQ is defined as the solution set of the general quadratic equation:

xTAx+bTx+c=0x^T A x + b^T x + c = 0

Which can be written in explicit form:

Q={xRn:xTAx+bTx+c=0}Q = \left\{ x \in \mathbb{R}^n : x^T A x + b^T x + c = 0 \right\}
={xRn:j=1nk=1nxjajkxk+j=1nbjxj+c=0}= \left\{ x \in \mathbb{R}^n : \sum_{j=1}^n \sum_{k=1}^n x_j a_{jk} x_k + \sum_{j=1}^n b_j x_j + c = 0 \right\}

If ARn×nA \in \mathbb{R}^{n \times n} is symmetric and v1,,vnRnv_1, \ldots, v_n \in \mathbb{R}^n is an orthonormal basis of eigenvectors with Avi=λiviA \cdot v_i = \lambda_i \cdot v_i, then the orthonormal matrix S=(v1vn)S = (v_1 \quad \ldots \quad v_n) enables diagonalization AS=SΛA \cdot S = S \cdot \Lambda or Λ=S1AS=STAS\Lambda = S^{-1} \cdot A \cdot S = S^T \cdot A \cdot S.

In the new coordinate basis ξ=STx\xi = S^T x and μ=STb\mu = S^T b, the quadratic surface has diagonal form:

Q={ξRn:ξTSTASξ+bTSξ+c=0}Q = \left\{ \xi \in \mathbb{R}^n : \xi^T S^T A S \xi + b^T S \xi + c = 0 \right\}
={ξRn:ξTΛξ+μTξ+c=0}= \left\{ \xi \in \mathbb{R}^n : \xi^T \Lambda \xi + \mu^T \xi + c = 0 \right\}
={ξRn:j=1nλjξj2+j=1nμjξj+c=0}= \left\{ \xi \in \mathbb{R}^n : \sum_{j=1}^n \lambda_j \xi_j^2 + \sum_{j=1}^n \mu_j \xi_j + c = 0 \right\}
={ξRn:j=1n(λjξj2+μjξj)=c}= \left\{ \xi \in \mathbb{R}^n : \sum_{j=1}^n (\lambda_j \xi_j^2 + \mu_j \xi_j) = -c \right\}

In the orthonormal basis of eigenvectors, the quadratic form has a diagonal structure. This transformation is called principal axis transformation because the new coordinate axes are aligned with the directions of the matrix eigenvectors.