Source video: 【俗说矩阵】矩阵乘法不神秘,揭开面纱很容易!
Given two linear systems:
$$ \begin{array}{cc} \begin{cases} x₁ + 2x₂ = y₁ \\ 3x₁ + 4x₂ = y₂ \end{cases} & \begin{cases} 5y₁ + 6y₂ = 23 \\ 7y₁ + 8y₂ = 31 \end{cases} \end{array} $$
Unlike the previous example, the constant terms of the left system is not fixed, but variables y₁, y₂. And the variables in the right system are y₁, y₂.
Now, How to solve x₁, x₂ based on these 2 systems (compound equation system)?
The first step is to eliminate the intermediate variables y₁, y₂.
One of methods is substituting the y₁, y₂ into the left system, so as to get a compound matrix:
$$ \begin{cases} 5(x₁ + 2x₂) + 6(3x₁ + 4x₂) = 23 \\ 7(x₁ + 2x₂) + 8(3x₁ + 4x₂) = 31 \end{cases} ⇒ \begin{cases} 23x₁ + 34x₂ = 23 \\ 31x₁ + 46x₂ = 31 \end{cases} $$
The above three system of equations can be represented with matrices and vectors:
$$ \begin{array}{ccc} \begin{array}{c} \{^{x₁ + 2x₂ = y₁} _{3x₁ + 4x₂ = y₂} \\ ⇓\\ [^{1\ 2}_{3\ 4}] [^{x₁}_{x₂}] = [^{y₁}_{y₂}] \\ ⇓\\ f([^{x₁}_{x₂}]) = [^{y₁}_{y₂}] \end{array} & \begin{array}{c} \{^{5y₁ + 6y₂ = 23} _{7y₁ + 8y₂ = 31} \\ ⇓\\ [^{5\ 6}_{7\ 8}] [^{y₁}_{y₂}] = [^{23}_{31}] \\ ⇓\\ g([^{y₁}_{y₂}]) = [^{23}_{31}] \end{array} & \begin{array}{c} \{^{23x₁ + 34x₂ = 23} _{31x₁ + 46x₂ = 31}\\ ⇓\\ [^{23\ 34}_{31\ 46}] [^{x₁}_{x₂}] = [^{23}_{31}] \\ ⇓\\ g(f([^{x₁}_{x₂}])) = g∘f([^{x₁}_{x₂}]) = [^{23}_{31}] \end{array} \end{array} $$
In fact,the coefficient matrix maps the unknowns vector to the outcome vector. And the above 3rd system is a compound mapping from $[^{x₁}_{x₂}]$ to $[^{23}_{31}]$
Therefore, each coefficient matrix is a mapping function: $[^{1\ 2}_{3\ 4}] ⇔ f$; $[^{5\ 6}_{7\ 8}]⇔ g$; and $[^{23\ 34}_{31\ 46}] ⇔ g∘f$
Compound mapping matrix
The relation between the compound mapping and its component mapping matrix.
The compound mapping matrix comes from “merging” two system through multiplication and add as follow:
$$g∘f ⇔ [^{23\ 34}_{31\ 46}] = [^{5×1+6×3 \quad 5×2+6×4} _{7×1+8×3 \quad 7×2+8×4} ] = [^{5\ 6}_{7\ 8}]∘[^{1\ 2}_{3\ 4}] $$
Therefore, this kind of compound operation rules between 2 matrices can be defined as matrix multiplication.
For the sake of convenience, the ring operator is omitted, then the matrix multiplication is written as: $[^{5\ 6}_{7\ 8}] [^{1\ 2}_{3\ 4}]$. Obviously, the result of 2-matrices multiplication is still a matrix.
Law of matrix multiplication
$$ \begin{array}{c} _{} \\ ^{r_{L1}} _{r_{L2}} [^{5\ 6} _{7\ 8} ] \end{array} \begin{array}{c} _{c_{L1}}\ _{c_{L2}} \\ [^{1\ 2} _{3\ 4} ] \end{array} \begin{array}{c} _{}\\ = \end{array} \begin{array}{c} _{} \\ [^{5×1+6×3 \quad 5×2+6×4} _{7×1+8×3 \quad 7×2+8×4} ] \end{array} $$
r denotes row; c denotes column; L means left matrix; R means the right matrix. And use $[^{a₁₁\ a₁₂} _{a₂₁\ a₂₂} ]$ to represent the 4 elements in the outcome matrix.
a₁₁ is the sum of the products of the corresponding elements in the first row in the left matrix and the first column in the right matrix,
i.e., the inner product of two vectors:
$a₁₁ = r_{L1}⋅c_{R1} = (5,6)⋅(1,3)$
Similarly,
- $a₁₂ = r_{L1}⋅c_{R2} = (5,6)⋅(2,4)$;
- $a₂₁ = r_{L2}⋅c_{R1} = (7,8)⋅(1,3)$;
- $a₂₂ = r_{L2}⋅c_{R2} = (7,8)⋅(2,4)$;
Rule: Take a row vector from the left matrix, take a column vector from the right matrix, and calculate the inner product of them, then the element position is determined based on the index of row and column.
04:18/08:58