식 $ax^2+2bxy+cy^2+dx+ey+f$에서 차수가 2인 $ax^2+2bxy+cy^2$ 부분을 행렬로 나타낸 $q(\mathbf{x})=[x \; y] \begin{bmatrix}a&b\\b&c\\\end{bmatrix} \begin{bmatrix}x\\y\\\end{bmatrix}=\left< A \mathbf{x} \mid \mathbf{x} \right> = \mathbf{x}^T A \mathbf{x}$를 이차형식이라 한다.
$A$에 고윳값 분해를 적용하면 아래와 같다.
$$ A=PDP^T \quad P=\left[\mathbf{v}_1 \mid \mathbf{v}_2 \right], D=\begin{bmatrix}\lambda_1&0\\0&\lambda_2\\\end{bmatrix} $$
여기서 $P$를 직교행렬로 정했다고 가정하면 (즉, $\left|\mathbf{v}_1\right|=\left|\mathbf{v}_2\right|=1$), $P=\begin{bmatrix}\cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{bmatrix}$이다. 따라서 $P$는 $\R^2$의 회전행렬이다.
주축정리: 이차형식 $q$는 새로운 좌표계에서 교차항이 없이 표현된다. 대칭행렬 $A=[a_{ij}]_{2 \times 2}$의 고윳값을 $\lambda_1, \lambda_2$라 할 때 좌표축의 회전에 의해 이차형식 $q(\mathbf{x})=\mathbf{x}^T A \mathbf{x}$가 새로운 $x'y'$-좌표계에서
$$ q(\mathbf{x})=\lambda_1(x')^2+\lambda_2(y')^2 $$
로 표현될 수 있다.
$P$에 의해 얻어진 새로운 좌표계를 $x'y'$좌표계라 한다면, $\mathbf{x}=P\mathbf{x}'$이고
$$ q(\mathbf{x})=\mathbf{x}^T A \mathbf{x} = (P \mathbf{x}')^T A (P \mathbf{x}') = (\mathbf{x}')^T (P^T A P) \mathbf{x}' \\= \lambda_1 (x')^2 + \lambda_2 (y')^2 $$
이므로 이차형식 $q$는 새로운 좌표계에서 교차항이 없이 표현된다.
$z=\lambda_1 (x')^2 + \lambda_2 (y')^2$의 개형은 타원포물면($\lambda_1 \lambda_2 > 0$), 쌍곡포물면($\lambda_1 \lambda_2 < 0$), 포물기둥($\lambda_1=0$ 또는 $\lambda_2 = 0$)이 된다.
(고윳값 양수/음수) 임의의 $\mathbf{x} \ne 0$에 대해 $q>0$이면 $q$는 양의 정부호, $q<0$이면 음의 정부호라 한다. $\Leftrightarrow \Delta_k>0$ (선형 주 소행렬식) $\Leftrightarrow$ 고윳값 $\lambda_1, \lambda_2, \cdots \lambda_n>0$
(고윳값 음/양이 아님) 임의의 $\mathbf{x}$에 대해 $q \geq0$이면 양의 준정부호, $q \leq 0$이면 음의 준정부호라 한다. $\Leftrightarrow (-1)^k \Delta_k>0$
(고윳값 부호 혼합) 어떤 $\mathbf{x}$에 대해 $q>0$이고, 어떤 $\mathbf{x}$에 대해서는 $q<0$이면 부정부호라 한다.
<aside> 💡
plot 함수에 detect_poles = ‘show’ 옵션을 넣어줄 수 있다.solve에 to_poly_solve = ‘force’로 일반각을 얻을 수 있다.
</aside>