Fortune Telling Collection - Comprehensive fortune-telling - Rules of matrix calculation method

Rules of matrix calculation method

Rules of matrix calculation method:

1. Matrix addition operation

You can also add a matrix. Add the elements in the corresponding positions of the two matrices, and the new matrix is the result of matrix addition. According to its algorithm, only matrices with exactly the same number of rows and columns can be added.

The addition between matrices is out of order. Suppose a and b are both matrices, and A+B = B+A ... It is generally believed that there is no subtraction in matrices. Conceptually, the negative matrix of a matrix is subtracted from a matrix and then added. A-B is the abbreviation of A+(-B). Figure demonstrates the addition of two three-row and three-column matrices.

2. Matrix multiplication operation

Matrix can also be multiplied, but its operation process is much more complicated. Different from arithmetic multiplication, matrix multiplication is not the sum of multiple matrices, and it has its own logic. The algorithm is described in detail as follows: Assuming that matrix A with m rows and n columns and matrix B with r rows and v columns are multiplied to get matrix C, then matrix A and matrix B must satisfy n=r first.

In other words, the number of columns in the first matrix must be the same as that in the second matrix. In operation, all the elements in the I-th row of the first matrix A are multiplied by the elements in the J-th column of the second matrix B, and the multiplication results are added, and the final value is the value in the I-th row and J-th column of the matrix C.

Calculation formula of matrix value

A = (Aij) m× n. According to the principle of elementary row transformation, the original matrix is transformed into a trapezoidal matrix, and the total number of rows MINUS all zero rows is the rank of the matrix. It is transformed into a trapezoidal matrix by elementary row transformation, and the number of non-zero rows in the trapezoidal matrix is the rank of the matrix. Rank of matrix is a concept in linear algebra. In linear algebra, the column rank of matrix A is the maximum number of linearly independent columns of A. ..