an alternative approach is given, i.e., the vectors ${\mbox{\boldmath $y$}}_n^{(\ell)}$ are determined by solving the following weighted least squares problems: $$\begin{aligned}
{\mbox{\boldmath $y$}}_n^{(\ell)}  = \arg\min_{{\mbox{\boldmath $z$}}_n^{(\ell)}\in \mathbf{C}^n}\ \Bigl\| g_1{\mbox{\boldmath $e$}}_1- T_{n+1,n}^{(\ell)}{\mbox{\boldmath $z$}}_n^{(\ell)}\Bigr\|_{W_{n+1}^{\textrm{\scriptsize{H}}}W_{n+1}^{}},  
                                           \label{WLSP}\end{aligned}$$ where $W_{n+1}$ is an $(n+1)$-by-$(n+1)$ nonsingular matrix. Thus $W_{n+1}^{\textrm{\scriptsize{H}}}W_{n+1}$ can be used as a weight since it is Hermitian positive definite. One of the simplest choices for $W_{n+1}$ is the identity matrix. In this case, from $W_{n+1}=I_{n+1}$ we have $$\begin{aligned}
{\mbox{\boldmath $y$}}_n^{(\ell)}  = \arg\min_{{\mbox{\boldmath $z$}}_n^{(\ell)}\in \mathbf{C}^n}\ \Bigl\| g_1 {\mbox{\boldmath $e$}}_1- T_{n+1,n}^{(\ell)}{\mbox{\boldmath $z$}}_n^{(\ell)}\Bigr\|_2.  \label{WLSP_2norm}\end{aligned}$$ The vector that is minimized is called quasi-residual. Algorithm 2.1 is obtained by solving (\[WLSP\_2norm\]) using Givens rotations, see, e.g., [@Mat_Comp p.215].

A slightly generalized choice proposed in [@FrNa91] is $W_{n+1}=\Omega_{n+1}:={\textrm}{diag}(\omega_1,\omega_2,\ldots,\\ \omega_{n+1})$ with $\omega_i>0$ for all $i$. Then, it follows that $$\begin{aligned}
{\mbox{\boldmath $y$}}_n^{(\ell)}  = \arg \min_{{\mbox{\boldmath $z$}}_n^{(\ell)}\in \mathbf{C}^n}\ \Bigl\| \omega_1g_1{\mbox{\boldmath $e$}}_1- \Omega_{n+1} T_{n+1,n}^{(\ell)}{\mbox{\boldmath $z$}}_n^{(\ell)}\Bigr\|_2.\end{aligned}$$ Of various possible choices for $\omega_i$, a natural one is $\omega_i=\|{\mbox{\boldmath $v$}}_i\|_2$ since $\Omega_{n+1}$ contains then the diagonal entries of the upper triangular matrix $R_{n+1}$ that is obtained by the $QR$ factorization of $V_{n+1}$. If we choose $W_{n+1}=R_{n+1}$, where $V_{n+1}=Q_{n+1}R_{n+1}$, then from (\[QMR\_residual\]) and (\[WLSP\]) we have $$\begin{aligned}
\min_{{\mbox{\boldmath $z$}}_n^{(\ell)}\in \mathbf{C}^n}\ \Bigl\|g_1{\mbox{\boldmath $e$}}_1- T_{n+1,n}^{(\ell)}{\mbox{\boldmath $z$}}_n^{(\ell)} \Bigr\|_{R_{n+1}^{\textrm{\scriptsize{H}}}R_{n+1}^{}}
&=&\min_{{\mbox{\boldmath $z$}}_n^{(\ell)}\in \mathbf{C}^n}\ 