Obtain a full iteration without forming the normal matrix
Let \(r=b-Ax,\ s=A^Tr\). Applying conjugate gradients to \(A^TAx=A^Tb\) starting at \(x=0\) works on the range of \(A^T\), where the operator is positive definite even if \(A\) has a nullspace. Initialise \(p=s\) and \(\gamma=s^Ts\). Along \(p\) the residual minimisation gives \(\alpha=(Ap)^Tr/\|Ap\|^2\). Conjugacy of earlier directions implies \(p^Ts=s^Ts\). Thus one CGLS iteration is
Replace \(\gamma\) by \(\gamma_{\rm new}\) and continue. A vanishing gradient means stationarity. Handle a zero denominator before division and recompute true residuals when finite precision matters. The recurrence needs only forward and transpose products. Exact-arithmetic search spaces are nested, so the training residual falls monotonically. The distance to the unknown state can increase.
Solve a sequence of projected rectangular problems
Normalise \(u_1=b/\beta_1\), \(\beta_1=\|b\|\), and \(v_1=A^Tu_1/\alpha_1\), \(\alpha_1=\|A^Tu_1\|\). Alternate orthogonal projections:
These are the Golub–Kahan recurrences, with signs fixed by positive norms. In exact arithmetic induction using transposition shows both sets are orthonormal until breakdown. Collect the coefficients in a lower bidiagonal \((k+1)\)-by-\(k\) matrix \(B_k\). Since \(AV_k=U_{k+1}B_k\), minimise \(\|\beta_1e_1-B_k y\|\) and put \(x_k=V_ky\). LSQR applies plane rotations as each bidiagonal row is appended. Its exact-arithmetic iterates match CGLS started at zero. Finite precision, explicit residual checks and stopping rules affect their returned solutions.
Take \(A=\operatorname{diag}(1,0.01)\), true state \((1,0)\), measured \(b=(1,0.01)\). The first CGLS step uses \(p=(1,10^{-4})\), with \(\alpha\) essentially one, leaving the error about \(10^{-4}\). The second step can drive both residuals to zero by returning \((1,1)\), whose state error is one. A discrepancy threshold near the known noise norm \(0.01\) can stop before fitting the weak direction.
Diagonalise a matrix pair in the right metric
Consider \(\|Ax-b\|^2+\mu^2\|Lx\|^2\). Uniqueness requires \(\ker A\cap\ker L=\{0\}\). Then \(M=A^TA+L^TL\) is positive definite. Factor \(M=R^TR\). The matrices \(\widetilde A=AR^{-1}\), \(\widetilde L=LR^{-1}\) satisfy \(\widetilde A^T\widetilde A+\widetilde L^T\widetilde L=I\). Orthogonally diagonalise the first Gram matrix. In that same basis the second is diagonal with complementary nonnegative entries \(c_i^2,s_i^2\). Thus the associated right directions \(x_i=R^{-1}v_i\) satisfy \(\|Ax_i\|=c_i,\ \|Lx_i\|=s_i\) and \(c_i^2+s_i^2=1\). Their images separately are pairwise orthogonal. This construction derives the GSVD geometry. A production algorithm avoids explicitly forming ill-conditioned Gram matrices.
For \(c_i>0\) put \(u_i=Ax_i/c_i\). With \(x=\sum\xi_i x_i\), the component objective is \((c_i\xi_i-u_i^Tb)^2+\mu^2s_i^2\xi_i^2\). Minimisation gives
f_i=\frac{c_i^2}{c_i^2+\mu^2s_i^2}.
An unpenalised but measured mode has \(s_i=0\) and filter one. A measured-data null direction with \(c_i=0\) has coefficient zero at the minimum. With a nonzero reference \(x_{\rm ref}\), apply the same derivation to its correction and the data \(b-Ax_{\rm ref}\).
What if both operators miss the field average?
A gradient penalty and a differential measurement can have the same constant nullspace. Adding any constant changes neither term of the objective. An extra measurement or physically specified mean is needed to fix the offset. An arbitrary minimum-norm convention changes the interpretation of the result.

Tutorial on filtered and unfiltered directions
Interpret a first-difference penalty in a two-cell experiment
Work through the solution
With \(A=I,\ L=(1,-1)\), normalised sum and difference are Euclidean eigenvectors. Their fitted gains are \(1\) and \(1/(1+2\mu^2)\). Increasing \(\mu\) enforces nearly equal cells while retaining their experimentally measured mean.
Choose a fair comparison between LSQR and CGLS
Work through the solution
Start both at zero, use identical operators and noisy data, count one forward and one transpose product per iteration, and plot reconstruction error and independent prediction error alongside the training residual. Equal iteration counts isolate finite-precision effects. Equal stopping rules test what an investigator actually reports.
Hansen · iterative and general-form regularisation
Change parameters · Early stopping and penalties that leave part of a field free
Change one input at a time and compare the recalculated curves with the argument above. The browser evaluates this small model locally; the accompanying numerical values state its assumptions and reference checks. Reset restores the reference inputs, and the data can be downloaded as CSV.