Matrices and Vectors
-
Matrices
2-dimensional arrays
Dimension = num row * num col
refers to the element in the ith row and jth column of matrix A
-
Vectors
1-dimenstional arrays with one column and many rows
A vector with 'n' rows is referred to as an 'n'-dimensional vector, or
Dimension = num of rows
refers to the element in the ith row of the vector.
Matrix addition
-
相同dimensions可加,不同dimensions不可加
-
相加时把对应matrix的
元素相加即可
Scalar multiplication
-
Multiply the scalar to each and every element in the matrix --
Matrix-Matrix Multiplication
- m x n multiplied by n x o matrix = m x o.
- e.g. a 3 x 2 matrix times a 2 x 2 matrix resulted in a 3 x 2 matrix.
矩阵相乘性质:
交换律不成立 A X B != B X A
结合律成立 (A X B) X C = A X (B X C)
Identity Matrix
-
对角线都是1
-
性质:
For any matrix A (m x n), there exist identity matrix I (n x n) that satisfies –
A X I = I X A = A
Matrix Inverse
If matrix A is a square matrix (m x m), and it has an inverse (not ‘singular’ or ‘degenerated’), then
A x
=
x A = I
Singular/ degenerated matrix
Matrix that does not have an inverse
Matrix Transpose
行列交换,e.g. A is 3 x 2, then is 2 x 3
is the same as