freeCodeCamp/guide/chinese/mathematics/how-to-multiply-matrices/index.md

49 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

---
title: How to Multiply Matrices
localeTitle: 如何乘以矩阵
---
## 如何乘以矩阵
第一个重要的规则是矩阵A中的列数必须与B列中的行数匹配。
计算两个矩阵乘积的第二个规则是X行列。
![](https://upload.wikimedia.org/wikipedia/commons/thumb/e/e1/Matrix_multiplication_principle.svg/320px-Matrix_multiplication_principle.svg.png)
得到的矩阵维度将是第二矩阵的第一矩阵X列的行。
设A和B为维2的两个矩阵即2 X 2.他们的产品将是:
![](http://www.i-programmer.info/images/stories/News/2011/DEC/A/matrix1.jpg)
resuting矩阵的行是第一矩阵行元素乘以第二矩阵列元素的乘积之和。
#### 例
设A为2×3矩阵B为3×2矩阵。产品AB将是
* **步骤1**
![](http://www.mathportal.org/linear-algebra/matrices/matrix-operations_files/12.gif)
* **第2步**
![](http://www.mathportal.org/linear-algebra/matrices/matrix-operations_files/13.gif)
* **第3步**
![](http://www.mathportal.org/linear-algebra/matrices/matrix-operations_files/14.gif)
* **第4步**
![](http://www.mathportal.org/linear-algebra/matrices/matrix-operations_files/15.gif)
#### 注意!
与实数代数不同乘积AB并不总是等于BA。使用上面的例子计算它并找出答案。
#### 更多信息:
![关于矩阵乘法的讲座](https://www.khanacademy.org/math/precalculus/precalc-matrices/multiplying-matrices-by-matrices/v/matrix-multiplication-intro)
![矩阵乘法的性质](https://www.khanacademy.org/math/precalculus/precalc-matrices/properties-of-matrix-multiplication/a/properties-of-matrix-multiplication)