Addition, Subtraction and multiplication of Matrices

Matrix को add और subtract cell by cell करते हैं (order same होना जरूरी है); और multiply row into column करते हैं (बीच के numbers match होने चाहिए), बिल्कुल जैसे bill बनता है।

11 min read · 12 cards · 3 checks

Read in: English · हिन्दी · ગુજરાતી


Theory

Rupa के 2 counters

Rupa 2 snack counters चलाती हैं, एक campus gate पर और एक railway station पर। दोनों जगह samosa और tea बिकते हैं। उनकी January और February की sales (सैकड़ों में):

Jan = ⎡ 10 6 ⎤ Feb = ⎡ 12 9 ⎤

⎣ 8 12 ⎦ ⎣ 10 14 ⎦

यहाँ rows हैं counters (Campus, Station), और columns हैं items (samosa, tea)।

अब उनके accountant पूछते हैं: quarter की total sales कितनी हुई? हर item में growth कितनी हुई? हर counter का revenue कितना है? 3 सवाल, और तीनों के लिए 3 अलग matrix operations।

Theory

Addition: sheets को एक के ऊपर एक रखिए

मान लीजिए January को एक transparent sheet पर print किया और February को दूसरी sheet पर, फिर दोनों को एक के ऊपर एक रख दिया। हर cell अपने जोड़ीदार के ठीक ऊपर आ जाएगी: Campus-samosa के ऊपर Campus-samosa। Matrix add करना बस इन जोड़ीदारों को जोड़ना ही है। इसीलिए दोनों sheets का same size होना जरूरी है: हर cell को exactly एक partner चाहिए।

Theory

Addition और subtraction, formally

अगर A और B का same order है, तो (A + B)ᵢⱼ = aᵢⱼ + bᵢⱼ। Subtraction में भी यही होता है। और अगर orders अलग हों? तो Not defined. कोई exception नहीं।

Jan + Feb = ⎡ 22 15 ⎤ (total sales)

⎣ 18 26 ⎦

Feb - Jan = ⎡ 2 3 ⎤ (growth)

⎣ 2 2 ⎦

देखिए, growth matrix की हर cell positive है: मतलब दोनों counters पर दोनों items ज्यादा बिके।

Quiz

A का order 2×3 है और B का order 3×2 है। तो A + B क्या होगा?

  1. Not defined, क्योंकि orders अलग हैं
  2. एक 2×2 matrix
  3. एक 3×3 matrix
  4. अगर पहले B का transpose ले लें तो defined है
Show the answer

Not defined, क्योंकि orders अलग हैं

Addition में हर cell अपने same position वाले जोड़ीदार से जुड़ती है, इसलिए orders बिल्कुल identical होने चाहिए, और 2×3 ≠ 3×2। B का transpose लेने से तो एक अलग ही matrix बन जाती है, और उसका A के साथ sum एक बिल्कुल दूसरा सवाल है, इस सवाल का हल नहीं।

Theory

Multiplication एक अलग ही चीज़ है

देखिए February की Campus row: 12 samosas, 9 teas (सैकड़ों में)। Prices हैं: samosa ₹9, tea ₹7। तो उस counter का revenue:

12·9 + 9·7 = 108 + 63 = 171

पहले pair-wise multiply किया, फिर सबको add किया। असल में आप ज़िंदगी भर bill ऐसे ही तो निकालते आए हैं। यही "row times column, फिर sum" वाली हरकत matrix multiplication का असली atom है। यह addition की तरह cell-by-cell नहीं होता।

Follow along

A (m×n) को B (n×p) से multiply कैसे करें

  1. पहले check कीजिए कि inner numbers match करते हैं या नहीं A के columns, B के rows के बराबर होने चाहिए। 2×2 को 2×1 से multiply कर सकते हैं क्योंकि 2 = 2। अगर ये अलग हों, तो वहीं रुक जाइए: product defined ही नहीं है।
  2. Answer का order outer numbers से पढ़िए (m×n)·(n×p) से answer आता है m×p। तो 2×2 को 2×1 से multiply करने पर 2×1 मिलेगा।
  3. हर entry cᵢⱼ के लिए: row i into column j A की row i के elements को B के column j के elements से pair by pair multiply कीजिए, फिर सबको add कर दीजिए।
  4. यही process answer की हर cell के लिए दोहराइए row by row काम कीजिए ताकि कहीं जगह न भूलें, हिसाब गड़बड़ न हो।

Theory

Worked example: January का revenue

Sales S (2×2) को price column P (2×1) से multiply करते हैं। Inner numbers: 2 = 2, तो answer होगा 2×1।

S = ⎡ 10 6 ⎤ P = ⎡ 9 ⎤

⎣ 8 12 ⎦ ⎣ 7 ⎦

Campus row into P: 10·9 + 6·7 = 90 + 42 = 132

Station row into P: 8·9 + 12·7 = 72 + 84 = 156

S·P = ⎡ 132 ⎤

⎣ 156 ⎦

बस एक multiplication, और Rupa को हर counter का revenue मिल गया।

Think first

अब आपकी बारी: February का revenue

February की sales rows हैं (12 9) और (10 14), और prices अभी भी ₹9 और ₹7 हैं।

कागज़ पर Feb·P निकालिए: 2 row-into-column sums।

Show the answer

Campus: 12·9 + 9·7 = 108 + 63 = 171

Station: 10·9 + 14·7 = 90 + 98 = 188

Feb·P = ⎡ 171 ⎤

⎣ 188 ⎦

दोनों counters ने January (132, 156) से ज्यादा कमाया, और यह पहले वाले all-positive growth matrix से भी match हो रहा है।

Quiz

A का order 2×3 है और B का order 3×4 है। तो AB का order क्या होगा?

  1. 2×4
  2. 3×3
  3. 2×3
  4. Not defined
Show the answer

2×4

Inner numbers 3 और 3 match करते हैं, इसलिए product exist करता है। और answer outer numbers ले लेता है: 2×4। अगर आपने "not defined" चुना तो आपने गलत pair compare किया, बस (2×3)·(3×4) लिखिए और बीच के touching numbers देखिए।

Watch out

2 classic traps

Trap 1: cell-by-cell multiply करना, बिल्कुल addition की तरह। लगता natural है पर पूरी तरह गलत है: multiplication row into column होता है।

Trap 2: यह मान लेना कि AB = BA। ज़्यादातर यह गलत होता है, और कई बार तो BA exist ही नहीं करता: यहाँ P·S के लिए (2×1)·(2×2) चाहिए, और inner numbers 1 ≠ 2। तो multiplication का order मायने रखता है।

Theory

यह चीज़ आपको फिर कहाँ मिलेगी

Excel का SUMPRODUCT असल में एक ही row-into-column है। Computer graphics में हर pixel matrix products से ही move होता है। Machine learning तो ज़्यादातर बहुत बड़ी-बड़ी matrix multiplication ही है। और आपके अगले 2 topics, inverse और Cramer's rule, ये तो मानकर ही चलते हैं कि यह page आपको मुँहज़बानी याद है।

Summary

Key takeaways

  • Addition और subtraction के लिए orders identical होने चाहिए, और ये cell by cell होते हैं।
  • Multiplication (m×n)·(n×p) के लिए inner numbers बराबर होने चाहिए, और answer आता है m×p।
  • हर product entry, A की एक row into B के एक column है: pairs को multiply कीजिए, फिर add कर दीजिए।
  • आम तौर पर AB ≠ BA; और कई बार तो BA defined ही नहीं होता।
  • Sales matrix × price column = revenue, यानी एक bill असल में matrix product ही है।
  • याद रखने का तरीका: add करने के लिए same order, multiply करने के लिए inner match, और row into column।

Study this properly

This page is the lesson to read. In Gri-Learn the same topic is a graded deck: the self-checks are scored and your weak topics are tracked. Free to start.

Start this topic

Already have an account? Sign in

More from Matrices and Determinants

Gri-Learn · syllabus-mapped B.C.A. lessons in English, Hindi and Gujarati

Addition, Subtraction and multiplication of Matrices · Mathematics (Multi-Disciplinary Course) · Gri-Learn