owned this note
owned this note
Published
Linked with GitHub
# 二次曲線
Quadratic curve

This work by Jephian Lin is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).
$\newcommand{\trans}{^\top}
\newcommand{\adj}{^{\rm adj}}
\newcommand{\cof}{^{\rm cof}}
\newcommand{\inp}[2]{\left\langle#1,#2\right\rangle}
\newcommand{\dunion}{\mathbin{\dot\cup}}
\newcommand{\bzero}{\mathbf{0}}
\newcommand{\bone}{\mathbf{1}}
\newcommand{\ba}{\mathbf{a}}
\newcommand{\bb}{\mathbf{b}}
\newcommand{\bc}{\mathbf{c}}
\newcommand{\bd}{\mathbf{d}}
\newcommand{\be}{\mathbf{e}}
\newcommand{\bh}{\mathbf{h}}
\newcommand{\bp}{\mathbf{p}}
\newcommand{\bq}{\mathbf{q}}
\newcommand{\br}{\mathbf{r}}
\newcommand{\bx}{\mathbf{x}}
\newcommand{\by}{\mathbf{y}}
\newcommand{\bz}{\mathbf{z}}
\newcommand{\bu}{\mathbf{u}}
\newcommand{\bv}{\mathbf{v}}
\newcommand{\bw}{\mathbf{w}}
\newcommand{\tr}{\operatorname{tr}}
\newcommand{\nul}{\operatorname{null}}
\newcommand{\rank}{\operatorname{rank}}
%\newcommand{\ker}{\operatorname{ker}}
\newcommand{\range}{\operatorname{range}}
\newcommand{\Col}{\operatorname{Col}}
\newcommand{\Row}{\operatorname{Row}}
\newcommand{\spec}{\operatorname{spec}}
\newcommand{\vspan}{\operatorname{span}}
\newcommand{\Vol}{\operatorname{Vol}}
\newcommand{\sgn}{\operatorname{sgn}}
\newcommand{\idmap}{\operatorname{id}}
\newcommand{\am}{\operatorname{am}}
\newcommand{\gm}{\operatorname{gm}}
\newcommand{\mult}{\operatorname{mult}}
\newcommand{\iner}{\operatorname{iner}}$
```python
from lingeo import random_int_list
```
## Main idea
Consider an equation of the form
$$
ax^2 + bxy + cy^2 = 1.
$$
Then it can be written as
$$
\begin{bmatrix} x & y \end{bmatrix}
\begin{bmatrix}
a & \frac{b}{2} \\
\frac{b}{2} & c
\end{bmatrix}
\begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 1 \end{bmatrix}.
$$
Although an $1\times 1$ matrix is different from a scalar, we often abuse the notation and write
$$
\bx\trans A \bx = 1.
$$
Since $A$ is symmetirc, by the spectral theorem,
there is an orthonormal basis $\beta$ of $\mathbb{R}^n$ such that $[f_A]_\beta^\beta = D$ is a diagonal matrix.
By setting $Q$ as the matrix whose columns are vectors in $\beta$,
we get $Q$ is an orthogonal matrix such that $Q\trans AQ = D$ is a diagonal matrix.
We may let $Q\by = \bx$ and $\by = Q\trans\bx$.
This means $\by = [\bx]_\beta$ is the vector representation of $\bx$.
By viewing the equation $\bx\trans A\bx = 1$ from the perspective of $\beta$,
we get
$$
\bx\trans A\bx = \by\trans Q\trans A Q\by = \by\trans D\by = 1.
$$
It is much easier to describe the solution set of $\by\trans D\by = 1$ since $D$ is diagonal.
## Side stories
- conic section
## Experiments
##### Exercise 1
執行以下程式碼。
令 $\beta = \{\bv_1, \cdots, \bv_n\}$ 為 $Q$ 的各行向量。
<!-- eng start -->
Run the code below. Let $\beta = \{\bv_1, \cdots, \bv_n\}$ be the columns of $Q$.
<!-- eng end -->
```python
### code
set_random_seed(0)
print_ans = False
while True:
theta = choice([pi/6, pi/4, pi/3])
Q = matrix([
[cos(theta), -sin(theta)],
[sin(theta), cos(theta)]
])
l = [4*lam for lam in random_int_list(2, 3)]
D = diagonal_matrix(l)
A = Q * D * Q.transpose()
if A[0,1] != 0 and 0 not in l:
break
x,y = var("x y")
eqn = (A[0,0]*x^2 + 2*A[0,1]*x*y + A[1,1]*y^2 == 1)
pretty_print(eqn)
pretty_print(LatexExpr("Q ="), Q)
if print_ans:
pretty_print(LatexExpr("A ="), A)
pretty_print(LatexExpr("D ="), D)
if l[0] < 0 and l[1] < 0:
print("No solution.")
if l[0] * l[1] < 0:
print("Hyperbola counterclockwisely rotated in angle:")
pretty_print(theta)
implicit_plot(eqn, xrange=(-1,1), yrange=(-1,1)).show()
if l[0] > 0 and l[1] > 0:
print("Ellipse counterclockwisely rotated in angle:")
pretty_print(theta)
implicit_plot(eqn, xrange=(-1,1), yrange=(-1,1)).show()
```
By running the code above with ` seed = 0 `, we obtain that
$$
4\sqrt3xy+10x^2+6y^2=1\\
Q=\begin{bmatrix}
\frac{1}{2}\sqrt{3} & -\frac{1}{2} \\
\frac{1}{2} & \frac{1}{2}\sqrt{3}
\end{bmatrix}.
$$
##### Exercise 1(a)
找一個 $2\times 2$ 矩陣 $A$,將上述方程式寫成
$$
\begin{bmatrix} x & y \end{bmatrix}
A
\begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 1 \end{bmatrix}.
$$
<!-- eng start -->
Find a $2\times 2$ matrix $A$ so that the equation above is equivalent to
$$
\begin{bmatrix} x & y \end{bmatrix}
A
\begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 1 \end{bmatrix}.
$$
<!-- eng end -->
**Solution:**
The equation above is $\space 10x^2+4\sqrt3xy+6y^2=1.$
From the main idea, we know that
$$
A=\begin{bmatrix}
10 & 2\sqrt{3} \\
2\sqrt{3} & 6
\end{bmatrix}.
$$
##### Exercise 1(b)
計算 $D = Q^{-1}AQ$ 並說明同一個解集合用 $\beta$ 基底觀察出的方程式。
<!-- eng start -->
Calculate $D = Q^{-1}AQ$ and find the equation with the solution set under the perspective of $\beta$.
<!-- eng end -->
**Solution:**
$$
D=Q^{-1}AQ
=\begin{bmatrix}
\frac{\sqrt{3}}{2} & \frac{1}{2} \\
-\frac{1}{2} & \frac{\sqrt{3}}{2}
\end{bmatrix}
\begin{bmatrix}
10 & 2\sqrt{3} \\
2\sqrt{3} & 6
\end{bmatrix}
\begin{bmatrix}
\frac{1}{2}\sqrt{3} & -\frac{1}{2} \\
\frac{1}{2} & \frac{1}{2}\sqrt{3}
\end{bmatrix}\\
=
\begin{bmatrix}
6\sqrt{3} & 6 \\
-2 & 2\sqrt{3}
\end{bmatrix}
\begin{bmatrix}
\frac{1}{2}\sqrt{3} & -\frac{1}{2} \\
\frac{1}{2} & \frac{1}{2}\sqrt{3}
\end{bmatrix} \\
=
\begin{bmatrix}
12 & 0 \\
0 & 4
\end{bmatrix}.
$$
Let $Q\by = \bx$ and $\by = Q\trans\bx$.
In other word, $\by = [\bx]_\beta$ is the vector representation of $\bx$.
By viewing the equation $\bx\trans A\bx = 1$ from the perspective of $\beta$,
we get
$$
\bx\trans A\bx = \by\trans Q\trans A Q\by = \by\trans D\by = 1.
$$
Since $D$ is diagonal, we can describle the solution set of $\by\trans D\by = 1$ more easily.
##### Exercise 1\(c\)
描述這個方程式的解集合的形狀。
<!-- eng start -->
Describe the shape of the solution set.
<!-- eng end -->
**Solution:**
:::success
Let $\bx=\begin{bmatrix} x \\ y \end{bmatrix}.$
:::
From (b), we know $D=Q^{-1}AQ$.
Then $A=QDQ^{-1}$.
Therefore, we can write the equation above into
$$
\begin{bmatrix} x & y \end{bmatrix}
A
\begin{bmatrix} x \\ y \end{bmatrix}
= \begin{bmatrix} x & y \end{bmatrix}
\begin{bmatrix}
\frac{1}{2}\sqrt{3} & -\frac{1}{2} \\
\frac{1}{2} & \frac{1}{2}\sqrt{3}
\end{bmatrix}
\begin{bmatrix}
12 & 0 \\
0 & 4
\end{bmatrix}
\begin{bmatrix}
\frac{\sqrt{3}}{2} & \frac{1}{2} \\
-\frac{1}{2} & \frac{\sqrt{3}}{2}
\end{bmatrix}
\begin{bmatrix} x \\ y \end{bmatrix}.
$$
:::success
$$ \bx\trans A\bx = \bx\trans QDQ^{-1}\bx
$$
:::
Assume that
$$
\begin{bmatrix}
x^{\prime} & y^{\prime}
\end{bmatrix}=
\begin{bmatrix} x & y \end{bmatrix}
\begin{bmatrix}
\frac{1}{2}\sqrt{3} & -\frac{1}{2} \\
\frac{1}{2} & \frac{1}{2}\sqrt{3}
\end{bmatrix}.
$$
:::success
$$ (\bx^{\prime})\trans
= \begin{bmatrix}
x^{\prime} & y^{\prime}
\end{bmatrix}
=\bx\trans Q
$$
:::
Therefore, we know that
$$
\begin{bmatrix} x & y \end{bmatrix}
\begin{bmatrix}
\frac{1}{2}\sqrt{3} & -\frac{1}{2} \\
\frac{1}{2} & \frac{1}{2}\sqrt{3}
\end{bmatrix}
\begin{bmatrix}
12 & 0 \\
0 & 4
\end{bmatrix}
\begin{bmatrix}
\frac{\sqrt{3}}{2} & \frac{1}{2} \\
-\frac{1}{2} & \frac{\sqrt{3}}{2}
\end{bmatrix}
\begin{bmatrix} x \\ y \end{bmatrix}\\
=
\begin{bmatrix}
x^{\prime} & y^{\prime}
\end{bmatrix}
\begin{bmatrix}
12 & 0 \\ 0 & 4
\end{bmatrix}
\begin{bmatrix}
x^{\prime} \\
y^{\prime}
\end{bmatrix}
=
\begin{bmatrix} 1 \end{bmatrix}.
$$
:::success
$$
\bx\trans QDQ^{-1}\bx=(\bx^{\prime})\trans D \bx^{\prime}
=
\begin{bmatrix} 1 \end{bmatrix}.
$$
:::
We rewrite the matrix form, then we get
$$
12(x^{\prime})^2+4(y^{\prime})^2
= \frac{(x^{\prime})^2}{(\frac{1}{2\sqrt{3}})^2}+\frac{(y^{\prime})^2}{(\frac{1}{2})^2}=1.
$$
Thus, the shape of this solution set is an ellipse with the major axis of $\frac{1}{2}$ and the minor axis of $\frac{1}{2\sqrt{3}}$.
Notice that it is not a standard x-y coordinate.
:::info
What do the experiments try to tell you? (open answer)
When seeing an equation $ax^2 + bxy + cy^2 = 1$, we can try to find a diagonal matrix such that we can describe the solution set more easily.
:::
## Exercises
:::spoiler Written by ...
2a: Seaturtle
2b: Javis
2c:
3a: Ken
3b:
3c:
4: tien
:::
##### Exercise 2
描述以下方程式的解集合的形狀。
<!-- eng start -->
Describe the shape of the solution set of the given equations.
<!-- eng end -->
##### Exercise 2(a)
已知
$$
\begin{bmatrix}
4 & 0 \\
0 & 6
\end{bmatrix}
=
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}^{-1}
\begin{bmatrix}
5 & -1 \\
-1 & 5
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}.
$$
考慮方程式 $5x^2 + 5y^2 - 2xy = 1$。
<!-- eng start -->
It is known that
$$
\begin{bmatrix}
4 & 0 \\
0 & 6
\end{bmatrix}
=
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}^{-1}
\begin{bmatrix}
5 & -1 \\
-1 & 5
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}.
$$
Consider the equation $5x^2 + 5y^2 - 2xy = 1$.
<!-- eng end -->
**Solution:**
We write the equation into the matrix form, then we get
$$
\begin{bmatrix} x & y \end{bmatrix}
\begin{bmatrix}5 & -1 \\ -1 & 5 \end{bmatrix}
\begin{bmatrix} x \\ y \end{bmatrix}
=\begin{bmatrix} 1 \end{bmatrix}.
$$
We expand the matrix $\begin{bmatrix}5 & -1 \\ -1 & 5 \end{bmatrix},$
then we get
$$
\begin{bmatrix} x & y \end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}
\begin{bmatrix}
4 & 0 \\ 0 & 6
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}^{-1}
\begin{bmatrix} x \\ y \end{bmatrix}
=\begin{bmatrix} 1 \end{bmatrix}.
$$
Assume that
$$
\begin{bmatrix}
x^{\prime} & y^{\prime}
\end{bmatrix}=
\begin{bmatrix} x & y \end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}.
$$
Therefore, we have
$$
\begin{bmatrix} x & y \end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}
\begin{bmatrix}
4 & 0 \\ 0 & 6
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}^{-1}
\begin{bmatrix} x \\ y \end{bmatrix}\\
=
\begin{bmatrix}
x^{\prime} & y^{\prime}
\end{bmatrix}
\begin{bmatrix}
4 & 0 \\ 0 & 6
\end{bmatrix}
\begin{bmatrix}
x^{\prime} \\
y^{\prime}
\end{bmatrix}
=
\begin{bmatrix} 1 \end{bmatrix}.
$$
We rewrite the matrix form, then we get
$$
4(x^{\prime})^2+6(y^{\prime})^2
=\frac{(x^{\prime})^2}{(\frac{1}{2})^2}+\frac{(y^{\prime})^2}{(\frac{1}{\sqrt{6}})^2}=1
$$
In other word, we have a ellipse with a major axis being $\frac{1}{2}$ and a minor axis being $\frac{1}{\sqrt{6}}$.
Notice that it is not a standard x-y coordinate.
##### Exercise 2(b)
已知
$$
\begin{bmatrix}
4 & 0 \\
0 & -6
\end{bmatrix}
=
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}^{-1}
\begin{bmatrix}
-1 & 5 \\
5 & -1
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}.
$$
考慮方程式 $-x^2 -y^2 + 10xy = 1$。
<!-- eng start -->
It is known that
$$
\begin{bmatrix}
4 & 0 \\
0 & -6
\end{bmatrix}
=
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}^{-1}
\begin{bmatrix}
-1 & 5 \\
5 & -1
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}.
$$
Consider the equation $-x^2 -y^2 + 10xy = 1$.
<!-- eng end -->
**Answer:**
After we write the equation into the matrix form, we can get
$$
\begin{bmatrix} x & y \end{bmatrix}
\begin{bmatrix}-1 & 5 \\ 5 & -1 \end{bmatrix}
\begin{bmatrix} x \\ y \end{bmatrix}
=\begin{bmatrix} 1 \end{bmatrix}.
$$
By expanding the matrix $\begin{bmatrix}-1 & 5 \\ 5 & -1 \end{bmatrix},$
we get the following equation
$$
\begin{bmatrix} x & y \end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}
\begin{bmatrix}
4 & 0 \\ 0 & -6
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}^{-1}
\begin{bmatrix} x \\ y \end{bmatrix}
=\begin{bmatrix} 1 \end{bmatrix}.
$$
Assume that
$$
\begin{bmatrix}
x^{\prime} & y^{\prime}
\end{bmatrix}=
\begin{bmatrix} x & y \end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}.
$$
Then, we know that
$$
\begin{bmatrix} x & y \end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}
\begin{bmatrix}
4 & 0 \\ 0 & -6
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}^{-1}
\begin{bmatrix} x \\ y \end{bmatrix}\\
=
\begin{bmatrix}
x^{\prime} & y^{\prime}
\end{bmatrix}
\begin{bmatrix}
4 & 0 \\ 0 & -6
\end{bmatrix}
\begin{bmatrix}
x^{\prime} \\
y^{\prime}
\end{bmatrix}
=
\begin{bmatrix} 1 \end{bmatrix}.
$$
Finally, we rewrite the matrix form
$$
4(x^{\prime})^2-6(y^{\prime})^2
=\frac{(x^{\prime})^2}{(\frac{1}{2})^2}-\frac{(y^{\prime})^2}{(\frac{1}{\sqrt{6}})^2}=1.
$$
According to the above equation, we know it is a hyperbola whose major axis is equal to $\frac{1}{2}$ and minor axis is equal to $\frac{1}{\sqrt{6}}$.
Therefore, by the given equation
$$
\begin{bmatrix}
4 & 0 \\
0 & -6
\end{bmatrix}
=
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}^{-1}
\begin{bmatrix}
-1 & 5 \\
5 & -1
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix},
$$
we derive the function $-x^2 -y^2 + 10xy = 1$.
##### Exercise 2(c)
已知
$$
\begin{bmatrix}
2 & 0 \\
0 & 0
\end{bmatrix}
=
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}^{-1}
\begin{bmatrix}
1 & 1 \\
1 & 1
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}.
$$
考慮方程式 $x^2 + y^2 + 2xy = 1$。
<!-- eng start -->
It is known that
$$
\begin{bmatrix}
2 & 0 \\
0 & 0
\end{bmatrix}
=
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}^{-1}
\begin{bmatrix}
1 & 1 \\
1 & 1
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}.
$$
Consider the equation $x^2 + y^2 + 2xy = 1$.
<!-- eng end -->
**Solution:**
Write the equation into matrix form, then we get
$$
\begin{bmatrix} x & y \end{bmatrix}
\begin{bmatrix}
1 & 1 \\
1 & 1
\end{bmatrix}
\begin{bmatrix} x \\ y \end{bmatrix}
=
\begin{bmatrix} 1 \end{bmatrix}.
$$
Since we know that
$$
\begin{bmatrix}
2 & 0 \\
0 & 0
\end{bmatrix}
=
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}^{-1}
\begin{bmatrix}
1 & 1 \\
1 & 1
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix},
$$
then we get
$$
\begin{bmatrix}
1 & 1 \\
1 & 1
\end{bmatrix}
=
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}
\begin{bmatrix}
2 & 0 \\
0 & 0
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}^{-1}.
$$
Therefore, we can expand the matrix as below.
$$
\begin{bmatrix} x & y \end{bmatrix}
\begin{bmatrix}
1 & 1 \\
1 & 1
\end{bmatrix}
\begin{bmatrix} x \\ y \end{bmatrix}\\
=
\begin{bmatrix} x & y \end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}
\begin{bmatrix}
2 & 0 \\
0 & 0
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}^{-1}
\begin{bmatrix} x \\ y \end{bmatrix}=
\begin{bmatrix} 1 \end{bmatrix}.
$$
Assume that
$$
\begin{bmatrix}
x^{\prime} & y^{\prime}
\end{bmatrix}=
\begin{bmatrix} x & y \end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}.
$$
Therefore, we have
$$
\begin{bmatrix} x & y \end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}
\begin{bmatrix}
2 & 0 \\
0 & 0
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}} \\
\frac{1}{\sqrt{2}} & -\frac{1}{\sqrt{2}}
\end{bmatrix}^{-1}
\begin{bmatrix} x \\ y \end{bmatrix}\\
=
\begin{bmatrix}
x^{\prime} & y^{\prime}
\end{bmatrix}
\begin{bmatrix}
2 & 0 \\
0 & 0
\end{bmatrix}
\begin{bmatrix}
x^{\prime} \\ y^{\prime}
\end{bmatrix}
=\begin{bmatrix} 1 \end{bmatrix}.
$$
We rewrite the matrix form, then we get
$$
2(x^{\prime})^{2}+0(y^{\prime})^{2}=1.
$$
Solve the equation:
$$
2(x^{\prime})^{2}=1 \\
(x^{\prime})^{2}=\frac{1}{2} \\
x^{\prime}=\pm\frac{\sqrt{2}}{2}.
$$
Thus, we have two line $x=\pm\frac{\sqrt{2}}{2}$.
Notice that it is not on the standard x-y coordinate.
##### Exercise 3
描述以下方程式的解集合的形狀。
<!-- eng start -->
Describe the shape of the solution set of the given equations.
<!-- eng end -->
##### Exercise 3(a)
已知
$$
\begin{bmatrix}
3 & 0 & 0 \\
0 & 4 & 0 \\
0 & 0 & 6
\end{bmatrix}
=
\begin{bmatrix}
\frac{1}{\sqrt{3}} & \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & -\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & 0 & -\frac{2}{\sqrt{6}}
\end{bmatrix}^{-1}
\begin{bmatrix}
4 & 0 & -1 \\
0 & 4 & -1 \\
-1 & -1 & 5
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{3}} & \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & -\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & 0 & -\frac{2}{\sqrt{6}}
\end{bmatrix}.
$$
考慮方程式 $4x^2 + 4y^2 + 5z^2 - 2xz - 2yz = 1$。
<!-- eng start -->
It is known that
$$
\begin{bmatrix}
3 & 0 & 0 \\
0 & 4 & 0 \\
0 & 0 & 6
\end{bmatrix}
=
\begin{bmatrix}
\frac{1}{\sqrt{3}} & \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & -\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & 0 & -\frac{2}{\sqrt{6}}
\end{bmatrix}^{-1}
\begin{bmatrix}
4 & 0 & -1 \\
0 & 4 & -1 \\
-1 & -1 & 5
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{3}} & \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & -\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & 0 & -\frac{2}{\sqrt{6}}
\end{bmatrix}.
$$
Consider the equation $4x^2 + 4y^2 + 5z^2 - 2xz - 2yz = 1$.
<!-- eng end -->
##### **Answer:**
Let $$
D=\begin{bmatrix}
3 & 0 & 0 \\
0 & 4 & 0 \\
0 & 0 & 6
\end{bmatrix},
Q=\begin{bmatrix}
\frac{1}{\sqrt{3}} & \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & -\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & 0 & -\frac{2}{\sqrt{6}}
\end{bmatrix},
A=\begin{bmatrix}
4 & 0 & -1 \\
0 & 4 & -1 \\
-1 & -1 & 5
\end{bmatrix}
$$ and $D=Q^{-1}AQ$.
Suppose $\bx=\begin{bmatrix} x \\ y \\z\end{bmatrix}$.
After rewriting the equation into the matrix form, we get
$$
\bx\trans A\bx = \begin{bmatrix} 1 \end{bmatrix}.
$$
Because $A=QDQ^{-1}$, we get
$$
\bx\trans QDQ^{-1} \bx = \begin{bmatrix} 1 \end{bmatrix}.
$$
Assume that
$$ (\bx^{\prime})\trans
= \begin{bmatrix}
x^{\prime} & y^{\prime} & z^{\prime}
\end{bmatrix}
=\bx\trans Q
$$
Therefore, we have
$$
\bx\trans QDQ^{-1}\bx=(\bx^{\prime})\trans D \bx^{\prime}
=
\begin{bmatrix} 1 \end{bmatrix}.
$$
$$
\begin{bmatrix}
x^{\prime} & y^{\prime} & z^{\prime}
\end{bmatrix}
\begin{bmatrix}
3 & 0 & 0 \\
0 & 4 & 0 \\
0 & 0 & 6
\end{bmatrix}
\begin{bmatrix}
x^{\prime} \\
y^{\prime} \\
z^{\prime}
\end{bmatrix}
=
\begin{bmatrix} 1 \end{bmatrix}.
$$
Rewriting the matrix form, we get
$$
3(x^{\prime})^2+4(y^{\prime})^2+6(z^{\prime})^2
=\frac{(x^{\prime})^2}{(\frac{1}{\sqrt{3}})^2}
+\frac{(y^{\prime})^2}{(\frac{1}{2})^2}
+\frac{(z^{\prime})^2}{(\frac{1}{\sqrt{6}})^2}=1.
$$
It is an ellipsoid.
##### Exercise 3(b)
已知
$$
\begin{bmatrix}
3 & 0 & 0 \\
0 & 4 & 0 \\
0 & 0 & -6
\end{bmatrix}
=
\begin{bmatrix}
\frac{1}{\sqrt{3}} & \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & -\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & 0 & -\frac{2}{\sqrt{6}}
\end{bmatrix}^{-1}
\begin{bmatrix}
2 & -2 & 3 \\
-2 & 2 & 3 \\
3 & 3 & -3
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{3}} & \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & -\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & 0 & -\frac{2}{\sqrt{6}}
\end{bmatrix}.
$$
考慮方程式 $2x^2 + 2y^2 - 3z^2 - 4xy + 6xz + 6yz = 1$。
<!-- eng start -->
It is known that
$$
\begin{bmatrix}
3 & 0 & 0 \\
0 & 4 & 0 \\
0 & 0 & -6
\end{bmatrix}
=
\begin{bmatrix}
\frac{1}{\sqrt{3}} & \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & -\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & 0 & -\frac{2}{\sqrt{6}}
\end{bmatrix}^{-1}
\begin{bmatrix}
2 & -2 & 3 \\
-2 & 2 & 3 \\
3 & 3 & -3
\end{bmatrix}
\begin{bmatrix}
\frac{1}{\sqrt{3}} & \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & -\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & 0 & -\frac{2}{\sqrt{6}}
\end{bmatrix}.
$$
Consider the equation $2x^2 + 2y^2 - 3z^2 - 4xy + 6xz + 6yz = 1$.
<!-- eng end -->
**Solution:**
Let $$
D=\begin{bmatrix}
3 & 0 & 0 \\
0 & 4 & 0 \\
0 & 0 & -6
\end{bmatrix},
Q=\begin{bmatrix}
\frac{1}{\sqrt{3}} & \frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & -\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{6}} \\
\frac{1}{\sqrt{3}} & 0 & -\frac{2}{\sqrt{6}}
\end{bmatrix},
A=\begin{bmatrix}
2 & -2 & 3 \\
-2 & 2 & 3 \\
3 & 3 & -3
\end{bmatrix}
$$ and $D=Q^{-1}AQ$.
Suppose $\bx=\begin{bmatrix} x \\ y \\z\end{bmatrix}$.
After rewriting the equation into the matrix form, we get
$$
\bx\trans A\bx = \begin{bmatrix} 1 \end{bmatrix}.
$$
Because $A=QDQ^{-1}$, we get
$$
\bx\trans QDQ^{-1} \bx = \begin{bmatrix} 1 \end{bmatrix}.
$$
Assume that
$$ (\bx^{\prime})\trans
= \begin{bmatrix}
x^{\prime} & y^{\prime} & z^{\prime}
\end{bmatrix}
=\bx\trans Q
$$
Therefore, we have
$$
\bx\trans QDQ^{-1}\bx=(\bx^{\prime})\trans D \bx^{\prime}
=
\begin{bmatrix} 1 \end{bmatrix}.
$$
$$
\begin{bmatrix}
x^{\prime} & y^{\prime} & z^{\prime}
\end{bmatrix}
\begin{bmatrix}
3 & 0 & 0 \\
0 & 4 & 0 \\
0 & 0 & -6
\end{bmatrix}
\begin{bmatrix}
x^{\prime} \\
y^{\prime} \\
z^{\prime}
\end{bmatrix}
=
\begin{bmatrix} 1 \end{bmatrix}.
$$
Rewriting the matrix form, we get
$$
3(x^{\prime})^2+4(y^{\prime})^2-6(z^{\prime})^2 =1.
$$
It look likes the picture below.
Notice that it is not the standard coordinate.
##### Exercise 3(c)
說明方程式 $2x^2 + 2y^2 - 3 - 4xy + 6x + 6y = 1$ 的解集合是一個三維圓椎和一個平面的交集。
<!-- eng start -->
Show that the solution set of $2x^2 + 2y^2 - 3 - 4xy + 6x + 6y = 1$ is the intersection of the surface of a cone and a plane.
<!-- eng end -->
**Solution:**
The solution of exercise 3 (b) $2x^2 + 2y^2 - 3z^2 - 4xy + 6xz + 6yz = 1$ is a cone.
Observe the two equations, we can find out that when $z=1$ they are same.
In other word, the solution set of $2x^2 + 2y^2 - 3 - 4xy + 6x + 6y = 1$ is equal to the intersection of $2x^2 + 2y^2 - 3z^2 - 4xy + 6xz + 6yz = 1$ and $z=1$.
That is, the solution set of $2x^2 + 2y^2 - 3 - 4xy + 6x + 6y = 1$ is the intersection of a cone and a plane.
##### Exercise 4
令 $D$ 為一對角矩陣,
$n_+$、$n_-$、$n_0$ 分別為 $D$ 的對角線上正的、負的、為零的元素的個數。
考慮
$$
\begin{bmatrix} x & y \end{bmatrix}
D
\begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 1 \end{bmatrix}
$$
的解集合。
完成以下表格。
$n_+$ | $n_-$ | $n_0$ | 圖形
---|--- |--- | ---
2 |0 |0 | 橢圓
0 |2 |0 | 不存在
0 |0 |2 | 不存在
1 |1 |0 | 雙曲線
1 |0 |1 | 兩平行直線
0 |1 |1 | 不存在
<!-- eng start -->
Let $D$ be a diagonal matrix, $n_+$, $n_-$, $n_0$ are the number of positive, negative, zero entries on the diagonal of $D$. Consider the solution set of
$$
\begin{bmatrix} x & y \end{bmatrix}
D
\begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 1 \end{bmatrix}.
$$
Then complete the table below.
$n_+$ | $n_-$ | $n_0$ | Shape
---|--- |--- | ---
2 |0 |0 | Ellipse
0 |2 |0 | Does Not Exist
0 |0 |2 | Does Not Exist
1 |1 |0 | Hyperbola
1 |0 |1 | Two Parallel Lines
0 |1 |1 | Does Not Exist
<!-- eng end -->
:::info
collaboration: 1
4 problems: 4
- 2a, 2b, 2c, 3a
extra: 1.5
- 3b, 3c, 4
moderator: 1
qc: 1
:::