Visual walkthrough — Matrix multiplication — conditions, process, non-commutativity
2.6.5 · D2· Maths › Matrices & Determinants — Introduction › Matrix multiplication — conditions, process, non-commutativi
Parent note ne tumhe rule bataya tha: do matrices ko multiply karne ke liye, pehli matrix ki rows ko doosri matrix ki columns ke saath dot karo. Yeh page us rule ko ek single idea se derive karta hai — matrices arrows ko idhar-udhar move karti hain — sirf pictures ki madad se. Is page ke end tak tumhe rule yaad karne ki zaroorat nahi hogi; tum use khud rebuild kar sakoge.
Hum assume karte hain ki tum arrows ko tip-to-tail add karna aur stretch karna jaante ho (yeh hai Matrix addition and scalar multiplication). Aur kuch nahi chahiye.
Step 1 — Arrow actually hota kya hai? Grid par do numbers
KYA. Flat plane draw karo. Do special chhote arrows chunno: ek unit right point karta hai, ek unit upar point karta hai. Hum inhe basis vectors kehte hain — plane ke do "measuring sticks."
KYO. Har doosra arrow inhi do sticks se bani ek recipe hai. Arrow ka literal matlab hai "walk copies of , phir copies of ." Toh do numbers ka column mysterious nahi hai — yeh aur ki language mein likhi hui directions hain.
PICTURE. Neeche, red stick hai , teal stick hai , aur plum arrow hai . Dotted path "2 right, 3 up" ki recipe dikhata hai.
Step 2 — Ek matrix ek machine hai jo sirf batati hai ki do sticks kahan jaati hain
KYA. Ek transformation koi bhi aisa rule hai jo har arrow ko uthata hai aur kahin naya drop karta hai, lekin grid ko seedha aur evenly spaced rakhta hai (yeh ek linear transformation hai). Yahan ek magic fact hai jis par hum poore page lek lean karenge:
Agar tumhe pata hai kahan land karta hai aur kahan land karta hai, toh tumhe pata hai har arrow kahan land karta hai.
KYO. Kyunki hai, aur ek linear machine us recipe ko scramble nahi karta — woh bas har purani stick ko uski nayi landing spot se replace karta hai:
Har term annotated hai: aur unchanged hain (yeh ki apni recipe hai), sirf sticks apne images se swap ho gayi hain.
PICTURE. Left panel: ke saath original grid. Right panel: machine chalane ke baad tilted grid. Sticks ki nayi landing spots matrix ki do columns hain.
Step 3 — Matrix ko ek arrow se multiply karna: "columns ko combine karo" rule
KYA. Matrix (landing spots) aur arrow (ek recipe) lo. find karne ke liye, Step 2 ka fact use karo:
YEH HI KYO, AUR KUCH KYO NAHI? Humne ki definition aise choose ki taaki machine "" recipes ko respect kare. pehle landing column ko scale karta hai, doosre ko scale karta hai, aur hum unhe tip-to-tail add karte hain. Ab us sum ki top row padho:
Yeh exactly ki row 1 ko ke saath dot karna hai. Row·column dot product invent nahi hua — yeh "columns ko combine karo" se apne aap nikal aaya.
PICTURE. Do landing columns scale hote hain (red column times , teal column times ) aur plum result mein tip-to-tail add hote hain.
Step 4 — Do machines ek ke baad ek: isliye exist karta hai
KYA. Ab do machines chalao: pehle , phir . feed karo, milega, phir usse mein feed karo aur milega. Hum chahte hain ek matrix jo dono kaam ek saath kare: . Woh single machine defined hai ke roop mein.
" after " ORDER KYO LEKIN LIKHA ? Kyunki hum functions apne input ke left par likhte hain: — jo cheez ke sabse kareeb hai woh pehle act karti hai. Toh ka matlab hai " pehle, phir ." Yeh reading non-commutativity ka beej hai: par swap karna actions ka order swap kar deta hai, aur joote-phir-moje moje-phir-joote.
PICTURE. Ek teen-panel pipeline: input arrow → ke baad (tilted grid) → ke baad (phir tilted). Poore pipeline mein dashed shortcut arrow single machine hai.
Step 5 — ko column by column banao (poora rule saamne aata hai)
KYA. Step 2 se, hum jaante hain ko completely agar hum jaante hain kahan aur ko bhejta hai. Toh ko pipeline se push karo:
ka column 1 bas applied to ka column 1 hai. Isi tarah se column 2 milta hai. Toh:
ka column = times ka column .
KYO. literally ka column hai (pehli stick feed karo, us par uski landing spot milti hai). Phir Step 3 batata hai ki applied to us column ek row·column dot product hai. Step 3 ke dot-product formula se entry spell out karte hue:
Har symbol earned hai: ki row par chalता hai, ke column ke neeche jaata hai, aur woh shared index hai jo unhe milne deta hai.
PICTURE. Final grid dikhaya gaya hai: column 1 = acting on ka column 1, column 2 = acting on ka column 2. entry highlight hai jahan ki row-1 ke column-1 se milti hai.
Step 6 — Inner dimensions KYO match KARNI CHAHIYE (degenerate case)
KYA. ke columns kuch space mein rehne wale arrows hain, maano numbers ke. Aisa arrow mein feed karne ke liye, machine ko -number arrows expect karne chahiye — yaani ke paas columns hone chahiye. Agar ke columns ki sankhya alag hai, toh pipe toot jaata hai.
YEH FAIL KYO HOTA HAI. mein, index ko dono factors mein same range par chalna hai. Agar ke columns hain () lekin ke rows hain (), toh sum mein aisi terms hain jinka koi partner nahi — meaningless. Yeh exactly parent ka Example 3 hai: times undefined hai.
PICTURE. Do connectors: ek matching plug ( ke columns ke rows se fit hote hain, click karte hain) aur ek mismatched plug (-prong socket, -prong plug — physically seat nahi hoga).
Step 7 — Order cheezein actually todta hua dekho (non-commutativity, geometrically)
KYA. Maano ek rotation hai aur ek horizontal stretch. Usi chhote L-shape par phir () aur phir () karo.
YEH ALAG KYO HOTE HAIN. Ek wide shape ko rotate karne se woh tall ho jaata hai, phir use stretch karne se tall wala choda ho jaata hai. Pehle stretch karne se woh choda ho jaata hai, phir rotate karne se woh differently tall-and-fat ho jaata hai. Alag final shapes ⟹ alag matrices ⟹ . Numbers agree karte hain: , ke saath (parent Example 2), lekin .
PICTURE. Do side-by-side pipelines ek hi L se start hote hain, visibly alag L par khatam hote hain.
Ek-picture summary
Is page par sab kuch ek sentence hai aur ek picture hai: ek matrix store karti hai ki basis sticks kahan land karti hain; do matrices stack karna matlab hai "land karo, phir dobara land karo," aur use column-by-column padh lena row·column sum ko force karta hai.
Recall Feynman retelling (ek 12-saal ke bachche ko batao)
Do chhote arrows picture karo, ek right point karta hai aur ek upar — yeh tumhare rulers hain. Jo bhi arrow tum draw karo woh bas "itne rights, itne ups" hai. Ek matrix ek cheat-sheet hai: woh sirf tumhe batati hai ki woh do rulers kahan move hote hain; us se tum figure out kar sakte ho ki kuch bhi kahan move karta hai, kyunki har arrow rulers ki motion copy karta hai.
Ab maano tum do moving-machines back to back chalate ho — machine pehle, machine doosri. Tum chahte ho ek single combined machine. Use banane ke liye, bas poocho: "right-ruler dono machines ke baad kahan khatam hota hai? up-ruler kahan khatam hota hai?" Woh do answers, side by side, combined machine hain. Jab tum uska ek number work out karte ho, tum ki ek row par aur ke ek column ke neeche chalne lagte ho, pairs multiply karte ho aur add karte ho — yeh woh famous rule hai, aur ab tum dekh rahe ho ki yeh diya nahi gaya tha, yeh forced tha.
Do loose ends: se nikalne wale rulers bilkul us size ke hone chahiye jo machine consume karna jaanti hai, isliye inner dimensions match karni chahiye — warna machines plug together nahi hoti. Aur -phir- chalana alag journey hai -phir- se, bilkul jaise moje phir joote pehenna joote phir moje se alag hai — isliye aur usually disagree karte hain.
Recall
ka column kya equal hota hai? ::: applied to ka column . forced (chosen nahi) kyun hai? ::: Kyunki hum demand karte hain ; yeh sum wahi hai jo " ke columns combine karo, phir chalao" produce karta hai. ke columns ke rows ke equal kyun hone chahiye? ::: Shared index ko dono factors mein same range par chalna hai, warna terms ka koi partner nahi hota. Geometrically, kyun hai? ::: Woh do motions ko opposite orders mein apply karte hain, aur transformations ka order outcome change karta hai.
Connections
- Matrix multiplication — conditions, process, non-commutativity — woh parent rule jise yeh page derive karta hai
- Linear transformations — "moving machine" picture jo poore page mein use ki gayi
- Matrix addition and scalar multiplication — columns ki scaling aur tip-to-tail adding (Steps 1, 3)
- Identity matrix — woh machine jo dono rulers ko wahin chhodti hai
- Inverse of a matrix — woh machine jo doosri ki motion ko undo karti hai
- Matrix transpose properties — , order bilkul pipeline ki tarah reverse hota hai
- System of linear equations — ko "kaun si recipe par land karti hai" ki tarah padhna