WHY symmetric? Only the symmetric part of A affects Q. Split A=S+K where S=21(A+A⊤) is symmetric and K=21(A−A⊤) is skew. Then x⊤Kx=0 always (a scalar equals its transpose: x⊤Kx=(x⊤Kx)⊤=x⊤K⊤x=−x⊤Kx, so it's 0). So we always assume A symmetric — nothing is lost.
Start with the double sum and see where each piece comes from. Take n=2:
x⊤Ax=[x1x2][abbc][x1x2].
Step 1 — inner multiply Ax:
Ax=[ax1+bx2bx1+cx2].Why this step? Matrix–vector product first collapses one dimension, leaving a vector.
Step 2 — dot with x⊤:
Q=x1(ax1+bx2)+x2(bx1+cx2)=ax12+2bx1x2+cx22.Why this step? The cross terms bx1x2 appear twice (from A12 and A21), producing the factor 2b. This is the key reading rule.
HOW to test it — via eigenvalues (derivation). Since A is symmetric, the Spectral Theorem gives an orthonormal eigenbasis A=QΛQ⊤ with Q⊤Q=I. Substitute y=Q⊤x (a rotation, ∥y∥=∥x∥):
x⊤Ax=x⊤QΛQ⊤x=y⊤Λy=∑i=1nλiyi2.
Imagine a landscape. You stand at the origin (the flat point) and a machine tells you how "high" the ground is a step away in any direction. A quadratic form is that machine: give it a direction arrow x, it returns a height. The matrix A secretly stores how steeply the ground bends. If it bends up in every direction, you're at the bottom of a bowl (positive definite). If it bends up one way and down another, you're on a horse saddle (indefinite). The eigenvectors are the special "downhill/uphill" directions, and the eigenvalues say how sharply it bends there.
Dekho, quadratic form ka matlab simple hai: aap ek vector x lete ho aur usse x⊤Ax ke through ek single number nikaalte ho. Ye bilkul scalar ax2 ka bada bhai hai — bas ab ek matrix A beech me baitha hai jo har direction me "curvature" store karta hai. Result hamesha degree-2 polynomial hota hai, jisme sirf xi2 aur xixj type ke terms aate hain.
Ek important reading rule yaad rakho: agar polynomial me 6x1x2 likha hai, to matrix me A12 me 6 mat daalo — usko aadha karo, kyunki cross term do baar count hota hai (A12 aur A21 dono). Ye sabse common galti hai exam me.
Ab shape ki baat: symmetric matrix ke eigenvalues nikaalo. Rotate karke form ban jaata hai ∑λiyi2. Agar saare eigenvalues positive hain to surface ek bowl (positive definite) hai — matlab ek unique minimum, gradient descent khush. Agar signs mixed hain to saddle (indefinite) — optimization phasti hai. ML me ye directly Hessian aur convexity se juda hai: positive definite Hessian = convex loss = clean minimum.
Yaad rakhne ka mantra: "Cross term aadha karo, phir axes ke signs check karo." Positive diagonal dekh ke mat fool ho jaana — off-diagonal bada ho to woh sab bigaad sakta hai, isliye hamesha eigenvalues ya leading minors (Sylvester) se confirm karo.