Quote: This section is basically a review of linear algebra in college.
1. Matrix and Vector Matrix definition: Matrix is a set of complex numbers or real numbers arranged according to a rectangular array. It originally comes from the square Matrix composed of coefficients and constants of equations. Matrix: Rectangular array of numbersThe dimension of a matrix: refers to the number of rows and columns, as shown above for a 4×2 matrix
Dimension of matrix: number of rows x number of columns dimension of matrix: number of rows x number of columns
Vectors are special matrices: matrices that have only one column, vectors are usually represented by lowercase letters, matrices are usually represented by uppercase letters, vectors have subscripts starting at 0 and 1, and it’s more common to use subscripts starting at 1 in machine learning.
2. Addition and scalar multiplication matrix addition: Two matrices with the same row and column add Aij and Bij. For example, the result C11 (C is the result) = A11 + B11, and 5 = 1 + 4. The rest of the results are also directly corresponding to the sum of the results. But only matrices with the same row and column can be added, not different columns.
Scalar multiplication of matrices: Multiply each term of a matrix by a scalar.
3. Matrix vector multiplication this I learned in college, remember the teacher said the formula left row times right column
Matrix multiplication is the same as matrix vector multiplication, multiplying the left row by the right column to add the result. A vector is a special kind of matrix. AxB can be multiplied only if the number of columns of A is equal to the number of rows of B, A (matrix of MXN), B (matrix of NXO), resulting in C (matrix of MXO), which can be understood as column N of A and row N of B cancel each other, leaving row M of A and column O of B
There are some characteristics of matrix multiplication, such as the commutative law and associative law that we learn in primary and secondary schools.
5.1 Matrix multiplication does not comply with the commutative law, A x B! Is equal to B x A.
5.2 The matrix multiplication satisfies the associative law,(A x B) x C = A x (B x C).
5.3 An identity matrix is like the unit 1 of the natural numbers. The diagonal values of the identity matrix are all 1. AxI = IxA =A (I is the identity matrix).6. Inverse and inverse of transposed matrices: A square matrix A of order N is said to be invertible, or nonsingular. If there exists A square matrix B of order N such that AB=BA=E, B is said to be an inverse matrix of A. The inverse of A is called A minus 1. By analogy the natural numbers are the inverse and the reciprocal, the reciprocal of 2 is 1/2, and when you multiply them together you get 1. The matrix A and the inverse of the matrix A produce the identity matrix ETranspose of matrix: Mirror inversion of all elements of A around A ray 45 degrees to the lower right from elements in row 1 and column 1, namely, the transpose of A. The simple way to think about it is the transpose of the matrix, A is an MXN matrix, the transpose of the matrix is AT is an NXM matrix, A and AT transpose each other.