慣性¶

Inertia

Creative Commons License
This work by Jephian Lin is licensed under a Creative Commons Attribution 4.0 International License.

$\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}}$

In [ ]:
from lingeo import random_int_list
from sym import sym_from_list, inertia

Main idea¶

Let $A$ be an $n\times n$ symmetric matrix.
According to the spectral theorem, all eigenvalues of $A$ are real, so they can be arranged from small to large on the real line.
Let $n_+(A)$, $n_-(A)$, and $n_0(A)$ be the number of positive, negative, and zero eigenvalues of $A$, respectively.
Then the inertia of $A$ is defined as

$$ \iner(A) = (n_+(A), n_-(A), n_0(A)). $$

Two symmetric matrices $A$ and $B$ are congruent if there is an invertible matrix $Q$ such that

$$ Q\trans AQ = B. $$

Notice that $Q$ has to be invertible, yet it is $Q\trans$ in the relation.

Sylvester's law of inertia¶

If two symmetric matrices are congruent, then they have the same inertia.
Moreover, every real symmetric matrix $A$ is congruent to a matrix of the form

$$ \begin{bmatrix} I_p & ~ & ~ \\ ~ & -I_q & ~ \\ ~ & ~ & O_r \end{bmatrix}, $$

where $p = n_+(A)$, $q = n_-(A)$, and $r = n_0(A)$.

Since every invertible matrix can be decomposed into the product of some elementary matrix.
Two symmetric matrices $A$ and $B$ are congruent means there are elementary matrices $E_1,\ldots, E_k$ such that

$$ E_k\trans\cdots E_1\trans AE_1\cdots E_k = B. $$

That is, applying some symmetric row/column operations simultaneously to $A$ will result in $B$.

Side stories¶

  • quadratic form
  • local optimum by derivatives

Experiments¶

Exercise 1¶

執行以下程式碼。

Run the code below.

In [ ]:
### code
set_random_seed(0)
print_ans = False

n = 3
entries = [1,1] + random_int_list(binomial(n+1,2) - 2, 3)
A = sym_from_list(n, entries)

pretty_print(LatexExpr("A ="), A)
        
if print_ans:
    B = copy(A)
    B.add_multiple_of_row(1,0,-1)
    B.add_multiple_of_column(1,0,-1)
    print("A after row/column operation:")
    show(B)
    print("(n+, n-, n0) =", inertia(A))
Exercise 1(a)¶

對 $A$ 進行列運算 $\rho_2:-\rho_1$、再進行行運算 $\kappa_2:-\kappa_1$ 的結果為何?

Apply the row operation $\rho_2:-\rho_1$ and the column operation $\kappa_2:-\kappa_1$ to $A$. What is the result?

Exercise 1(b)¶

將 $A$ 進行一系列對稱的行列運算,讓它變成對角矩陣且對角線上只有 $1$、$0$、$-1$。
求 $\iner(A)$。

Apply some symmetric row/column operations simultaneously to $A$ so that it becomes a diagonal matrix with $1$, $0$, or $-1$ on the diagonal. Find $\iner(A)$.

Exercises¶

Exercise 2¶

求以下矩陣 $A$ 的 $\iner(A)$。

Find $\iner(A)$ for the following matrices.

Exercise 2(a)¶
$$ A = \begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix}. $$
Exercise 2(b)¶
$$ A = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}. $$
Exercise 2(c)¶
$$ A = \begin{bmatrix} 1 & 1 & 1 \\ 1 & 1 & 1 \\ 1 & 1 & 1 \\ \end{bmatrix}. $$
Exercise 2(d)¶
$$ A = \begin{bmatrix} 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \\ \end{bmatrix}. $$
Exercise 3¶

一個矩陣 $A$ 的 二次型(quadratic form) 指的是長得像 $\bx\trans A\bx$ 的式子。
證明以下關於二次型的性質。

The quadratic form of a matrix $A$ is any expression of the form $\bx\trans A\bx$. Prove the following properties about the quadratic form.

Exercise 3(a)¶

令

$$ A = \begin{bmatrix} 2 & -1 \\ -1 & 2 \end{bmatrix}, \quad \bx = \begin{bmatrix} x \\ y \end{bmatrix}. $$

證明 $\bx\trans A\bx \geq 0$。

提示:展開後並將其寫成 $1(ax + by)^2 + 3(cx+dy)^2$。

Let

$$ A = \begin{bmatrix} 2 & -1 \\ -1 & 2 \end{bmatrix}, \quad \bx = \begin{bmatrix} x \\ y \end{bmatrix}. $$

Prove that $\bx\trans A\bx \geq 0$.

Hint: Expand it and try to write it into the form of $1(ax + by)^2 + 3(cx+dy)^2$.

Exercise 3(b)¶

令 $A$ 為一 $2\times 2$ 實對稱矩陣,且其特徵值為 $\lambda_1,\lambda_2$。
令

$$ \bx = \begin{bmatrix} x \\ y \end{bmatrix}. $$

證明 $\bx\trans A\bx$ 可寫成 $\lambda_1(ax + bx)^2 + \lambda_2(cx + dy)^2$ 的形式。

Let $A$ be a $2\times 2$ real symmetric matrix with eigenvalues $\lambda_1,\lambda_2$. Let

$$ \bx = \begin{bmatrix} x \\ y \end{bmatrix}. $$

Show that $\bx\trans A\bx$ can be written as $\lambda_1(ax + bx)^2 + \lambda_2(cx + dy)^2$.

Exercise 3(c)¶

令 $A$ 為一 $2\times 2$ 實對稱矩陣,且其特徵值為 $\lambda_1,\lambda_2$。
證明:

  1. 若 $\lambda_1, \lambda_2 \geq 0$ 時,$\bx\trans A\bx \geq 0$。
  2. 若 $\lambda_1, \lambda_2 \leq 0$ 時,$\bx\trans A\bx \leq 0$。
  3. 若 $\lambda_1, \lambda_2 > 0$ 且 $\bx\neq\bzero$ 時,$\bx\trans A\bx > 0$。
  4. 若 $\lambda_1, \lambda_2 < 0$ 且 $\bx\neq\bzero$ 時,$\bx\trans A\bx < 0$。

Let $A$ be a $2\times 2$ real symmetric matrix with eigenvalues $\lambda_1,\lambda_2$. Show the following:

  1. If $\lambda_1, \lambda_2 \geq 0$, then $\bx\trans A\bx \geq 0$.
  2. If $\lambda_1, \lambda_2 \leq 0$, then $\bx\trans A\bx \leq 0$.
  3. If $\lambda_1, \lambda_2 > 0$ and $\bx\neq\bzero$, then $\bx\trans A\bx > 0$.
  4. If $\lambda_1, \lambda_2 < 0$ and $\bx\neq\bzero$, then $\bx\trans A\bx < 0$.
Exercise 4¶

令 $A$ 為一 $2\times 2$ 實對稱矩陣。
證明:

  1. 若 $\det(A) > 0$ 且 $\tr(A) > 0$,則 $\iner(A) = (2,0,0)$。
  2. 若 $\det(A) > 0$ 且 $\tr(A) < 0$,則 $\iner(A) = (0,2,0)$。
  3. 若 $\det(A) < 0$,則 $\iner(A) = (1,1,0)$。

Let $A$ be a $2\times 2$ real symmetric matrix. Show the following:

  1. If $\det(A) > 0$ and $\tr(A) > 0$, then $\iner(A) = (2,0,0)$.
  2. If $\det(A) > 0$ and $\tr(A) < 0$, then $\iner(A) = (0,2,0)$.
  3. If $\det(A) < 0$, then $\iner(A) = (1,1,0)$.
Exercise 5¶

令 $f: \mathbb{R}^2 \rightarrow \mathbb{R}$ 為一二次可微函數且其微分連續。
令 $(x_0,y_0)\in\mathbb{R}^2$ 為一點使得一次微分 $f_x(x_0,y_0) = f_y(x_0,y_0) = 0$、
而 $f_{xx}, f_{xy} = f_{yx}, f_{yy}$ 分別為 $f$ 對 $x$ 或 $y$ 的二次微分。

令

$$ A = \begin{bmatrix} f_{xx} & f_{yx} \\ f_{xy} & f_{yy} \end{bmatrix}, \quad \bx = \begin{bmatrix} x_0 + x \\ y_0 + y \end{bmatrix}. $$

已知 $f$ 的函數值可以用

$$ f(x_0 + x, y_0 + y) \sim f(x_0, y_0) + \frac{1}{2}\bx\trans A \bx $$

逼近。

說明為什麼:

  1. 若 $\det(A) > 0$ 且 $\tr(A) > 0$,則 $f$ 在 $(x_0,y_0)$ 有局部最小值。
  2. 若 $\det(A) > 0$ 且 $\tr(A) < 0$,則 $f$ 在 $(x_0,y_0)$ 有局部最大值。
  3. 若 $\det(A) < 0$,則 $f$ 在 $(x_0,y_0)$ 為𩣑點。

Let $f: \mathbb{R}^2 \rightarrow \mathbb{R}$ be a function whose second derivatives exist and are continuous. Let $(x_0,y_0)\in\mathbb{R}^2$ be a point such that the first derivatives $f_x(x_0,y_0) = f_y(x_0,y_0) = 0$, and let $f_{xx}, f_{xy} = f_{yx}, f_{yy}$ be the second partial derivatives of $f$ with respect to $x$ and $y$.

Let

$$ A = \begin{bmatrix} f_{xx} & f_{yx} \\ f_{xy} & f_{yy} \end{bmatrix}, \quad \bx = \begin{bmatrix} x + x+0 \\ y_0 + y \end{bmatrix}. $$

It is known that the approximation

$$ f(x_0 + x, y_0 + y) \sim f(x_0, y_0) + \frac{1}{2}\bx\trans A \bx $$

holds.

Give some intuitive reasons to the following facts.

  1. If $\det(A) > 0$ and $\tr(A) > 0$, then $f$ has a local minimum at $(x_0,y_0)$.
  2. If $\det(A) > 0$ and $\tr(A) < 0$, then $f$ has a local maximum at $(x_0,y_0)$.
  3. If $\det(A) < 0$, then $f$ has a saddle point at $(x_0,y_0)$.
Exercise 6¶

利用以下步驟證明西爾維斯特慣性定理。

Sylvester's law of inertia¶

If two symmetric matrices are congruent, then they have the same inertia.

Use the given instructions to prove Sylvester's law of inertia.

Sylvester's law of inertia¶

If two symmetric matrices are congruent, then they have the same inertia.

Exercise 6(a)¶

定義

$$ E(t) = \begin{bmatrix} 1 & t \\ 0 & 1 \end{bmatrix}. $$

說明 $E(t)\trans AE(t)$ 在任何 $t\in\mathbb{R}$ 時都有相同的零維數。

Define

$$ E(t) = \begin{bmatrix} 1 & t \\ 0 & 1 \end{bmatrix}. $$

Show that $E(t)\trans AE(t)$ has the same nullity for any $t\in\mathbb{R}$.

Exercise 6(b)¶

定義

$$ E(t) = \begin{bmatrix} t & 0 \\ 0 & 1 \end{bmatrix}. $$

說明 $E(t)\trans AE(t)$ 在任何 $t > 0$ 時都有相同的零維數。

Define

$$ E(t) = \begin{bmatrix} t & 0 \\ 0 & 1 \end{bmatrix}. $$

Show that $E(t)\trans AE(t)$ has the same nullity for any $t > 0$.

Exercise 6(c)¶

定義

$$ E = \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix}. $$

說明 $\iner(E\trans AE) = \iner(A)$。

Define

$$ E = \begin{bmatrix} -1 & 0 \\ 0 & 1 \end{bmatrix}. $$

Show that $\iner(E\trans AE) = \iner(A)$.

Exercise 6(d)¶

已知矩陣的特徵值會隨矩陣的數值連續變動。
利用這個性質證明西爾維斯特慣性定理。

It is known that the eigenvalues is a continuous function of the entries of the matrix. Use this fact to prove Sylvester's law of inertia.