「統計解析のための線形代数」復習筆記 28

行向量乘以矩陣,乘以列向量可得標量

\(\underset{1\times m}{\underline{x}^t}\underset{m\times m}{M}\underset{m\times1}{\underline{x}}\) 或者 \(\underset{1\times m}{\underline{x}^t}\underset{m\times n}{N}\underset{n\times1}{\underline{y}}\) 的形式其實質上均爲 \(1\times1\)的標量,即最早我們接觸到的加法算式

這樣的乘法計算通過矩陣(包括向量)的積的定義很容易進行。然而,反過來的話,(即從乘法算式反寫變形成爲行向量,矩陣,列向量相乘的形式),如果沒有練習的話,常常讓人覺得很困難。

在這裏,我們將多元變量分析中常常遭遇的加法算式拿出來舉例,練習變形成爲矩陣的積的形式。當然,爲了簡便起見,我們用三個元素的向量來練習: \[\underline{x}=\left( \begin{array}{c} x_1 \\ x_2 \\ x_3 \end{array}\right), \underline{a}=\left( \begin{array}{c} a_1 \\ a_2 \\ a_3 \end{array}\right)\]

  1. \(a_1x_1^2+a_2x_2^2+a_3x_3^3\\ =x_1\times a_1x_1+x_2\times a_2x_2+x_3\times a_3x_3\\ =(x_1,x_2,x_3)\left( \begin{array}{c} a_1x_1 \\ a_2x_2 \\ a_3x_3 \end{array}\right)\\ =(x_1,x_2,x_3)\left( \begin{array}{c} a_1 & 0 & 0 \\ 0 & a_2 & 0 \\ 0 & 0 & a_3 \end{array}\right)\left( \begin{array}{c} x_1 \\ x_2 \\ x_3 \end{array}\right)\\ =\underline{x}^tD\underline{x}\)
    其中 \[D=\left( \begin{array}{c} a_1 & 0 & 0 \\ 0 & a_2 & 0 \\ 0 & 0 & a_3 \end{array}\right)\]

  2. \((a_1x_1+a_2x_2+a_3x_3)^2\\ =(a_1x_1+a_2x_2+a_3x_3)^t(a_1x_1+a_2x_2+a_3x_3)\\=\left\{(a_1, a_2, a_3)\left( \begin{array}{c} x_1 \\ x_2 \\ x_3 \end{array}\right)\right\}^t(a_1, a_2, a_3)\left( \begin{array}{c} x_1 \\ x_2 \\ x_3 \end{array}\right)\\ =(\underline{a}^t\underline{x})^t\underline{a}^t\underline{x}\\ =\underline{x}^t\underline{a}\underline{a}^t\underline{x}\\ \Rightarrow\\ =\underline{x}^t\left( \begin{array}{c} a_1 & 0 & 0 \\ a_2 & 0 & 0 \\ a_3 & 0 & 0 \end{array}\right)\left( \begin{array}{c} a_1 & a_2 & a_3 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{array}\right)\underline{x}\\ =\underline{x}^tAA^t\underline{x}\\ =\underline{x}A_0\underline{x}\)
    其中 \[A=\left( \begin{array}{c} a_1 & 0 & 0 \\ a_2 & 0 & 0 \\ a_3 & 0 & 0 \end{array}\right), A_0=\left( \begin{array}{c} a_1^2 & a_1a_2 & a_1a_3 \\ a_2a_1 & a_2^2 & a_2a_3 \\ a_3a_1 & a_3a_2 & a_3^2 \end{array}\right)\]

  3. \((a_1x_1+a_2x_2+a_3x_3)^2+(b_1x_1+b_2x_2+b_3x_3)^2\\+(c_1x_1+c_2x_2+c_3x_3)^2\\ =\underline{x}^t\underline{a}\underline{a}^t\underline{x}+\underline{x}^t\underline{b}\underline{b}^t\underline{x}+\underline{x}^t\underline{c}\underline{c}^t\underline{x}\\ =\underline{x}^t(\underline{a}\underline{a}^t+\underline{b}\underline{b}^t+\underline{c}\underline{c}^t)\underline{x}\\ =\underline{x}^t(\underline{a} \underline{b} \underline{c})\left( \begin{array}{c} \underline{a}^t \\ \underline{b}^t \\ \underline{c}^t \end{array}\right)\underline{x}\\ =\underline{x}^t\left( \begin{array}{c} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{array}\right)\left( \begin{array}{c} a_1 & a_1 & a_1 \\ b_2 & b_2 & b_2 \\ c_3 & c_3 & c_3 \end{array}\right)\underline{x}\\ =\underline{x}^tBB^t\underline{x}\)
    其中 \[B=\left( \begin{array}{c} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{array}\right)\]

  4. \(\frac{(a_1x_1+a_2x_2+a_3x_3)^2}{d_1}+ \frac{(b_1x_1+b_2x_2+b_3x_3)^2}{d_2}\\ +\frac{(c_1x_1+c_2x_2+c_3x_3)^2}{d_3}\)
    根據上面第1個練習 \(=(a_1x_1+a_2x_2+a_3x_3, b_1x_1+b_2x_2+b_3x_3, c_1x_1+c_2x_2+c_3x_3)\\ \left( \begin{array}{c} 1/d_1 & 0 & 0 \\ 0 & 1/d_2 & 0 \\ 0 & 0 & 1/d_3 \end{array}\right)\left( \begin{array}{c} a_1x_1+a_2x_2+a_3x_3 \\ b_1x_1+b_2x_2+b_3x_3 \\ c_1x_1+c_2x_2+c_3x_3 \end{array}\right)\\ =(x_1,x_2,x_3)\left( \begin{array}{c} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{array}\right)\left( \begin{array}{c} 1/d_1 & 0 & 0 \\ 0 & 1/d_2 & 0 \\ 0 & 0 & 1/d_3 \end{array}\right)\\ \left( \begin{array}{c} a_1 & a_1 & a_1 \\ b_2 & b_2 & b_2 \\ c_3 & c_3 & c_3 \end{array}\right)\left( \begin{array}{c} x_1 \\ x_2 \\ x_3 \end{array}\right)\\ =\underline{x}^tBD^{-1}B^t\underline{x}\)
    其中 \[D^{-1}=\left( \begin{array}{c} 1/d_1 & 0 & 0 \\ 0 & 1/d_2 & 0 \\ 0 & 0 & 1/d_3 \end{array}\right) \;(d_1d_2d_3\neq0), B 與上面3. 相同。\]

Related

comments powered by Disqus