4.5.36 · HinglishLinear Algebra (Full)

QR decomposition

1,445 words7 min readRead in English

4.5.36 · Maths › Linear Algebra (Full)


QR decomposition HAI KYA?

YEH CHAHIYE KYU?

  • Least squares solve karna trivial ho jaata hai: (sirf back-substitution, koi normal-equation squaring nahi jo numerical accuracy bigaad de).
  • Orthonormal columns ka matlab hai lengths aur angles preserve hote hain — ek rotation/reflection hai.
  • Yeh QR algorithm ka engine hai eigenvalues ke liye.

KAISE: QR ko Gram–Schmidt se derive karo (first principles)

Maano (columns).

Step 1 — pehla axis banao. Humein ek unit vector chahiye jo ki taraf point kare: Kyun? hamaari pehli orthonormal direction hai; baaki sab cheezein iske against measure ki jaayengi.

Step 2 — jo already explain ho chuka hai use hataao. ke liye, uska shadow (projection) par subtract karo: Kyun? Bacha hua , ka woh hissa hai jo ke perpendicular hai, isliye .

Step k — saare pehle ke shadows subtract karo.

Step — padho. Har relation ko invert karo taaki original ko ke terms mein express kiya ja sake:

Toh mein ka coefficient hai

ko saare ke liye stack karna exactly matrix equation hai. ∎

Figure — QR decomposition

Worked Example 1 — ek saaf

Column 1. , . . Yeh step kyun? Pehla axis = normalized pehla column.

Projection coefficient. . Kyun? Yeh measure karta hai ki ka kitna hissa ke along already hai.

Column 2. , isliye . .

Result. Check: aur .


Worked Example 2 — least squares via QR

solve karo upar wale ke saath aur .

QR kyun help karta hai. . Kyunki length preserve karta hai, andar se multiply karo (full tak extend karo): minimizer satisfy karta hai Kyun? . Invertible cancel karo: . ki koi squaring nahi → numerically stable.

Compute :

Back-substitute : Row 2: Row 1:

Toh . Baar pe trust kyun karein? Triangular solve exact hota hai aur form karne se bachta hai.


Forecast-then-Verify


Common Mistakes


Active Recall

Recall Test yourself (hidden)
  • upper triangular kyun hai? → kyunki sirf use karta hai.
  • Least-squares shortcut kya hai? → .
  • kya property guarantee karta hai? → (length/angle preserving).
  • QR unique kya banata hai? → .
Recall Feynman: 12 saal ke bacche ko samjhao

Socho tumhare paas teen thode tedhe arrows hain kaagaz par. Tum unhe ek saaf set of perpendicular arrows se describe karna chahte ho (jaise ek room ka corner: upar, daayein, aage). Pehle arrow 1 ko rakho, bas use length 1 tak shrink karo — yeh tumhari pehli clean direction hai. Arrow 2 ke liye, woh hissa mitao jo arrow 1 ki taraf point karta hai, aur jo bacha hua hai woh ek brand-new perpendicular direction mein point karta hai — use length 1 tak clean karo. Repeat karo. Saaf perpendicular arrows Q ke columns hain. "Har clean arrow ka kitna use kiya" ki instructions R banati hain. Unhe wapas multiply karo aur original tedhe arrows rebuild ho jaate hain: .


Connections

  • Gram-Schmidt process — woh algorithm jo QR package karta hai.
  • Orthonormal bases and projections — projections , ke entries hain.
  • Least squares and normal equations — QR stable solver hai.
  • Householder reflections — production-grade tarika QR paane ka.
  • Eigenvalues and the QR algorithm iterate karna.
  • LU decomposition — sibling factorization (triangular but not orthogonal).

QR decomposition ko kya factor karta hai?
jisme ke orthonormal columns () aur upper-triangular with positive diagonal.
upper-triangular kyun hai?
Kyunki har sirf ka combination hai, isliye coefficients jab .
ke off-diagonal entries ka formula?
jab .
ke diagonal entries ka formula?
, orthogonalized -th column ka norm.
QR ke saath least squares kaise solve karte hain?
ko back-substitution se solve karo.
Thin aur full QR mein difference?
Thin: hai (sirf ). Full: orthogonal hai.
QR decomposition unique kya banata hai?
require karna (positive diagonal).
Ek orthogonal matrix ka QR?
, .
QR kis algorithm se bana hai?
Gram–Schmidt process se.
Normal equations ke upar QR kyun prefer karte hain?
form karne se bachta hai, jo condition number square kar deta hai; QR numerically stable hai.

Concept Map

factorized as

contains

contains

satisfies

produces

coefficients form

normalize a1

subtract projections

normalized gives

diagonal

enables

drives

Matrix A columns skewed

A = QR

Q orthonormal columns

R upper triangular

Q transpose Q = I

Gram-Schmidt process

q1 first axis

perpendicular leftover

r_kk = norm of u_k > 0

Least squares Rx = Q transpose b

QR algorithm for eigenvalues