Files
freeCodeCamp/guide/russian/mathematics/how-to-multiply-matrices/index.md
2018-10-16 21:32:40 +05:30

49 lines
2.4 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: How to Multiply Matrices
localeTitle: Как умножить матрицы
---
## Как умножить матрицы
Первое обязательное правило: количество столбцов в матрице A должно соответствовать количеству строк в столбце B.
Второе правило для вычисления произведения двух матриц: Line X Column.
![](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)
Строки матрицы переименования представляют собой сумму произведения первых элементов строки матрицы по элементам второго элемента матрицы.
#### пример
Пусть A - матрица 2 X 3, а B - матрица 3 X 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)