Matrix is an important foundation of 3D mathematics. It is mainly used to describe the relationship between two coordinate systems. by defining an operation, a vector in a coordinate system is converted to another coordinate system. In linear algebra, a matrix is a rectangular digital block organized in rows and columns. A vector is a scalar array and a matrix is a vector array.
Matrix dimension and recording
The dimension of a matrix is defined as the number of rows and columns it contains. An R x C matrix contains column C of the r row. Uppercase letters are used to represent the matrix, for example:M,A,R. When the matrix component needs to be referenced, the subscript method is used. The corresponding italic lowercase letters are often used, as shown in the 3x3 matrix below:
Phalanx
A matrix with the same number of rows and columns is called a square matrix. The diagonal element of a square matrix is the element with the same row number and column number. All other elements are non-corner elements. In short, the corner elements of the square matrix are elements on the diagonal line of the square matrix.
If all non-diagonal elements are 0, this matrix is called a diagonal matrix. The unit matrix is a special diagonal matrix, which is recorded as an n-dimensional unit matrix.IN is the nxn matrix. The diagonal element is 1 and the other element is 0.
The unit matrix is very special because it is the multiplication unit element of the matrix. The basic property is to multiply any matrix by the unit matrix to obtain the original matrix. In a sense, the unit matrix acts on the matrix as 1 acts on a scalar.
Vector used as matrix
The number of rows and columns in the matrix can be any positive integer, including 1. An n-dimensional vector can be regarded as a 1 x n matrix or a n x 1 matrix. The 1 x n matrix is called a row vector, and the N x 1 matrix is called a column vector. The row vector is written in flat mode, and the column vector is written in vertical mode.
Transpose
Consider an R x C matrixM,MAsMT is a c x r matrix, whose columns are composedMIt can be understood from the other hand that it is folded along the diagonal line of the matrix.
For a vector, transpose will convert the row vector into a column vector and convert the column vector into a row vector. See formula 7.3:
Scalar and Matrix Multiplication
MatrixMCan be multiplied by the scalar K, and the result isMA matrix with the same dimension. The formula 7.4 describes how to multiply a matrix and a scalar. scalar is often written on the left without a multiplication number. This multiplication rule is intuitive, that is, multiply KMEach element in.
Matrix Multiplication
In some cases, the two matrices can be multiplied to determine whether a matrix can be multiplied and how to calculate the results seems a little strange at the beginning. One r x n matrixACan be multiplied by an N x C matrixBThe result is an R x C matrix, which is recordedAB.
For example, SetA4x2 matrix,BIs 2X5 matrix, then the resultAB4x5 matrix:
If the MatrixANumber of columns andBIf the number of rows does not match, multiplyABMeaningless.
Matrix multiplication calculation: record the r x n matrixAMatrix with N x CBProduct R x C matrixABIsC.CAny elementCIJ equalsAThe I-th row vector andBResult of vertex multiplication of column J.
Formally defined: