108 年 國立成功大學製造資訊與系統研究所甲組《工程數學》

📄 試題原卷 免費註冊後即可對照原始考卷 PDF免費註冊

第 1 題20 分

  1. (20%) If a n-dimension vector AA has one average value Aˉ\bar{A} over all vector elements, and the other n-dimension vector BB has its average value Bˉ\bar{B} over all vector elements.
    (1) What is the n×nn \times n Correlation matrix CC of AA and BB? (10%)
    (2) What is the n×nn \times n Covariance matrix C′C' of AA and BB? (10%)

登入後即可作答並保存紀錄。

這一題的完整詳解

(1) 相關矩陣 CC

先定義兩向量的中心化形式

A~=A−Aˉ1n,B~=B−Bˉ1n,\tilde A=A-\bar A\mathbf 1_n,\qquad \tilde B=B-\bar B\mathbf 1_n,

其中 1n\mathbf 1_n 為全 1 向量。

向量 A~\tilde A、B~\tilde B 的標準差

σA=1n∑i=1nA~i2,σB=1n∑i=1nB~i2.\sigma_A=\sqrt{\frac1n\sum_{i=1}^{n}\tilde A_i^{2}},\qquad \sigma_B=\sqrt{\frac1n\sum_{i=1}^{n}\tilde B_i^{2}} .

相關係數矩陣的每一個元素為

Cij=A~i B~jσA σB,i,j=1,…,n.C_{ij}= \frac{\tilde A_i\,\tilde B_j}{\sigma_A\,\sigma_B}, \qquad i,j=1,\dots ,n .

以矩陣寫法則是

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 2 題20 分

  1. (20%) If there are two vectors AA and BB as following figure, and the intersection angle between both vectors is θ\theta,
    (1) What is the unit vector of AA? (5%)
    (2) What is the projection length of vector AA to vector BB? (Please represent the result by using θ\theta) (5%)
    (3) What is the projection length of vector AA to vector BB? (Please represent the result without using θ\theta) (10%)
    🖼️【此處有附圖,請對照原卷】
🖼️ 本題含圖表,以下為原卷對應頁面:
原卷第 1 頁

登入後即可作答並保存紀錄。

這一題的完整詳解

圖形資訊說明

目前附上的掃描圖為經濟學選擇題,未包含本題所述的向量圖,因此無法讀取向量 AA、BB 的具體座標或長度。以下依題目已知的向量表示法作答。

核心觀念

本題使用:

  • 向量 AA 的長度:∣A∣|A|
  • 向量的單位向量:原向量除以其長度
  • 向量內積公式:
A⋅B=∣A∣∣B∣cos⁡θA\cdot B=|A||B|\cos\theta

向量 AA 在向量 BB 方向上的投影長度,可由內積除以 ∣B∣|B| 求得。

解題方法

(1)向量 AA 的單位向量

單位向量的定義是「方向與原向量相同,長度等於 11」,因此:

A^=A∣A∣\hat{A}=\frac{A}{|A|}

若

A=(a1,a2,…,an),A=(a_1,a_2,\ldots,a_n),

則

∣A∣=a12+a22+⋯+an2|A|=\sqrt{a_1^2+a_2^2+\cdots+a_n^2}

所以:

A^=(a1,a2,…,an)a12+a22+⋯+an2\hat{A} = \frac{(a_1,a_2,\ldots,a_n)} {\sqrt{a_1^2+a_2^2+\cdots+a_n^2}}

(2)以 θ\theta 表示 AA 投影到 BB 的長度

由內積公式:

A⋅B=∣A∣∣B∣cos⁡θA\cdot B=|A||B|\cos\theta

投影長度為:

comp⁡BA=A⋅B∣B∣\operatorname{comp}_B A = \frac{A\cdot B}{|B|}

代入內積公式:

comp⁡BA=∣A∣∣B∣cos⁡θ∣B∣=∣A∣cos⁡θ\operatorname{comp}_B A = \frac{|A||B|\cos\theta}{|B|} = |A|\cos\theta

因此,投影長度為:

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 3 題20 分

  1. (20%) Determine the eigenvalues (10%) and eigenvectors (10%) of the matrix:
A=[10824]A = \begin{bmatrix} 10 & 8 \\ 2 & 4 \end{bmatrix}

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

對方陣 AA 而言:

  • 特徵值 λ\lambda 必須滿足特徵方程
    det⁡(A−λI)=0。\det(A-\lambda I)=0。
  • 找到特徵值後,將其代入
    (A−λI)x=0(A-\lambda I)\mathbf{x}=\mathbf{0}
    求得的非零向量 x\mathbf{x},即為對應的特徵向量。

其中 II 為二階單位矩陣。

解題方法

給定

A=[10824].A=\begin{bmatrix}10&8\\2&4\end{bmatrix}.

先計算特徵方程:

det⁡(A−λI)=det⁡[10−λ824−λ].\det(A-\lambda I) = \det\begin{bmatrix} 10-\lambda&8\\ 2&4-\lambda \end{bmatrix}.

因此

det⁡(A−λI)=(10−λ)(4−λ)−8⋅2=40−14λ+λ2−16=λ2−14λ+24=(λ−12)(λ−2).\begin{aligned} \det(A-\lambda I) &=(10-\lambda)(4-\lambda)-8\cdot2\\ &=40-14\lambda+\lambda^2-16\\ &=\lambda^2-14\lambda+24\\ &=(\lambda-12)(\lambda-2). \end{aligned}

令特徵方程等於零:

(λ−12)(λ−2)=0。(\lambda-12)(\lambda-2)=0。

所以兩個特徵值為

λ1=12,λ2=2。\lambda_1=12,\qquad \lambda_2=2。

求 λ=12\lambda=12 對應的特徵向量

代入

(A−12I)x=0:(A-12I)\mathbf{x}=\mathbf{0}: A−12I=[−282−8].A-12I= \begin{bmatrix} -2&8\\ 2&-8 \end{bmatrix}.

設特徵向量為

x=[xy],\mathbf{x}=\begin{bmatrix}x\\y\end{bmatrix},

則

−2x+8y=0。-2x+8y=0。

整理得

x=4y。x=4y。

取 y=1y=1,可得一組特徵向量

v1=[41].\mathbf{v}_1=\begin{bmatrix}4\\1\end{bmatrix}.

因此,所有對應於 λ=12\lambda=12 的特徵向量皆可寫成

x=c[41],c≠0。\mathbf{x}=c\begin{bmatrix}4\\1\end{bmatrix}, \qquad c\neq0。
🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 4 題20 分

  1. (20%) Given following equations:
    a11x1+a12x2=b1a_{11}x_1 + a_{12}x_2 = b_1
    a21x1+a22x2=b2a_{21}x_1 + a_{22}x_2 = b_2
    (1) Please write them to be the format as Ax=bAx=b, where AA is a 2×22 \times 2 matrix, xx is a 2×12 \times 1 vector and bb is also a 2×12 \times 1 vector. (10%)
    (2) Please derive the unknown xx vector by using pseudo inverse approach? (Assume matrix AA has no inverse format A−1A^{-1}. That is, x=A−1bx=A^{-1}b is incorrect. So what is the correct result of x=?x=?) (10%)

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

本題考查兩個觀念:

  1. 將二元一次方程組寫成矩陣形式 Ax=bAx=b。
  2. 當矩陣 AA 不可逆時,使用 Moore–Penrose pseudo-inverse(廣義逆矩陣)求解。

一般可逆情況下,

x=A−1b.x=A^{-1}b.

但題目已指定 AA 沒有逆矩陣,因此不能使用 A−1A^{-1},正確工具是偽逆矩陣 A+A^+,其解寫成

x=A+b.x=A^+b.

此解在方程組無精確解時,代表最小平方法解;在有多組精確解時,代表其中範數最小的解。


(1)寫成 Ax=bAx=b

原方程組為

a11x1+a12x2=b1,a_{11}x_1+a_{12}x_2=b_1, a21x1+a22x2=b2.a_{21}x_1+a_{22}x_2=b_2.

將未知數、係數與常數分別排列成矩陣與向量:

A=[a11a12a21a22],x=[x1x2],b=[b1b2].A= \begin{bmatrix} a_{11} & a_{12}\\ a_{21} & a_{22} \end{bmatrix}, \qquad x= \begin{bmatrix} x_1\\ x_2 \end{bmatrix}, \qquad b= \begin{bmatrix} b_1\\ b_2 \end{bmatrix}.

因此,

[a11a12a21a22][x1x2]=[b1b2]\boxed{ \begin{bmatrix} a_{11} & a_{12}\\ a_{21} & a_{22} \end{bmatrix} \begin{bmatrix} x_1\\ x_2 \end{bmatrix} = \begin{bmatrix} b_1\\ b_2 \end{bmatrix} }

也就是

Ax=b.\boxed{Ax=b}.

(2)使用偽逆矩陣求解

方法一:由最小平方法推導

當 AA 不可逆時,直接解 A−1bA^{-1}b 不成立。此時考慮尋找一個 xx,使得誤差

∥Ax−b∥2\|Ax-b\|^2

最小。

令

f(x)=∥Ax−b∥2=(Ax−b)T(Ax−b).f(x)=\|Ax-b\|^2=(Ax-b)^T(Ax-b).

展開得

f(x)=xTATAx−2xTATb+bTb.f(x)=x^TA^TAx-2x^TA^Tb+b^Tb.

對 xx 微分並令其為零:

∇f(x)=2ATAx−2ATb=0.\nabla f(x)=2A^TAx-2A^Tb=0.

因此得到 normal equation:

ATAx=ATb.A^TAx=A^Tb.

若 ATAA^TA 可逆,則

x=(ATA)−1ATb.x=(A^TA)^{-1}A^Tb.

這時偽逆矩陣為

A+=(ATA)−1AT,A^+=(A^TA)^{-1}A^T,

所以

x=A+b=(ATA)−1ATb.\boxed{x=A^+b=(A^TA)^{-1}A^Tb}.

不過,本題特別說明 AA 沒有逆矩陣。對於 2×22\times2 方陣而言,這通常表示

det⁡(A)=a11a22−a12a21=0,\det(A)=a_{11}a_{22}-a_{12}a_{21}=0,

因此 AA 的秩小於 22。此時 ATAA^TA 也可能不可逆,不能無條件套用 (ATA)−1AT(A^TA)^{-1}A^T。


方法二:以奇異值分解定義偽逆

偽逆矩陣最一般的定義是使用奇異值分解。令

A=UΣVT,A=U\Sigma V^T,

其中 U,VU,V 為正交矩陣,而 Σ\Sigma 為含有奇異值的對角矩陣。

若

Σ=[σ100σ2],\Sigma= \begin{bmatrix} \sigma_1&0\\ 0&\sigma_2 \end{bmatrix},

則其偽逆矩陣為

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 5 題20 分

  1. (20%) For Sum of Squared Differences (SSD) format as following, please solve the unknown constant value d=?d=?
min⁡dE=∑x∈R[I(x+d)–T(x)]2\min_{d} E = \sum_{x \in \mathbb{R}} [I(x + d) – T(x)]^2

by the first order Taylor series expansion: I(x+d)≈I(x)+∂I(x)∂xdI(x + d) \approx I(x) + \frac{\partial I(x)}{\partial x}d. That is, starting from :

∂E∂d=0\frac{\partial E}{\partial d} = 0

(Note: If partially correct, you will obtain partial points)

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

本題考查以一階 Taylor 展開將影像位移問題線性化,再利用最小平方法求未知位移常數 dd。

SSD(Sum of Squared Differences)能量函數為

E(d)=∑x∈R[I(x+d)−T(x)]2E(d)=\sum_{x\in\mathbb{R}}[I(x+d)-T(x)]^2

其中:

  • I(x)I(x):原始影像函數
  • T(x)T(x):目標影像函數
  • dd:待求的位移常數
  • Ix(x)=∂I(x)∂xI_x(x)=\dfrac{\partial I(x)}{\partial x}:影像在 xx 處的空間梯度

題目指定使用一階 Taylor 展開:

I(x+d)≈I(x)+Ix(x)dI(x+d)\approx I(x)+I_x(x)d

解題方法與推導

將 Taylor 近似代入 SSD 能量函數:

E(d)≈∑x∈R[I(x)+Ix(x)d−T(x)]2E(d)\approx \sum_{x\in\mathbb{R}} \left[I(x)+I_x(x)d-T(x)\right]^2

令殘差為

r(x)=I(x)+Ix(x)d−T(x)r(x)=I(x)+I_x(x)d-T(x)

因此

E(d)=∑x∈Rr(x)2E(d)=\sum_{x\in\mathbb{R}}r(x)^2

根據最小值的一階必要條件:

∂E∂d=0\frac{\partial E}{\partial d}=0

對 dd 微分,利用鏈鎖律:

∂E∂d=2∑x∈R[I(x)+Ix(x)d−T(x)]Ix(x)\frac{\partial E}{\partial d} = 2\sum_{x\in\mathbb{R}} \left[I(x)+I_x(x)d-T(x)\right]I_x(x)

令其等於零:

2∑x∈R[I(x)+Ix(x)d−T(x)]Ix(x)=02\sum_{x\in\mathbb{R}} \left[I(x)+I_x(x)d-T(x)\right]I_x(x)=0

除以 22:

∑x∈R[I(x)+Ix(x)d−T(x)]Ix(x)=0\sum_{x\in\mathbb{R}} \left[I(x)+I_x(x)d-T(x)\right]I_x(x)=0

展開各項:

∑x∈RIx(x)[I(x)−T(x)]+d∑x∈RIx(x)2=0\sum_{x\in\mathbb{R}}I_x(x)\left[I(x)-T(x)\right] + d\sum_{x\in\mathbb{R}}I_x(x)^2=0

移項後得到:

d∑x∈RIx(x)2=∑x∈RIx(x)[T(x)−I(x)]d\sum_{x\in\mathbb{R}}I_x(x)^2 = \sum_{x\in\mathbb{R}}I_x(x)\left[T(x)-I(x)\right]

故未知位移常數為

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

其他考古題

108 年成功大學的其他科目

成功大學《工程數學》其他年度