Quadric in 2D - conic sections
Let $D = \mrm{diag}(\lambda_1, \lambda_2)$.
-
If $\lambda_1, \lambda_2\neq 0$, we can eliminate the linear term: $$ \lambda_1 x_1^2 + \lambda_2 x_2^2 = k. $$
-
If $\lambda_1 \lambda_2 > 0$, then we required $\mrm{sgn}(\lambda_1) = \mrm{sgn}(k).$ This is a ellipse with axes coinciding with eigenvectors of $S$, with semi-axes $\sqrt{k/\lambda_1}$ and $\sqrt{k/\lambda_2}$.
-
If $\lambda_1 \lambda_2 < 0$, set $\lambda_1 = k/a^2 > 0$ and $\lambda_2 = -k/b^2 < 0$. This is an hyperbola $$ \frac{x_1^2}{a^2} - \frac{x_2^2}{b^2} = 1. $$
-
-
If $\lambda_1 \lambda_2 = 0$, take $\lambda_2 = 0$. $\lambda_1\neq 0$ because otherwise $A$ is just a zero matrix. $$ \lambda_1 x_1^2 + b_1 x_1 + b_2 x_2 + c = 0. $$
-
If $b_2 \neq 0$, then we can shift the origin $x_1 \leftarrow x_1 - b_1/2\lambda_1$ to eliminate $b_1x_1$, and $x_2 \leftarrow x_2 - c/b_2 + b_1^2/4\lambda_1 b_2$ to eliminate the constants to get a parabola $$ \lambda_1 + b_2 x_2 = 0. $$
-
If $b_2 = 0$, then we get two straight line or no solution depending on the discriminant.
-