Baaki ko constant kyun maante hain? Kyunki partial derivative change ko ek coordinate axis ke saath measure karta hai. East ki taraf chalna tumhe north slope ke baare mein kuch nahi batata, isliye hum north ko freeze kar dete hain.
Dot product ko geometric form mein likho:
Duf=∇f⋅u=∥∇f∥∥u∥cosθ=∥∇f∥cosθ
jahan θ, u aur ∇f ke beech ka angle hai (aur ∥u∥=1).
Yeh sabse bada tab hota hai jab cosθ=1, yaani θ=0 ⇒ ∇fke saath chalo. → steepest ascent, value =∥∇f∥.
Sabse chhota (sabse zyada negative) jab θ=π ⇒ ∇f ke opposite chalo. → steepest descent, isliye gradient descent −∇f use karta hai.
Zero jab θ=π/2 ⇒ ∇f ke perpendicular chalo. → tum level set / contour ke saath chal rahe ho, height unchanged. Toh gradient contour lines ke perpendicular hota hai.
What is the directional derivative Duf in dot-product form?
Duf=∇f⋅u with ∥u∥=1.
Why must u be a unit vector?
Taaki result slope ko per unit distance measure kare, vector ki length se scale na ho.
In which direction does ∇f point?
Steepest ascent ki direction mein; iska magnitude steepest slope hai.
What is the relationship between ∇f and contour lines?
Yeh level sets ke perpendicular (orthogonal) hota hai, kyunki contour ke saath Duf=0.
Why does gradient descent use −∇f?
−∇f steepest descent ki direction hai (cosθ=−1), f ki sabse tezi se decrease.
Is the gradient a scalar or a vector?
Ek vector jisme har input variable ke liye ek component hota hai.
Derivation: how do we get Duf=∇f⋅u?
g(t)=f(a+tu) set karo, chain rule apply karo; g′(0)=∑i∂xi∂fui=∇f⋅u.
Max value of Duf over all unit u?
∥∇f∥, tab milta hai jab u, ∇f ke saath align ho.
Recall Feynman: 12-saal ke bachche ko samjhao
Tum ek ulte-seedhe pahaad par ho. Jahan bhi khade ho, ek direction sabse tezi se upar jaati hai — jaise slide ka sabse steep hissa, par upar ki taraf. Gradient bilkul us steepest-up direction mein point karta ek arrow hai, aur arrow ki lambai batati hai kitna steep hai. Agar tum bottom tak pahunchna chahte ho (model train karna), toh hamesha arrow ke ulti direction mein chalo. Aur agar tum arrow ke sideways chalo, toh tum same height par rehte ho — yeh pahaad par ek flat ring ke saath chalna hai.