▁V ( 1 + n : end , 1 + n : end ); ▁% ▁Take ▁the ▁bottom - right ▁block ▁of ▁V . ▁B ▁▁▁▁▁▁ ▁= ▁- V XY / V YY ; ▁ ▁end ▁ ▁The ▁way ▁described ▁above ▁of ▁solving ▁the ▁problem , ▁which ▁requires ▁that ▁the ▁matrix ▁ ▁is ▁n ons ing ular , ▁can ▁be ▁slightly ▁extended ▁by ▁the ▁so - called ▁classical ▁TLS ▁algorithm . ▁ ▁Comput ation ▁▁ ▁The ▁standard ▁implementation ▁of ▁classical ▁TLS ▁algorithm ▁is ▁available ▁through ▁Net lib , ▁see ▁also . ▁All ▁modern ▁implementations ▁based , ▁for ▁example , ▁on ▁solving ▁a ▁sequence ▁of ▁ordinary ▁least ▁squares ▁problems , ▁approximate ▁the ▁matrix ▁ ▁( den oted ▁ ▁in ▁the ▁literature ), ▁as ▁introduced ▁by ▁Van ▁H uff el ▁and ▁V ande w alle . ▁It ▁is ▁worth ▁not ing , ▁that ▁this ▁ ▁is , ▁however , ▁not ▁the ▁TLS ▁solution ▁in ▁many ▁cases . ▁ ▁Non - linear ▁model ▁ ▁For ▁non - linear ▁systems ▁similar ▁reasoning ▁shows ▁that ▁the ▁normal ▁equations ▁for ▁an ▁iteration ▁cycle ▁can ▁be ▁written ▁as ▁ ▁Ge omet rical ▁interpretation ▁▁ ▁When ▁the ▁independent ▁variable ▁is ▁error - free ▁a ▁resid ual ▁represents ▁the ▁" vertical " ▁distance ▁between ▁the ▁observed ▁data ▁point ▁and ▁the ▁fitted ▁curve ▁( or ▁surface ). ▁In ▁total ▁least ▁squares ▁a ▁resid ual ▁represents ▁the ▁distance ▁between ▁a ▁data ▁point ▁and ▁the ▁fitted ▁curve ▁measured ▁along ▁some ▁direction . ▁In ▁fact , ▁if ▁both ▁variables ▁are ▁measured ▁in ▁the ▁same ▁units ▁and