2.6.5 · HinglishMatrices & Determinants — Introduction

Matrix multiplication — conditions, process, non-commutativity

1,948 words9 min readRead in English

2.6.5 · Maths › Matrices & Determinants — Introduction

Overview

Matrix multiplication element-wise multiplication nahi hai. Yeh ek composition of linear transformations hai, jahan product mein har entry ek dot product of a row and column hoti hai. Is operation ke liye strict dimension requirements hain aur, sabse important baat, order matter karta hai.


[!intuition] Matrix Multiplication Aisa Kyun Kaam Karta Hai

Matrices ko transformation machines ki tarah socho. Jab tum multiply karte ho, tum pooch rahe ho: "Kya hoga agar main pehle transformation apply karun, phir transformation ?"

YEH definition kyun hai? Kyunki yeh composition of functions ko preserve karta hai. Agar vector ko mein transform karta hai, aur us result ko mein transform karta hai, toh hum chahte hain ek single matrix jo aisi ho ki .

Row-column dot product is wajah se aata hai:

  • ka har column batata hai ki ek basis vector kahan jaata hai
  • ki har row batati hai ki un transformed vectors ko kaise combine karna hai
  • ki entry yeh hai ki " ka -th column, ki -th row ke output mein kitna contribute karta hai"

[!definition] Matrix Multiplication

Matrices aur ke liye, product tab if and only if define hota hai jab == mein columns ki number mein rows ki number ke barabar ho==.

Result matrix ki dimensions hoti hain, jahan:

Simple shabdon mein: ki entry, == ki -th row aur ke -th column ka dot product== hai.


[!formula] Step-by-Step Process

Condition Check:

Inner dimensions (dono ) zaroor match karni chahiye. Outer dimensions ( aur ) result ki shape dete hain.

Computation:

Har entry ke liye:

  1. ki row lo:
  2. ka column lo:
  3. Calculate karo:

YEH kyun kaam karta hai: Har term represent karta hai "kth intermediate dimension, ki row aur ke column ke through kitna contribute karta hai."


[!example] Example 1 — Valid Multiplication

Check: hai , hai → inner dimensions match karte hain ✓
Result: hogi

compute karo ( ki row 1 · ka column 1):

Yeh step kyun? Hum 3 intermediate dimensions mein se har ek ke contributions ko sum kar rahe hain.

compute karo ( ki row 1 · ka column 2):

compute karo ( ki row 2 · ka column 1):

compute karo ( ki row 2 · ka column 2):

Final result:


[!example] Example 2 — Non-Commutativity Demonstrate Karna

compute karo:

compute karo:

Result:

KYUN? Kyunki composition of transformations order par depend karta hai. Pehle rotate karna phir scale karna, pehle scale karna phir rotate karne se alag hota hai.


[!example] Example 3 — Undefined Multiplication

Check: hai , hai → inner dimensions match NAHI karte (2 ≠ 3) ✗

Result: undefined hai. Tum in matrices ko multiply nahi kar sakte.

Kyun? Yahan ek dimensional mismatch hai— ki rows ko 2 components chahiye, lekin 3 provide karta hai.


[!mistake] Common Mistakes

Mistake 1: Yeh Sochna Ki

Galat kyun lagta hai: Numbers ki regular multiplication commutative hoti hai, isliye students assume karte hain ki matrices bhi aise hi kaam karti hain.

Fix: Matrices transformations represent karti hain, aur order matters in transformations. Pehle moje phir joote pehnna ≠ pehle joote phir moje pehnna. Jab bhi dono aur defined hon (same size ki square matrices), woh usually alag hote hain.

Verification: Dono ko hamesha compute karo aur compare karo. Special cases exist karte hain (jaise ya same diagonal wali diagonal matrices), lekin woh exceptions hain.


Mistake 2: Galat Dimensions Multiply Karna

Galat kyun lagta hai: Students "dono matrices hain" par focus karte hain aur column-row matching rule bhool jaate hain.

Fix: Dimensions explicitly likho hamesha: . Red numbers match karni chahiye. Agar nahi karti, ruk jaao—multiplication undefined hai.


Mistake 3: Element-wise Multiplication

Galat kyun lagta hai: Sirf multiply karna (jise Hadamard product kehte hain, notation ) zyada simple lagta hai.

Fix: Matrix multiplication row-column dot products hai, entry-by-entry nahi. Hadamard product bilkul alag operation hai aur same dimensions maangta hai. Standard multiplication column-row match maangta hai.


[!recall]- Feynman Explanation (ELI12)

Socho tumhare paas recipes ki ek list hai (matrix ) jo batati hai smoothies kaise banani hain. Har recipe kehti hai "2 kele, 1 seb, 3 strawberries use karo."

Ab tumhare paas ek price list hai (matrix ) jo alag-alag stores mein har fruit ki cost batati hai.

Jab tum multiply karte ho, tum answer de rahe ho: "Har store mein har smoothie recipe ki total cost kya hai?"

Store #1 mein smoothie #1 ki cost nikalne ke liye, tum:

  • Store #1 ki prices lo ( ki row 1)
  • Smoothie #1 ki recipe lo ( ka column 1)
  • Har price ko multiply karo us fruit ki quantity se jitni tumhe chahiye
  • Sab add kar do

Yahi tumhare answer matrix mein ek entry hai!

Order flip kyun nahi kar sakte? Kyunki "store prices × smoothie recipes" sense mein hai, lekin "smoothie recipes × store prices" nahi—tum "2 kele" ko "$3 per apple" se meaningful tarike se multiply nahi kar sakte. Inner numbers same cheez represent karni chahiye (is case mein, fruits).


[!mnemonic] Memory Hook

"Columns meet Rows to make Entries"

  • Pehli matrix ke Columns
  • Doosri matrix ki Rows
  • Inki count same honi chahiye
  • Har pair dot product ke zariye ek Entry banata hai

Alternatively: "ColRow →RowCol flips the result"
kyunki tum transformations ko opposite order mein compose kar rahe ho.


Properties of Matrix Multiplication

  1. Associative:
  2. Distributive:
  3. NOT Commutative: in general ✗
  4. Identity: jahan identity matrix hai ✓
  5. Zero property: jahan zero matrix hai ✓

Associative kyun hai? Kyunki function composition associative hoti hai: .


Connections


Flashcards

aur ko multiply karne ke liye dimension requirement kya hai? :: mein columns ki number mein rows ki number ke barabar honi chahiye, yaani . Result hoga.

mein entry ka formula kya hai?
, jo ki row aur ke column ka dot product hai.
Kya matrix multiplication commutative hai?
Nahi. Generally, . Order matter karta hai kyunki matrices composed transformations represent karti hain.
Agar hai aur hai, toh ki dimensions kya hongi?
( se outer dimensions).
Kya tum compute kar sakte ho agar defined ho?
Zaruri nahi. defined hone ka matlab hai columns of = rows of . ke liye tumhe columns of = rows of chahiye, jo alag condition hai.
Matrix multiplication row-column dot products ki tarah kyun define ki gayi hai?
Linear transformations ki composition preserve karne ke liye: agar , toh kisi bhi vector ke liye .
Ek example do jahan defined ho lekin nahi.
hai, hai. Toh hai (defined), lekin ke liye chahiye jo false hai (undefined).
Matrix multiplication aur Hadamard product mein kya fark hai?
Matrix multiplication row-column dot products use karta hai jisme dimension requirement hai. Hadamard (element-wise) product same dimensions maangta hai aur corresponding entries multiply karta hai: .
Agar aur dono hain, toh kya guaranteed hai?
Nahi. Same size ki square matrices bhi usually commute nahi karti. Identity ya kuch diagonal matrices jaise special cases commute karte hain.
kiske barabar hai?
(transpose ke saath order reverse ho jaata hai).

Concept Map

composed by

preserves

requires

gives

each entry is

expressed as

apply B then A

leads to

Linear transformations

Matrix multiplication AB

Function composition

Columns of A = rows of B

Result is m x p

Dot product row x column

Cij = sum Aik Bkj

Non-commutativity AB not BA

Order matters