李宏毅_Linear Algebra Lecture 5: Matrix-vector Product
課程撥放清單
Linear Algebra Lecture 5: Matrix-vector Product
課程連結
Matrix-Vector Product
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
假設Matrix的維度為mxn,那Vector的維度必需為nx1,否則無法計算。
計算的過程也非常簡單,將Vector的第1個元素乘上Matrix的Column 1元素,第2個元素乘上Matrix的Column 2的元素,依此類推,每個Row最後元素加總起來就是結果。
Matrix-Vector Product
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
整個式子就跟解多元一次聯立方程式一樣,左邊部份就是Matrix-與Vector-相乘,而得到的結果就是Vector-,因此。
以線性系統來看的話,描述線性系統的參數就是Matrix-(mxn),輸入的部份則為(nx1),輸出即為。
Row Aspect
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
以Row的角度來看,就是的每一個row都跟vector-做一次inner product,然後得到一個scalar
Column Aspect
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
從Column的角度來看,將的每一個column都看成一個vector,然後乘上相對應索引的vector-的元素,再將這些vector加總,就是Matrix與Vector的product。
Example
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
上面範例說明兩個不同觀點的計算過程。
Matrix-Vector Product
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
Matrix跟Vector要做Product的時候,其維度一定要相同,Matrix(mxn),Vector(nx1),因Matrix-是無法做Product,但Matrix-、Matrix-是可以的。
Properties of Matrix-Vector Product
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
假設、是Matrix,維度皆為(mxn),是vector,,是scalar:
- 得到一個mx1的0向量
- 得到一個mx1的0向量
- ,identity matrix乘上vector會得到本身vector
Properties of Matrix-Vector Product
Image Not Showing
Possible Reasons
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →
假設A、B都是Matrix,維度為mxn,任意Vector-w與它們相乘都會相等,即,則。
證明如下:
- 假設乘上standard vector-,以Column的角度來看,很明顯的,的結果是只在第1個元素位置上有值,其餘皆為0,加總就是。
- 假設即代表
- 以此類推可得
- 以此可證,
要證明兩個Matrix是否相同,只要利用standard vector驗證輸出是否相同就可以。
註:standard vector 代表只在j的地方為1,其餘為0。