We start from the hard-margin SVM primal problem. WHY this objective? We want the widest "street" between classes; the street half-width is 1/∥w∥, so maximizing margin = minimizing ∥w∥2.
minw,b21∥w∥2s.t. yi(w⊤xi+b)≥1∀i.
HOW we bring in the constraints: build the Lagrangian with multipliers αi≥0:
L(w,b,α)=21∥w∥2−∑iαi[yi(w⊤xi+b)−1].
Why the minus sign? We subtract a penalty that grows when a constraint is violated, so the min–max saddle point enforces the constraints.
Stationarity — set derivatives to zero:
∂w∂L=0⇒w=∑iαiyixi.
Why this step? This is the punchline: w is a weighted sum of the training points, weighted by αi.
∂b∂L=0⇒∑iαiyi=0.
Now the KKT complementary slackness condition (the heart of the interpretation):
αi[yi(w⊤xi+b)−1]=0.
HOW to read it: for each point eitherαi=0or the bracket =0.
If a point is strictly inside its side (yi(w⊤xi+b)>1), the bracket =0, so we are forced to have αi=0 → it contributes nothing to w.
Only points on the margin (yi(w⊤xi+b)=1) can have αi>0 → these are the support vectors.
WHY: stationarity gives w but not b. Use any support vector xs (where the margin equals exactly 1):
ys(w⊤xs+b)=1⇒b=ys−w⊤xs(using ys=±1,ys2=1).
In practice average over all SVs for numerical stability.
What algebraic condition defines a support vector?
Its Lagrange multiplier αi>0 (equivalently it lies on/inside the margin).
Why do non-support vectors not affect the decision boundary?
KKT complementary slackness forces αi=0 for points strictly beyond the margin, so they contribute nothing to w=∑αiyixi.
Write w in terms of training data.
w=∑iαiyixi, nonzero only over support vectors.
In the soft margin, what does αi=C indicate?
The point is a margin violator or misclassified (inside the margin / wrong side).
How do you recover b from a support vector xs?
b=ys−w⊤xs (since on the margin ys(w⊤xs+b)=1).
What does a very large fraction of support vectors suggest?
Overfitting / small margin / poor generalization; SV fraction bounds LOO error.
Kernelized decision rule?
f(x)=sign(∑i∈SVαiyiK(xi,x)+b).
Recall Feynman: explain to a 12-year-old
You're playing tug-of-war between two teams, and you draw a chalk line in the middle. Only the kids standing right at the front of each team, closest to the line, decide where the line goes. The kids way at the back don't pull on the line at all. Those front kids are the "support vectors" — and if all the back kids went home, the line wouldn't move even one inch.
Dekho, SVM ka core idea simple hai: do classes ke beech me ek "gali" (street) banao jo jitni possible ho utni chaudi ho. Is gali ka border kaun decide karta hai? Sirf woh points jo bilkul edge pe khade hain — unhe hum support vectors kehte hain. Baaki jo points apni-apni side me deep andar khade hain, woh boundary ko ratti bhar bhi affect nahi karte. Agar unhe delete kar do, model exactly same rahega. Yahi SVM ki khoobsurti hai — sparse solution.
Maths me yeh baat KKT complementary slackness se aati hai: har point ke liye ya to αi=0 hota hai, ya woh point margin pe exactly baitha hota hai. Jo points margin ke andar (safe zone me) hain, unka αi zabardasti 0 ho jaata hai. Aur w=∑αiyixi — matlab weight vector sirf un points ka weighted sum hai jinka α>0, yaani sirf support vectors ka. Isliye final decision function me bhi sirf support vectors dikhte hain.
Soft margin me thoda twist hai: agar point margin ke andar ghus jaaye ya galat side pe ho, to uska αi=C (ceiling pe pahunch jaata hai). Yeh troublemaker points bhi support vectors hote hain, sirf boundary ke paas wale nahi. Ek common galti yeh hai ki log sochte hain "closest points = support vectors" — par actual definition hai αi>0.
Practical tip: agar tumhare model me support vectors ki sankhya bahut zyada hai (jaise 950 out of 1000), to samajh jao ki model overfit kar raha hai ya margin bahut chhota hai. Kam support vectors = better generalization aur faster prediction. Isliye SV count ek accha health-check hai apne SVM ka.
Test yourself — SVM, Naive Bayes & Probabilistic Models