4.5.7 · D4 · HinglishLinear Algebra (Full)

ExercisesMatrix multiplication — definition, associativity, non-commutativity

2,832 words13 min read↑ Read in English

4.5.7 · D4 · Maths › Linear Algebra (Full) › Matrix multiplication — definition, associativity, non-commu

Shuru karne se pehle, poore "row crosses column" motion ki ek picture — ise har ek problem ke liye apne dimaag mein rakho.

Figure — Matrix multiplication — definition, associativity, non-commutativity

Pehle figure padho. Left mein, pale-blue arrow ke row ke paar sweep karta hai (entries ). Right mein, pink arrow ke column ke neeche jaata hai (entries ). Peela curved arrow dikhata hai ki yeh dono streams ek single yellow dot par milti hain — woh dot output entry hai. Picture ka lesson yeh hai: ek output number ke liye ek poora row-times-column pass karna padta hai. Neeche har solution sirf is figure ko har ke liye repeat karna hai.


Level 1 — Recognition

(Kya tum shapes padh sakte ho aur sahi row aur column pakad sakte ho?)

Recall Solution L1.1

Pehle, in do shabdon ka matlab. Har matrix ko (rows)(columns) likho: hai . Jab tum ek product ko ki tarah likhte ho, toh inner dimensions woh do numbers hain jo beech mein ek doosre ke paas hote hain aur — aur outer dimensions woh do hain jo bahar hote hain aur . Rule yeh hai: banane ke liye inner dimensions match karni chahiye (taaki ki har row mein utni hi entries hon jitni ke har column mein, jisse dot product line up ho sake), aur result apni (rows)(columns) ke liye outer dimensions leta hai.

  • : → inner ✓ → size (outer) . Defined.
  • : → inner ✗. Defined nahi.
  • : → inner ✓ → size . Defined.
  • : → inner ✓ → size . Defined.
  • : → inner ✗. Defined nahi. Humne kya kiya: bas do inner numbers match kiye aur do outer numbers copy kiye. Kuch compute nahi kiya — yeh sirf bookkeeping hai.
Recall Solution L1.2

= ka row , ke column ke saath dot kiya. ka row 2 hai ; ka column 1 hai : = ka row , ke column ke saath dot kiya. ka row 1 hai ; ka column 2 hai : Index = (row )(column ) kyun padha jaata hai: pehla index batata hai konsa output row, doosra batata hai konsa output column. Output row decide hota hai ke kis row ko slide karoge; output column decide hota hai ke kis column par drop karoge.


Level 2 — Application

(Poore products ka calculation karo.)

Recall Solution L2.1

Char dot products, ki har row ko ke har column ke against.

  • (L1.2 se)
  • (L1.2 se)
Recall Solution L2.2

Inner dims ✓, toh hai . Har entry shared index par ek teen-term dot product hai.

Recall Solution L2.3

(a) Row·column. Har output entry ki ek row ka ke saath dot product hai: (b) Column combination. hai column 1 ki copies minus column 2 ki copy: Dono kyun kaam karte hain: row·column rule aur "columns ko vector ki entries se weight karo" — dono same arithmetic ko alag tarike se group karte hain. View (b) woh hai jo matrices ko linear transformations ke roop mein reveal karta hai — output hamesha columns ka ek weighted mix hota hai.


Level 3 — Analysis

(Explain karo aur exploit karo kyun, sirf compute mat karo.)

Recall Solution L3.1 FR=\begin{pmatrix}1&0\\0&-1\end{pmatrix}\begin{pmatrix}0&-1\\1&0\end{pmatrix}=\begin{pmatrix}0&-1\\-1&0\end{pmatrix}.$$ Yeh alag hain, toh $RF\neq FR$. **Notation padhna:** $RF$ ka matlab hai "$F$ pehle, phir $R$" — yaad raho *sabse right wala matrix vector ko pehle touch karta hai*. Point $\mathbf{p}=(1,0)$ (neeche ki figure ke **dono panels mein** white "start" arrow) track karo: - $RF\,\mathbf{p}$ (**left panel**): pehle $y$ flip karo — $(1,0)$ $(1,0)$ hi rehta hai ($x$-axis par hai) — phir $90^\circ$ rotate karo → $(0,1)$, blue "end" arrow. Check: $\begin{pmatrix}0&1\\1&0\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix}=\begin{pmatrix}0\\1\end{pmatrix}$ ✓. - $FR\,\mathbf{p}$ (**right panel**): pehle rotate karo → $(0,1)$, phir $y$ flip karo → $(0,-1)$, pink "end" arrow. Check: $\begin{pmatrix}0&-1\\-1&0\end{pmatrix}\begin{pmatrix}1\\0\end{pmatrix}=\begin{pmatrix}0\\-1\end{pmatrix}$ ✓. Ek hi white start arrow, do *alag* colored end arrows → order genuinely matter karta hai. Yahi contrast figure ka poora point hai.
Figure — Matrix multiplication — definition, associativity, non-commutativity

Upar ke do panels side by side isliye hain taaki tum dekh sako ki ek identical white starting arrow left mein ek blue ending arrow produce karta hai (, upar ki taraf) aur right mein ek pink ending arrow (, neeche ki taraf). Agar matrix multiplication commutative hoti, toh do colored arrows ek hi jagah milte — woh nahi milte, aur yeh visible gap hi non-commutativity hai.

Recall Solution L3.2 BA=\begin{pmatrix}1&0\\1&1\end{pmatrix}\begin{pmatrix}1&1\\0&1\end{pmatrix}=\begin{pmatrix}1&1\\1&2\end{pmatrix}.$$ $$[A,B]=AB-BA=\begin{pmatrix}2-1&1-1\\1-1&1-2\end{pmatrix}=\begin{pmatrix}1&0\\0&-1\end{pmatrix}.$$ **Matlab:** commutator $0$ hota hai *if and only if* $A$ aur $B$ commute karte hain. Yahan woh nonzero hai, toh $AB\neq BA$ — aur $[A,B]$ ki *entries* literally measure karti hain ki do products kitne door land karte hain (diagonal par $\pm1$ se disagree karte hain).
Recall Solution L3.3

Pehle . Phir . Ab doosra bracketing: . Phir . Equal ✓. Kyun guaranteed hai: dono ka matlab hai "pehle karo, phir , phir " — same pipeline; sirf kis order mein multiply karne ke liye pause kiya woh badla, maps act karne ka order nahi.


Level 4 — Synthesis

(Ek problem mein kai rules combine karo.)

Recall Solution L4.1

Parent note ka rule: " phir " ko undo karne ke liye pehle undo karo, toh Compute karo: Ordering ka proof (kyun nahi): identity aur associativity use karke, Inner cancel hota hai kyunki woh adjacent hai; reversed order hi cancellation ko line up karta hai. Galat order beech mein ek mismatched chhod dega jo collapse nahi hoga.

Recall Solution L4.2

, toh . Ab transpose side. , : Match ✓. Order phir se reverse kyun hota hai: transpose rows↔columns swap karta hai, aur kyunki ke row ko ke column ke saath pair karta hai, transpose karne se woh ka column ban jaata hai (= ka row )... iska ek hi consistent reassembly hai .

Recall Solution L4.3

. Sahi expansion order rakhti hai: . L3.2 se, aur . Saath hi , . Sum: Galat mein ki jagah use hota, jo deta — galat, kyunki yahan hai.


Level 5 — Mastery

(Prove karo / discover karo.)

Recall Solution L5.1

Lo . har entry ke liye row·column dot product se compute karo — koi shortcuts nahi.

  • row 1 col 1 .
  • row 1 col 2 .
  • row 2 col 1 .
  • row 2 col 2 . Dhyan do ki ka bottom row sab zeros hai, toh koi bhi dot product jo use karta hai automatically hai — yeh aur ko kill kar deta hai. Top row bachta hai, lekin iska jo bhi nonzero piece hai (position 2 mein ) hamesha ke columns se se milta hai, toh woh bhi khatam ho jaata hai. Is liye Numbers ke liye kyun nahi: reals ke liye, (koi zero divisors nahi). Matrices mein zero divisors hote hain, toh " ya " galat hai. Geometrically plane ko -axis par collapse karta hai, phir jo bacha woh line ko origin par push kar deta hai — do squashes sab kuch maar dete hain.
Recall Solution L5.2

likho. Hypothesis kehti hai ki har ke liye; khaas taur par yeh specially chosen test matrices ke liye bhi hold karna chahiye, aur har choice par ek constraint nikaalti hai. Test 1: . entrywise set karo: entries dete hain ; entries dete hain . Toh diagonal hona chahiye, . Test 2: (swap matrix). Ab diagonal use karke: set karo: entries force karte hain . Is liye , yani jahan . Proof kyun complete hota hai. Sab ke saath commute karna ek bahut strong demand hai — phir bhi humein sirf do cleverly chosen chahiye the saari char entries pin down karne ke liye: Test 1 ne off-diagonal entries ko khatam kiya, Test 2 ne do diagonal entries ko ek saath bandh kiya. Conversely, obviously har cheez ke saath commute karta hai, kyunki kisi bhi ke liye. Toh "sab ke saath commute karne wale" matrices ka set exactly hai — na zyada, na kam.

Recall Solution L5.3

ke liye, (dekho Determinants). . . Product . Ab , toh . ✓ Kyun remarkable hai: determinants area-scaling measure karte hain. Do maps karna scaling ko multiply karta hai — aur scalars multiply karna order care nahi karta, toh hamesha hota hai, chahe matrices khud commute na karein. Order-sensitivity matrix mein hai, uske determinant mein nahi.


Active recall

Kaun sa product defined hai: ya ?
Pehla, jo deta hai; doosre ke inner dims hain toh defined nahi.
mein, kaun sa matrix pehle ko touch karta hai?
— products right-to-left padho.
ka kya matlab hai?
aur commute karte hain, .
Matrices ke liye ka sahi expansion kya hai?
.
aur
aur — order reverse hota hai.
Ek nonzero do jiske liye ho.
.
Kaun si matrices har matrix ke saath commute karti hain?
Sirf identity ke scalar multiples, .

Connections