1.2.5 · HinglishCalculus & Optimization Basics

The Jacobian matrix

1,541 words7 min readRead in English

1.2.5 · AI-ML › Calculus & Optimization Basics


WHAT it is


HOW we derive it (from first principles)

Step 1 — Ek output ek waqt dekho. Component lo. Yeh ek vector ka scalar function hai, toh iska first-order Taylor expansion hai

Yeh step kyun? Yeh sirf multivariable Taylor / total-differential rule hai: har input ko se perturb karne par mein rate se change aata hai, aur chhote effects add ho jaate hain.

Step 2 — Sum ko dot product samjho.

Yeh step kyun? ka weighted sum exactly ek matrix row times hota hai. Woh row ka gradient hai.

Step 3 — Saare rows stack karo. Yeh har output ke liye simultaneously karte hue:

Yeh step kyun? Row-approximations ko stack karna ek matrix equation ke barabar hai. Jis matrix ki rows gradients hain wahi Jacobian hai. ∎


Worked examples


Common mistakes (Steel-man + fix)


Recall Feynman: ek 12-saal ke bacche ko explain karo

Ek aisi machine socho jo input mein kuch dials leti hai aur output mein kuch bulbs jalati hai. Agar tum ek dial ko thoda sa nudge karo, toh har bulb thoda aur bright ya dim ho jaata hai. Jacobian bas un saare "kitna bright per nudge" numbers ki table hai — har (bulb, dial) pair ke liye ek number. Agar tumhe yeh table pata hai, toh tum bina machine chalaye kisi bhi chhoti twist ka result predict kar sakte ho: apni twist ko bas table se multiply karo.


Active-recall flashcards

ke Jacobian ki shape kya hai?
— rows = outputs, columns = inputs.
Jacobian ki entry define karo.
.
Jacobian ki row kya hai?
Output ke gradient ka transpose, yaani .
Scalar function () ke liye Jacobian aur gradient mein kya relation hai?
Jacobian ek row vector hai jo ke barabar hai; gradient iska transpose hai (ek column).
Jacobian use karke first-order linear approximation likhо.
.
ke liye Jacobian form mein chain rule?
(outer left mein; order matter karta hai).
ka kya matlab hai, aur yeh kab defined hai?
Map ka local volume-scaling factor; sirf tab defined hai jab square ho ().
ka ke w.r.t. Jacobian?
khud.
Elementwise ka ke w.r.t. Jacobian?
.
Polar map ke liye ?
.

Connections

Concept Map

generalizes to

has slope table

defined as

shape

rows equal outputs

columns equal inputs

built from

Taylor expansion

sum as dot product

stack m rows

used in

Scalar derivative f prime x

Jacobian matrix J

Vector function f R^n to R^m

Partial derivatives dfi dxj

m x n matrix

Row i is gradient of fi

Column j is input xj response

Linear approximation requirement

Per-output first order expansion

Row times h equals grad fi dot h

ML backprop and optimization