# Quod Erat Demonstrandum

## 2016/07/22

### 有理函數和矩陣

Filed under: NSS,Pure Mathematics,Teaching,University Mathematics — johnmayhk @ 12:06 下午
Tags:

Core mathematics 介紹過 rational function（有理函數），即形如　$\frac{P(x)}{Q(x)}$　者（其中 $P(x)$$Q(x)$ 皆為多項式）。

$P(x)$$Q(x)$ 皆為線性（linear），即形如　$\frac{ax+b}{cx+d}$　者，稱之曰 fractional linear function（FLF）。

$f(f(x))$

$=\frac{af(x)+b}{cf(x)+d}$

$=\frac{a\times \frac{ax+b}{cx+d}+b}{c\times \frac{ax+b}{cx+d}+d}$

$=\frac{(a^2+bc)x+b(a+d)}{c(a+d)x+bc+d^2}$

$M^2$

$=\left(\begin{array}{rcl}a& b\\c& d\\\end{array}\right)\left(\begin{array}{rcl}a& b\\c& d\\\end{array}\right)$

$=\left(\begin{array}{rcl}a^2+bc& b(a+d)\\c(a+d)& bc+d^2\\\end{array}\right)$

http://www.wolframalpha.com/

{{2,-1},{-1,2}}^n

$M=PDP^{-1}$

https://www.symbolab.com/solver/matrix-diagonalization-calculator

$M=\left(\begin{array}{rcl}2& -1\\-1& 2\\\end{array}\right)$
$P=\left(\begin{array}{rcl}-1& 1\\1& 1\\\end{array}\right)$
$P^{-1}=\left(\begin{array}{rcl}-\frac{1}{2}& \frac{1}{2}\\\frac{1}{2}& \frac{1}{2}\\\end{array}\right)$
$D=\left(\begin{array}{rcl}3& 0\\0& 1\\\end{array}\right)$

$\left(\begin{array}{rcl}2& -1\\-1& 2\\\end{array}\right)^n=\frac{1}{2}\left(\begin{array}{rcl}1+3^n& 1-3^n\\1-3^n& 1+3^n\\\end{array}\right)$

$M\left(\begin{array}{rcl}x\\y\\\end{array}\right)=\lambda\left(\begin{array}{rcl}x\\y\\\end{array}\right)$ ………. (1)

$M\left(\begin{array}{rcl}x\\y\\\end{array}\right)-\lambda\left(\begin{array}{rcl}x\\y\\\end{array}\right)=\left(\begin{array}{rcl}0\\0\\\end{array}\right)$

$\Rightarrow M\left(\begin{array}{rcl}x\\y\\\end{array}\right)-\lambda I\left(\begin{array}{rcl}x\\y\\\end{array}\right)=\left(\begin{array}{rcl}0\\0\\\end{array}\right)$

$\Rightarrow (M-\lambda I)\left(\begin{array}{rcl}x\\y\\\end{array}\right)=\left(\begin{array}{rcl}0\\0\\\end{array}\right)$ ………. (2)

$|\left(\begin{array}{rcl}a& b\\c& d\\\end{array}\right)-\left(\begin{array}{rcl}\lambda & 0\\0& \lambda\\\end{array}\right)|=0$

$\Rightarrow (a-\lambda)(d-\lambda)-bc=0$

$\Rightarrow \lambda^2-(a+d)\lambda+(ad-bc)=0$ ………. (3)

$\lambda=\lambda_1$ 代入 (1)，得方程

$M\left(\begin{array}{rcl}x\\y\\\end{array}\right)=\lambda_1\left(\begin{array}{rcl}x\\y\\\end{array}\right)$

$M\left(\begin{array}{rcl}x_1\\y_1\\\end{array}\right)=\lambda_1\left(\begin{array}{rcl}x_1\\y_1\\\end{array}\right)$ ………. (4)

$\left(\begin{array}{rcl}x_1\\y_1\\\end{array}\right)$$M$ 對應 $\lambda_1$ 的特徵向量（eigenvector of $M$ corresponding to $\lambda_1$

$M\left(\begin{array}{rcl}x_2\\y_2\\\end{array}\right)=\lambda_2\left(\begin{array}{rcl}x_2\\y_2\\\end{array}\right)$ ………. (5)

$\left(\begin{array}{rcl}x_2\\y_2\\\end{array}\right)$$M$ 對應 $\lambda_2$ 的特徵向量（eigenvector of $M$ corresponding to $\lambda_2$

$M\left(\begin{array}{rcl}x_1& 0\\y_1& 0\\\end{array}\right)=\lambda_1\left(\begin{array}{rcl}x_1& 0\\y_1& 0\\\end{array}\right)=\left(\begin{array}{rcl}\lambda_1x_1& 0\\\lambda_1y_1& 0\\\end{array}\right)$ ………. (6)

$M\left(\begin{array}{rcl}0& x_2\\0& y_2\\\end{array}\right)=\lambda_2\left(\begin{array}{rcl}0& x_2\\0& y_2\\\end{array}\right)=\left(\begin{array}{rcl}0& \lambda_2x_2\\0& \lambda_2y_2\\\end{array}\right)$ ………. (7)

(6)+(7) 得

$M\left(\begin{array}{rcl}x_1& x_2\\y_1& y_2\\\end{array}\right)=\left(\begin{array}{rcl}\lambda_1x_1& \lambda_2x_2\\\lambda_1y_1& \lambda_2y_2\\\end{array}\right)=\left(\begin{array}{rcl}x_1& x_2\\y_1& y_2\\\end{array}\right)\left(\begin{array}{rcl}\lambda_1& 0\\0& \lambda_2\\\end{array}\right)$

$M=\left(\begin{array}{rcl}x_1& x_2\\y_1& y_2\\\end{array}\right)\left(\begin{array}{rcl}\lambda_1& 0\\0& \lambda_2\\\end{array}\right)\left(\begin{array}{rcl}x_1& x_2\\y_1& y_2\\\end{array}\right)^{-1}$

$\left(\begin{array}{rcl}x_1& x_2\\y_1& y_2\\\end{array}\right)\left(\begin{array}{rcl}\alpha\\\beta\\\end{array}\right)=\left(\begin{array}{rcl}0\\0\\\end{array}\right)$

$\alpha\left(\begin{array}{rcl}x_1\\y_1\\\end{array}\right)+\beta\left(\begin{array}{rcl}x_2\\y_2\\\end{array}\right)=\left(\begin{array}{rcl}0\\0\\\end{array}\right)$ ………. (8)

$M(\alpha\left(\begin{array}{rcl}x_1\\y_1\\\end{array}\right)+\beta\left(\begin{array}{rcl}x_2\\y_2\\\end{array}\right))=M\left(\begin{array}{rcl}0\\0\\\end{array}\right)$

$\alpha M\left(\begin{array}{rcl}x_1\\y_1\\\end{array}\right)+\beta M\left(\begin{array}{rcl}x_2\\y_2\\\end{array}\right)=\left(\begin{array}{rcl}0\\0\\\end{array}\right)$

$\alpha \lambda_1\left(\begin{array}{rcl}x_1\\y_1\\\end{array}\right)+\beta \lambda_2\left(\begin{array}{rcl}x_2\\y_2\\\end{array}\right)=\left(\begin{array}{rcl}0\\0\\\end{array}\right)$ ………. (9)

$\alpha \lambda_1\left(\begin{array}{rcl}x_1\\y_1\\\end{array}\right)+\beta \lambda_1\left(\begin{array}{rcl}x_2\\y_2\\\end{array}\right)=\left(\begin{array}{rcl}0\\0\\\end{array}\right)$ ………. (10)

(9)-(10) 得

$\beta (\lambda_2-\lambda_1)\left(\begin{array}{rcl}x_2\\y_2\\\end{array}\right)=\left(\begin{array}{rcl}0\\0\\\end{array}\right)$

$\beta =0$ 代入 (8)，由於 $\left(\begin{array}{rcl}x_1\\y_1\\\end{array}\right)$ 是非零矩陣，得 $\alpha =0$

e.g.1

$M=\left(\begin{array}{rcl}2& -1\\-1& 2\\\end{array}\right)$

$\left|\begin{array}{rcl}2-\lambda & -1\\-1& 2-\lambda \\\end{array}\right|=0\Rightarrow \lambda =3,1$

$\lambda =3$，(1) 變為　$\left(\begin{array}{rcl}2-3& -1\\-1& 2-3\\\end{array}\right)\left(\begin{array}{rcl}x\\y\\\end{array}\right)=\left(\begin{array}{rcl}0\\0\\\end{array}\right)$

$x+y=0$，可知 $\left(\begin{array}{rcl}x\\y\\\end{array}\right)=\left(\begin{array}{rcl}-t\\t\\\end{array}\right)$，其中 $t\in \mathbb{R}$

$\lambda =1$，(1) 變為　$\left(\begin{array}{rcl}2-1& -1\\-1& 2-1\\\end{array}\right)\left(\begin{array}{rcl}x\\y\\\end{array}\right)=\left(\begin{array}{rcl}0\\0\\\end{array}\right)$

$x-y=0$，可知 $\left(\begin{array}{rcl}x\\y\\\end{array}\right)=\left(\begin{array}{rcl}t\\t\\\end{array}\right)$，其中 $t\in \mathbb{R}$

$\left(\begin{array}{rcl}x_2\\y_2\\\end{array}\right)=\left(\begin{array}{rcl}1\\1\\\end{array}\right)$

$\left(\begin{array}{rcl}2& -1\\-1& 2\\\end{array}\right)=\left(\begin{array}{rcl}-1& 1\\1& 1\\\end{array}\right)\left(\begin{array}{rcl}3& 0\\0& 1\\\end{array}\right)\left(\begin{array}{rcl}-1& 1\\1& 1\\\end{array}\right)^{-1}$

e.g.2

$M=\left(\begin{array}{rcl}3& -2\\4& -1\\\end{array}\right)$

$\left|\begin{array}{rcl}3-\lambda & -2\\4& -1-\lambda \\\end{array}\right|=0\Rightarrow \lambda =1\pm 2i$

$\lambda =1+2i$，(1) 變為　$\left(\begin{array}{rcl}3-1-2i& -2\\4& 2-1-2i\\\end{array}\right)\left(\begin{array}{rcl}x\\y\\\end{array}\right)=\left(\begin{array}{rcl}0\\0\\\end{array}\right)$

$\left(\begin{array}{rcl}x_1\\y_1\\\end{array}\right)=\left(\begin{array}{rcl}1\\1-i\\\end{array}\right)$

$\lambda =1-2i$，(1) 變為　$\left(\begin{array}{rcl}3-1+2i& -2\\4& 2-1+2i\\\end{array}\right)\left(\begin{array}{rcl}x\\y\\\end{array}\right)=\left(\begin{array}{rcl}0\\0\\\end{array}\right)$

$\left(\begin{array}{rcl}x_2\\y_2\\\end{array}\right)=\left(\begin{array}{rcl}1\\1+i\\\end{array}\right)$

$\left(\begin{array}{rcl}3& -2\\4& -1\\\end{array}\right)=\left(\begin{array}{rcl}1& 1\\1-i& 1+i\\\end{array}\right)\left(\begin{array}{rcl}1+2i& 0\\0& 1-2i\\\end{array}\right)\left(\begin{array}{rcl}1& 1\\1-i& 1+i\\\end{array}\right)^{-1}$

$\left(\begin{array}{rcl}1& 1\\1-i& 1+i\\\end{array}\right)^{-1}=\frac{1}{1+i-1+i}\left(\begin{array}{rcl}1+i& -(1-i)\\-1& 1\\\end{array}\right)^T=\frac{1}{2}\left(\begin{array}{rcl}1-i& 1\\1+i& -i\\\end{array}\right)$

$\left(\begin{array}{rcl}3& -2\\4& -1\\\end{array}\right)^n$

$=\frac{1}{2}\left(\begin{array}{rcl}1& 1\\1-i& 1+i\\\end{array}\right)\left(\begin{array}{rcl}(1+2i)^n& 0\\0& (1-2i)^n\\\end{array}\right)\left(\begin{array}{rcl}1-i& i\\1+i& -i\\\end{array}\right)$

$1+i=cis\frac{\pi}{4}$
$1-i=cis(-\frac{\pi}{4})$
$1+2i=\sqrt{5}cis\theta$
$1-2i=\sqrt{5}(-cis\theta)$

$(1+2i)^n=\sqrt{5^n}cis(n\theta)$
$(1-2i)^n=\sqrt{5^n}cis(-n\theta)$

$\left(\begin{array}{rcl}3& -2\\4& -1\\\end{array}\right)^n$

$=\frac{1}{2}\left(\begin{array}{rcl}\sqrt{5^n}cis(n\theta)& \sqrt{5^n}cis(-n\theta)\\\sqrt{2\cdot 5^n}cis(n\theta-\frac{\pi}{4})& \sqrt{2\cdot 5^n}cis(n\theta+\frac{\pi}{4})\\\end{array}\right)\left(\begin{array}{rcl}1-i& i\\1+i& -i\\\end{array}\right)$

$=\left(\begin{array}{rcl}\sqrt{2\cdot 5^n}\cos(n\theta-\frac{\pi}{4})& -\sqrt{5^n}\sin(n\theta)\\2\sqrt{5^n}\sin(n\theta)& -\sqrt{2\cdot 5^n}\sin(n\theta-\frac{\pi}{4})\\\end{array}\right)$

1. 一些矩陣會出現 $M^m=kM$ 的情況，對應的 FLF 就是周期性（periodic），例如 $\left(\begin{array}{rcl}1& 1\\2& -1\\\end{array}\right)^3=3\left(\begin{array}{rcl}1& 1\\2& -1\\\end{array}\right)$，故 $f^{[3]}(x)\equiv f(x)$，其中 $f(x)=\frac{x+1}{2x-1}$

2. 對一般的 nxn 矩陣 $M$，若其特徵值各異（distinct），則它必能被對角化，從而找到 $M^n$

3. 當 $M$ 的特徵值並非各異，$M$ 仍有可能被對角化。

4. 就算 $M$ 不能被對角化，我們當然仍可找 $M^n$

5. M2 不似 pure mathematics 課程，沒有強調矩陣乘法對應線性變換，故學生大抵不清楚有關特徵向量的圖像意義。

1. 設 $f(x)=\frac{x+2}{x+3}$，求 $f^{[n]}(x)$

2. 設 $f(x)=\frac{2x-1}{x+4}$，求 $f^{[n]}(x)$

3. 已知 $\left \{ \begin{array}{ll} \frac{dx}{dt}=ax+by\\\frac{dy}{dt}=cx+dy\end{array}\right.$。證明 $A\frac{d^2x}{dt^2}+B\frac{dx}{dt}+Cx=0$，其中 $A,B,C$ 是常數。比較上述式子與 $M=\left(\begin{array}{rcl}a& b\\c& d\\\end{array}\right)$ 的特徵方程，有甚麼發現？