Chapterبەش 6 · Lectureوانە 6.3
Multiplying Matricesلێکدانی ماتریکسەکان
When a product exists and what size it has (), products of non-square matrices and vectors (a shopping bill in IQD), the associative and distributive laws, powers of square matrices and the transpose rules and .
کەی لێکدراوی هەیە و چ قەبارەیەکی هەیە ()، لێکدانی ناچوارگۆشەییەکان و (پسوولەی کڕین بە دینار)، و ، توانی و یاساکانی و .
What you will learnچی فێر دەبیت
- Decide from the orders whether and exist and give their sizes.
- Multiply non-square matrices and vectors entry by entry with row times column.
- Use the associative and distributive laws, , and avoid .
- Compute powers of square matrices and transposes of sums and products.
- لە قەبارەکانەوە بڕیار بدەیت ئایا و هەن و قەبارەیان بڵێیت.
- ناچوارگۆشەییەکان و بە ڕیز لە ستوون لێک بدەیت.
- و و بەکاربهێنیت و خۆت لە بپارێزیت.
- توانی و کۆ و لێکدراو بدۆزیتەوە.
Where we startلە کوێوە دەست پێدەکەین
You already multiplied two matrices in Multiplying matrices: row times column: every entry of the answer is a row of the first matrix times a column of the second — multiply the pairs and add. You also saw that the order matters: in general .
پێشتر دوو ت لە لێکدانی ماتریکسەکان: ڕیز لە ستووندا لێک دا: هەر ژمارەیەکی وەڵام ڕیزێکی یەکەمە لە ستوونێکی دووەم — جووتەکان لێک بدە و کۆیان بکەرەوە. هەروەها بینیت کە ڕیزبەندی گرنگە: بە گشتی .
This lesson answers the questions that the case hides: when can two matrices of different shapes be multiplied, what size is the answer, how vectors work, which laws still hold, what means, and what happens to a product under the .
ئەم وانەیە وەڵامی ئەو پرسیارانە دەداتەوە کە حاڵەتی دەیانشارێتەوە: کەی دوو بە شێوەی جیاواز لێک دەدرێن، وەڵامەکە چ قەبارەیەکی دەبێت، چۆن کار دەکەن، کام یاسا هێشتا ڕاستن، واتای چییە و چی بەسەر لێکدراوێکدا دەهێنێت.
When does exist?کەی هەیە؟
A row of must have exactly as many numbers as a column of , otherwise the pairs do not match up. A row of has one number for each column of , and a column of has one number for each row of . So:
ڕیزێکی دەبێت ڕێک بە ئەندازەی ستوونێکی ژمارەی هەبێت، ئەگەرنا جووتەکان یەک ناگرنەوە. ڕیزێکی بۆ هەر ستوونێکی یەک ژمارەی هەیە و ستوونێکی بۆ هەر ڕیزێکی یەک ژمارە. کەواتە:
is defined only when the number of columns of equals the number of rows of . The answer takes its rows from and its columns from . The product may be written , or .
تەنها کاتێک پێناسە کراوە کە ژمارەی ستوونەکانی یەکسان بێت بە ژمارەی ڕیزەکانی . وەڵامەکە ڕیزەکانی لە و ستوونەکانی لە وەردەگرێت. لێکدراوەکە دەتوانرێت بە ، یان بنووسرێت.
How to check whether AB exists (inner sizes match), what size the answer has, and why AB and BA can differ.
چۆن دەزانیت هەیە (قەبارە ناوەکییەکان یەک بگرنەوە)، وەڵامەکە چ قەبارەیەکی دەبێت، هەروەها بۆچی و دەکرێت جیاواز بن.
Plays 0:00-7:49: 0:58 determining the orders (inner numbers match, outer numbers give the size); 3:39 AB for a 1 × 3 row times a 3 × 1 column (1 × 1); 5:18 BA is 3 × 3 — the lesson's own quiz case.
لە 0:00 تا 7:49 پەخش دەبێت: 0:58 دیاریکردنی قەبارەکان (ژمارە ناوەکییەکان یەک دەگرنەوە، ژمارە دەرەکییەکان قەبارەی وەڵام دەدەن)؛ 3:39 بۆ ڕیزێکی لە ستوونێکی ()؛ 5:18 دەبێتە ، هەمان پرسیارەکەی تاقیکردنەوەی وانەکە.
One entry: row times column یەک ژمارە: ڕیزی لە ستوونی
The entry in row , column of uses only row of and column of . Walk along both at the same time, multiply the pairs and add:
ژمارەی ڕیزی ، ستوونی ی تەنها ڕیزی ی و ستوونی ی بەکاردەهێنێت. بە هەردووکیاندا پێکەوە بڕۆ، جووتەکان لێک بدە و کۆیان بکەرەوە:
The notes write the whole product out for a matrix times a matrix. Each row of the answer comes from one row of , so the answer is :
تێبینییەکان هەموو لێکدراوەکە بۆ لە دەنووسن. هەر ڕیزێکی وەڵام لە یەک ڕیزی ـەوە دێت، بۆیە وەڵامەکە ـە:
A Kurdish university lecture: adding matrices of the same order, multiplying by a number, and multiplying matrices row by column.
وانەیەکی زانکۆ بە کوردی: کۆکردنەوەی کە هەمان قەبارەیان هەیە، لێکدان لە ژمارەیەک و لێکدانی ڕیز لە ستوون.
Kurdish: AB is defined when columns of A = rows of B; a 2×2 product row by column; a 1×3 row times a 3×1 column. Stops before the 2×3 × 3×2 example at 10:35.
بە کوردی: پێناسە کراوە کاتێک ژمارەی ستوونەکانی A یەکسان بێت بە ژمارەی ڕیزەکانی B؛ لێکدانی ڕیز لە ستوون؛ ڕیزێکی لە ستوونێکی . پێش نموونەی لە 10:35 ڕادەوەستێت.
A times a لە
Take () and (). The inner sizes are both 3, so exists and is : four entries, each a row of times a column of .
() و () وەربگرە. قەبارە ناوەکییەکان هەردووکیان 3ـن، بۆیە هەیە و ـە: چوار ژمارە، هەریەکەیان ڕیزێکی ـە لە ستوونێکی .


So .
کەواتە .
Now : a different sizeئێستا : قەبارەیەکی جیاواز
Swap the order. is and is : the inner sizes are both 2, so exists too — but it is , nine entries, each a row of (2 numbers) times a column of (2 numbers):
ڕیزبەندییەکە بگۆڕە. ـە و ـە: قەبارە ناوەکییەکان هەردووکیان 2ـن، بۆیە ـیش هەیە — بەڵام ـە، نۆ ژمارە، هەریەکەیان ڕیزێکی ـە (2 ژمارە) لە ستوونێکی (2 ژمارە):
is and is : they cannot even be compared. Non-square matrices show most clearly why the order of a product matters.
ـە و ـە: تەنانەت بەراوردیش ناکرێن. ناچوارگۆشەییەکان بە ڕوونترین شێوە پیشان دەدەن بۆچی ڕیزبەندیی لێکدان گرنگە.
When exists but does notکاتێک هەیە بەڵام نییە
Sometimes only one order works. The notes' example is a matrix times a matrix : is , but would need the 2 columns of to meet the 3 rows of , so it is not defined. A new example of the same shapes:
هەندێک جار تەنها یەک ڕیزبەندی کار دەکات. نموونەی تێبینییەکان ی ـە لە ی : ـە، بەڵام پێویستی بەوەیە کە 2 ستوونی لەگەڵ 3 ڕیزی یەک بگرنەوە، بۆیە پێناسە نەکراوە. نموونەیەکی نوێ بە هەمان شێوە:
: — the inner sizes 2 and 3 differ, so is not defined.
: — قەبارە ناوەکییەکان 2 و 3 جیاوازن، بۆیە پێناسە نەکراوە.
When both and are square of the same size , both and exist and are — and still, as the example showed, they are usually different.
کاتێک و هەردووکیان چوارگۆشەیی بن بە هەمان قەبارەی ، و هەردووکیان هەن و ـن — بەڵام هێشتا، وەک نموونە ـەکە پیشانی دا، زۆرجار جیاوازن.
Vectors and matrices: a shopping bill in IQDئاڕاستەبڕەکان و ماتریکسەکان: پسوولەی کڕین بە دینار
A row or a column is a matrix too, so the same rule covers . Hana buys 2 kg of tomatoes, 1 kg of onions and 3 kg of potatoes at a bazaar in Erbil, where they cost 1,000, 750 and 500 IQD per kg. Write the amounts as a row and the prices as a column :
ڕیز یان ستوونیش ، بۆیە هەمان یاسا دەگرێتەوە. هانا لە بازاڕێکی هەولێر 2 کیلۆ تەماتە، 1 کیلۆ پیاز و 3 کیلۆ پەتاتە دەکڕێت کە کیلۆی بە 1,000، 750 و 500 دینارە. بڕەکان وەک ڕیزی و نرخەکان وەک ستوونی بنووسە:
A row times a column is : one number, the bill, 4,250 IQD.
ڕیزێکی لە ستوونێکی دەکاتە : یەک ژمارە، پسوولەکە، 4,250 دینار.
Vectors and matrices: a shopping bill in IQDئاڕاستەبڕەکان و ماتریکسەکان: پسوولەی کڕین بە دینار
Several shops, several shoppersچەند دوکانێک، چەند کڕیارێک
Row vector × matrix. To compare two shops, put each shop's prices in its own column (the bazaar first, then a supermarket). The row times the matrix gives a row: one bill for each shop.
ڕیز × . بۆ بەراوردکردنی دوو دوکان، نرخەکانی هەر دوکانێک لە ستوونی خۆیدا دابنێ (سەرەتا بازاڕەکە، پاشان سوپەرمارکێتێک). ڕیزی لە ڕیزێکی دەدات: پسوولەیەک بۆ هەر دوکانێک.
Matrix × column vector. If Hana and Shilan both shop at the bazaar, put their amounts in the rows of a matrix . Then is a column: one bill for each person. The other order, , is and not defined.
× ستوون. ئەگەر هانا و شیلان هەردووکیان لە بازاڕەکە بکڕن، بڕەکانیان لە ڕیزەکانی ی دا دابنێ. ئەو کاتە ستوونێکی ـە: پسوولەیەک بۆ هەر کەسێک. ڕیزبەندییەکەی تر، ، ـە و پێناسە نەکراوە.
The notes practise the same four cases with a row , a column and matrices: works, does not (), gives a column and gives a row. Try them in the exercises.
تێبینییەکان هەمان چوار حاڵەت بە ڕیزی ، ستوونی و ڕادەهێنن: کار دەکات، کار ناکات ()، ستوونێک دەدات و ڕیزێک. لە ڕاهێنانەکاندا تاقییان بکەرەوە.
The laws of matrix multiplicationیاساکانی لێکدانی ماتریکسەکان
Let , , have orders for which the products below are defined, and let be a number. Then:
با ، ، ئەو قەبارانەیان هەبێت کە لێکدراوەکانی خوارەوە پێناسە بکەن و ژمارەیەک بێت. ئەو کاتە:
| Lawیاسا | Formula | In wordsبە وشە |
|---|---|---|
| multiply in any grouping, keep the orderبە هەر کۆمەڵکردنێک لێکی بدە، ڕیزبەندییەکە بپارێزە | ||
| (left) (چەپ) | stays on the left لە لای چەپ دەمێنێتەوە | |
| (right) (ڕاست) | stays on the right لە لای ڕاست دەمێنێتەوە | |
| Numbers move freelyژمارە بە ئازادی دەجووڵێت | a scalar can sit anywhere دەتوانێت لە هەر شوێنێک بێت | |
| acts like the number 1 وەک ژمارەی 1 ڕەفتار دەکات | ||
| Not commutativeئاڵوگۆڕ نییە | in general different: never swap the factorsبە گشتی جیاوازن: هەرگیز شوێنی لێکدراوەکان مەگۆڕە |
A check with , , :
پشکنینێک بە ، ، :
But .
بەڵام .
The must have the right size on each side. For the matrix of this lesson, and : a different on each side.
دەبێت لە هەر لایەک قەبارەی گونجاوی هەبێت. بۆ ی ی ئەم وانەیە، و : لە هەر لایەک ـێکی جیاواز.
The laws of matrix multiplication: you may regroup a product (associative) and multiply out brackets (distributive), but you must keep the order.
یاساکانی لێکدانی : دەتوانیت لێکدراوێک بە شێوەیەکی تر گرووپ بکەیتەوە () و کەوانە بکەیتەوە ()، بەڵام دەبێت ڕیزبەندییەکە وەک خۆی بهێڵیتەوە.
Plays from 2:31: AB for a 2 × 3 times a 3 × 2 matrix, then BA (3 × 3, different), so multiplication is not commutative; 4:33 associative and 4:43 distributive laws (frames checked at 3:10, 4:10 and 5:05).
لە 2:31ـەوە پەخش دەبێت: بۆ لە ، پاشان (، جیاواز)، کەواتە لێکدانی پەیڕەو ناکات؛ 4:33 و 4:43 (وێنەکانی 3:10، 4:10 و 5:05 پشکنراون).
Powers of a square matrixتوانی ماتریکسێکی چوارگۆشەیی
For a , is written , , and in general ( factors). The matrix must be square: for a matrix, is not defined.
بۆ ، بە دەنووسرێت، و بە گشتی ( جار). دەبێت چوارگۆشەیی بێت: بۆ ، پێناسە نەکراوە.
Because multiplication is associative, the grouping of the factors does not matter: . Recall from Special matrices that an involutory matrix has .
لەبەر ئەوەی لێکدان پەیڕەو دەکات، چۆنیەتیی کۆمەڵکردنی لێکدراوەکان گرنگ نییە: . لە ماتریکسە تایبەتەکانەوە بیرت بێتەوە کە ـی هەیە.
The transpose of sums and productsجێگۆڕکێی ماتریکسی کۆ و لێکدراو
Recall the Transpose: rows become columns, and . Three more rules connect it to this chapter's operations:
جێگۆڕکێی ماتریکست بیر بێتەوە: ڕیزەکان دەبنە ستوون و . سێ یاسای تر پەیوەندی بە کۆکردنەوە و لێکدانی ئەم بەشەوە دەکەن:
A number comes out unchanged; a sum transposes term by term; a product reverses its order.
ژمارە وەک خۆی دێتە دەرەوە؛ کۆ پارچە بە پارچە دەکرێت؛ لێکدراو ڕیزبەندییەکەی پێچەوانە دەبێتەوە.
The transpose of sums and productsجێگۆڕکێی ماتریکسی کۆ و لێکدراو
: the order reverses: ڕیزبەندییەکە پێچەوانە دەبێتەوە
In the morning you put on your socks, then your shoes. In the evening you undo it in the reverse order: shoes first, then socks. follows the same pattern: the last factor comes first.
بەیانی سەرەتا گۆرەوییەکانت لە پێ دەکەیت، پاشان پێڵاوەکانت. ئێوارە بە ڕیزبەندیی پێچەوانە دایاندەکەنیت: سەرەتا پێڵاو، پاشان گۆرەوی. هەمان شێوە پەیڕەو دەکات: دوایین لێکدراو یەکەم دێت.
Where the analogy stops workingسنووری ئەم نموونەیە
The analogy shows the order only; it does not explain why the rule holds. The reason is that row times column of is the same sum as row of times column of .
ئەم بەراوردکردنە تەنها ڕیزبەندییەکە پیشان دەدات؛ ڕوون ناکاتەوە بۆچی یاساکە ڕاستە. هۆکەی ئەوەیە کە ڕیزی لە ستوونی ی هەمان کۆیە وەک ڕیزی ی لە ستوونی ی .
In the wrong order, is — not even the right size.
بە ڕیزبەندیی هەڵە، دەبێتە — تەنانەت قەبارەکەشی هەڵەیە.
Practice: solve it or explain why notڕاهێنان: شیکاری بکە یان ڕوونی بکەرەوە بۆچی ناکرێت
This set follows the notes' practice questions, with new matrices of the same shapes. First write each order, then decide.
ئەم کۆمەڵەیە پرسیارەکانی ڕاهێنانی تێبینییەکان پەیڕەو دەکات، بە نوێ کە هەمان شێوەیان هەیە. سەرەتا قەبارەی هەریەکەیان بنووسە، پاشان بڕیار بدە.
Question 1: پرسیاری 1:
Both : .
هەردووکیان : .
Question 2: پرسیاری 2:
Both : .
هەردووکیان : .
Question 3: پرسیاری 3:
Not possible: and are different orders.
ناکرێت: و قەبارەی جیاوازن.
Question 4: پرسیاری 4:
: .
: .
Question 5: پرسیاری 5:
Not possible: , 3 columns but 2 rows.
ناکرێت: ، 3 ستوون بەڵام 2 ڕیز.
Question 6: پرسیاری 6:
().
().
Question 7: پرسیاری 7:
: .
: .
Question 8: and پرسیاری 8: و
: , . : , not possible.
: ، . : ، ناکرێت.
In computing: three loops and moving picturesلە کۆمپیوتەردا: سێ خول و وێنەی جووڵاو
Common mistakesهەڵە باوەکان
| Mistakeهەڵە | What is trueڕاستییەکە |
|---|---|
| Multiplying matrices entry by entry, like addition.لێکدانی ژمارە بە ژمارە، وەک کۆکردنەوە. | Each entry is a row times a column, added up.هەر ژمارەیەک ڕیزێکە لە ستوونێک، کۆکراوە. |
| Checking the outer sizes: “ times is fine, both are ”.پشکنینی قەبارە دەرەکییەکان: « لە باشە، هەردووکیان ـن». | The inner sizes must match (columns of the first = rows of the second).قەبارە ناوەکییەکان دەبێت یەک بن (ستوونی یەکەم = ڕیزی دووەم). |
| Assuming , or that exists because does.وا دانان کە ، یان هەیە چونکە هەیە. | Check each order separately; even when both exist they usually differ.هەر ڕیزبەندییەک جیا بپشکنە؛ تەنانەت کاتێک هەردووکیان هەن زۆرجار جیاوازن. |
| = each entry squared. = هەر ژمارەیەک بە دووجا. | , and only for square . و تەنها بۆ ـی چوارگۆشەیی. |
| .. | The order reverses: .ڕیزبەندییەکە پێچەوانە دەبێتەوە: . |
| .. | Keep on the left: . لە لای چەپ بهێڵەوە: . |
Exercisesڕاهێنانەکان
Let and . Find and if they exist.
با و بن. و بدۆزەرەوە ئەگەر هەبن.
Show answerوەڵامەکە پیشان بدە
is : the inner sizes 3 and 1 differ, so it is not defined.
ـە: قەبارە ناوەکییەکان 3 و 1 جیاوازن، بۆیە پێناسە نەکراوە.
Let and . Find and .
با و بن. و بدۆزەرەوە.
Hintئاماژە
is the row .
ڕیزی ـە.
Show answerوەڵامەکە پیشان بدە
With and from the practice set, find and .
بە و ی کۆمەڵەی ڕاهێنانەکە، و بدۆزەرەوە.
Show answerوەڵامەکە پیشان بدە
Both are , yet .
هەردووکیان ـن، بەڵام .
Find and .
و بدۆزەرەوە.
Show answerوەڵامەکە پیشان بدە
one way, the other.
بە لایەکدا ، بە لاکەی تردا .
Find for . What is surprising?
بدۆزەرەوە بۆ . چی سەرسوڕهێنەرە؟
Show answerوەڵامەکە پیشان بدە
but . With numbers, forces ; with matrices it does not.
بەڵام . بۆ ژمارەکان مانای ـە؛ بۆ وا نییە.
Let . Find and , then guess .
با بێت. و بدۆزەرەوە، پاشان پێشبینی بکە.
Show answerوەڵامەکە پیشان بدە
Each extra factor adds 1 to the top-right entry.
هەر لێکدراوێکی زیادە 1 دەخاتە سەر ژمارەی سەرەوەی ڕاست.
Find so that .
بدۆزەرەوە بە شێوەیەک کە .
Show answerوەڵامەکە پیشان بدە
Row 2 gives for any , so only row 1 decides.
ڕیزی 2 بۆ هەر ـێک دەدات، بۆیە تەنها ڕیزی 1 بڕیار دەدات.
Find and for and . Then find and for and , or explain why one does not exist.
و بدۆزەرەوە بۆ و . پاشان و بدۆزەرەوە بۆ و ، یان ڕوونی بکەرەوە بۆچی یەکێکیان نییە.
Hintئاماژە
Write the orders first: , , , .
سەرەتا قەبارەکان بنووسە: ، ، ، .
Show answerوەڵامەکە پیشان بدە
is : the inner sizes 2 and 3 differ, so it is not defined.
ـە: قەبارە ناوەکییەکان 2 و 3 جیاوازن، بۆیە پێناسە نەکراوە.
Summaryپوختە
- : the inner sizes must match, the outer sizes give the answer.
- : row of times column of .
- and may have different sizes, one may not exist, and even for square matrices in general.
- A row of amounts times a column of prices is a bill: .
- Associative and distributive laws hold, , ; commutativity does not.
- only for square , and , not the squared entries.
- , (the slide's “” is a typo), .
- : قەبارە ناوەکییەکان دەبێت یەک بن، دەرەکییەکان قەبارەی وەڵامەکە دەدەن.
- : ڕیزی ی لە ستوونی ی .
- و دەشێت قەبارەی جیاوازیان هەبێت، یەکێکیان دەشێت نەبێت و تەنانەت بۆ بە گشتی .
- ڕیزێک لە بڕەکان لە ستوونێک لە نرخەکان دەکاتە پسوولەیەک: .
- و ڕاستن، ، ؛ ئاڵوگۆڕ ڕاست نییە.
- تەنها بۆ ـی چوارگۆشەیی و ، نەک ژمارە دووجاکراوەکان.
- ، («»ی سلایدەکە هەڵەی چاپە)، .
Can two matrices be multiplied?ئایا دوو ماتریکسی لێک دەدرێن؟
No: 2 columns meet 3 rows. They can be added, but not multiplied.
نەخێر: 2 ستوون لەگەڵ 3 ڕیز. کۆ دەکرێنەوە، بەڵام لێک نادرێن.
Why is not defined for a matrix?بۆچی بۆ ماتریکسێکی پێناسە نەکراوە؟
would be : the inner sizes 3 and 2 differ.
دەبێتە : قەبارە ناوەکییەکان 3 و 2 جیاوازن.
Videoڤیدیۆ
Watch a videoسەیری ڤیدیۆیەک بکە
A video that viewers liked a lot and praised in their comments, chosen for this lesson.ڤیدیۆیەک کە بینەران زۆریان پێ خۆش بووە و لە کۆمێنتەکانیاندا ستایشیان کردووە، بۆ ئەم وانەیە هەڵبژێردراوە.
Why numbers are kept in a matrix, and how each product entry is a row of the first times a column of the second.
چین و چۆن لێکیان دەدەیت: ڕیزێکی یەکەم لە ستوونێکی دووەم، ژمارە بە ژمارە لێک دەدرێن، پاشان کۆ دەکرێنەوە.
Short animated overview: 0:48 what matrices are, 1:58 how to multiply (row times column), 3:49 an example.
ناساندنێکی کورت بە : 0:48 چین، 1:58 چۆن لێک دەدرێن (ڕیز لە ستوون)، 3:49 نموونەیەک.
Lesson complete!وانەکە تەواو بوو!
Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.
Key termsزاراوە سەرەکییەکان
Determinants, Minors and Cofactorsدیتەرمینانتەکان، ماینەرەکان و کۆفاکتەرەکان
Related lecturesوانە پەیوەندیدارەکان
- Matrix Notation and Special Matricesنووسینی ماتریکس و جۆرە تایبەتەکانی
- Determinants, Minors and Cofactorsدیتەرمینانتەکان، ماینەرەکان و کۆفاکتەرەکان
- Nested Loops and Patternsخولە ناوەکییەکان و کێشانی شێوە
- Two-Dimensional Listsلیستە دووڕەهەندەکان
- Matrix Operations vs Element-by-Element Operationsکارەکانی ماتریکس بەرامبەر کارەکانی توخم بە توخم
References and further readingسەرچاوەکان و خوێندنەوەی زیاتر
This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.