This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Two harmonic Jacobi–Davidson methods for computing a partial generalized singular value decomposition of a large matrix pairthanks: Supported by the National Natural Science Foundation of China (No. 12171273).

Jinzhi Huang School of Mathematical Sciences, Soochow University, 215006 Suzhou, China ([email protected])    Zhongxiao Jia Corresponding author. Department of Mathematical Sciences, Tsinghua University, 100084 Beijing, China ([email protected]). The two authors contributed equally to this work.
Abstract

Two harmonic extraction based Jacobi–Davidson (JD) type algorithms are proposed to compute a partial generalized singular value decomposition (GSVD) of a large regular matrix pair. They are called cross product-free (CPF) and inverse-free (IF) harmonic JDGSVD algorithms, abbreviated as CPF-HJDGSVD and IF-HJDGSVD, respectively. Compared with the standard extraction based JDGSVD algorithm, the harmonic extraction based algorithms converge more regularly and suit better for computing GSVD components corresponding to interior generalized singular values. Thick-restart CPF-HJDGSVD and IF-HJDGSVD algorithms with some deflation and purgation techniques are developed to compute more than one GSVD components. Numerical experiments confirm the superiority of CPF-HJDGSVD and IF-HJDGSVD to the standard extraction based JDGSVD algorithm.

keywords:
Generalized singular value decomposition, generalized singular value, generalized singular vector, standard extraction, harmonic extraction, Jacobi–Davidson type method
AMS:
65F15, 15A18, 65F10

1 Introduction

For a pair of large and possibly sparse matrices Am×nA\in\mathbb{R}^{m\times n} and Bp×nB\in\mathbb{R}^{p\times n}, the matrix pair (A,B)(A,B) is called regular if 𝒩(A)𝒩(B)={𝟎}\mathcal{N}(A)\cap\mathcal{N}(B)=\{\bm{0}\}, i.e., rank([AB])=n\mathrm{rank}\left(\begin{bmatrix}\begin{smallmatrix}A\\ B\end{smallmatrix}\end{bmatrix}\right)=n, where 𝒩(A)\mathcal{N}(A) and 𝒩(B)\mathcal{N}(B) denote the null spaces of AA and BB, respectively. The generalized singular value decomposition (GSVD) of (A,B)(A,B) was introduced by Van Loan [34] and developed by Paige and Saunders [28]. Since then, GSVD has become a standard matrix decomposition and has been widely used [2, 3, 4, 9, 10, 25]. Let q1=dim(𝒩(A))q_{1}=\dim(\mathcal{N}(A)), q2=dim(𝒩(B))q_{2}=\dim(\mathcal{N}(B)) and l1=dim(𝒩(AT))l_{1}=\dim(\mathcal{N}(A^{T})), l2=dim(𝒩(BT))l_{2}=\dim(\mathcal{N}(B^{T})), where the superscript TT denotes the transpose. Then the GSVD of (A,B)(A,B) is

(1.1) {UTAX=ΣA=diag{C,𝟎l1,q1,Iq2},VTBX=ΣB=diag{S,Iq1,𝟎l2,q2},\left\{\begin{aligned} &U^{T}AX=\Sigma_{A}=\mathop{\operator@font diag}\nolimits\{C,\mathbf{0}_{l_{1},q_{1}},I_{q_{2}}\},\\ &V^{T}BX=\Sigma_{B}=\mathop{\operator@font diag}\nolimits\{S,I_{q_{1}},\mathbf{0}_{l_{2},q_{2}}\},\end{aligned}\right.

where X=[Xq,Xq1,Xq2]X=[X_{q},X_{q_{1}},X_{q_{2}}] is nonsingular, U=[Uq,Ul1,Uq2]U=[U_{q},U_{l_{1}},U_{q_{2}}] and V=[Vq,Vq1,Vl2]V=[V_{q},V_{q_{1}},V_{l_{2}}] are orthogonal, and the diagonal matrices C=diag{α1,,αq}C=\mathop{\operator@font diag}\nolimits\{\alpha_{1},\dots,\alpha_{q}\} and S=diag{β1,,βq}S=\mathop{\operator@font diag}\nolimits\{\beta_{1},\dots,\beta_{q}\} satisfy

0<αi,βi<1andαi2+βi2=1,i=1,,q0<\alpha_{i},\beta_{i}<1\quad\mbox{and}\quad\alpha_{i}^{2}+\beta_{i}^{2}=1,\quad i=1,\dots,q

with q=nq1q2q=n-q_{1}-q_{2}. Here, 𝟎li,qi\mathbf{0}_{l_{i},q_{i}} and Iqi,i=1,2,I_{q_{i}},i=1,2, are the li×qil_{i}\times q_{i} zero matrices and identity matrices of order qiq_{i}, respectively; see [28]. The GSVD part in (1.1) that corresponds to αi\alpha_{i} and βi\beta_{i} can be written as

(1.2) {Axi=αiui,Bxi=βivi,βiATui=αiBTvi,i=1,,q,\left\{\begin{aligned} Ax_{i}&=\alpha_{i}u_{i},\\ Bx_{i}&=\beta_{i}v_{i},\\ \beta_{i}A^{T}u_{i}&=\alpha_{i}B^{T}v_{i},\end{aligned}\right.\qquad i=1,\dots,q,

where xix_{i} is the iith column of XqX_{q} and the unit-length vectors uiu_{i} and viv_{i} are the iith columns of UqU_{q} and VqV_{q}, respectively. The quintuples (αi,βi,ui,vi,xi)(\alpha_{i},\beta_{i},u_{i},v_{i},x_{i}), i=1,,qi=1,\dots,q are called nontrivial GSVD components of (A,B)(A,B). Particularly, the numbers σi=αiβi\sigma_{i}=\frac{\alpha_{i}}{\beta_{i}} or the pairs (αi,βi)(\alpha_{i},\beta_{i}) are called the nontrivial generalized singular values, and ui,viu_{i},v_{i} and xix_{i} are the corresponding left and right generalized singular vectors, respectively, i=1,,qi=1,\dots,q.

For a given target τ>0\tau>0, we assume that all the nontrivial generalized singular values of (A,B)(A,B) are labeled by their distances from τ\tau:

(1.3) |σ1τ||στ|<|σ+1τ||σqτ|.|\sigma_{1}-\tau|\leq\dots\leq|\sigma_{\ell}-\tau|<|\sigma_{\ell+1}-\tau|\leq\dots\leq|\sigma_{q}-\tau|.

We are interested in computing the GSVD components (αi,βi,ui,vi,xi)(\alpha_{i},\beta_{i},u_{i},v_{i},x_{i}) corresponding to the \ell nontrivial generalized singular values σi\sigma_{i} of (A,B)(A,B) closest to τ\tau. If τ\tau is inside the nontrivial generalized singular spectrum of (A,B)(A,B), then (αi,βi,ui,vi,xi)(\alpha_{i},\beta_{i},u_{i},v_{i},x_{i}), i=1,,i=1,\dots,\ell are called interior GSVD components of (A,B)(A,B); otherwise, they are called the extreme, i.e., largest or smallest, ones. A large number of GSVD components, some of which are interior ones [5, 6, 7], are required in a variety of applications. Throughout this paper, we assume that τ\tau is not equal to any generalized singular value of (A,B)(A,B).

Zha [37] proposes a joint bidiagonalization (JBD) method to compute extreme GSVD components of the large matrix pair (A,B)(A,B). The method is based on a JBD process that successively reduces (A,B)(A,B) to a sequence of upper bidiagonal pairs, from which approximate GSVD components are computed. Kilmer, Hansen and Espanol [26] have adapted the JBD process to the linear discrete ill-posed problem with general-form regularization and developed a JBD process that reduces (A,B)(A,B) to lower-upper bidiagonal forms. Jia and Yang [24] have developed a new JBD process based iterative algorithm for the ill-posed problem and considered the convergence of extreme generalized singular values. In the GSVD computation and the solution of discrete ill-posed problem, one needs to solve an (m+p)×n(m+p)\times n least squares problem with the coefficient matrix [AT,BT]T[A^{T},B^{T}]^{T} at each step of the JBD process. Jia and Li [22] have recently considered the JBD process in finite precision and proposed a partial reorthogonalization strategy to maintain numerical semi-orthogonality among the generated basis vectors so as to avoid ghost approximate GSVD components, where the semi-orthogonality means that two unit-length vectors are numerically orthogonal to the level of ϵmach1/2\epsilon_{\rm mach}^{1/2} with ϵmach\epsilon_{\rm mach} being the machine precision.

Hochstenbach [12] presents a Jacobi–Davidson (JD) GSVD (JDGSVD) method to compute a number of interior GSVD components of (A,B)(A,B) with BB of full column rank, where, at each step, an (m+n)(m+n)-dimensional linear system, i.e., the correction equation, needs to be solved iteratively with low or modest accuracy; see [14, 15, 20, 21]. The lower nn-dimensional and upper mm-dimensional parts of the approximate solution are used to expand the right and one of the left searching subspaces, respectively. The JDGSVD method formulates the GSVD of (A,B)(A,B) as the equivalent generalized eigendecomposition of the augmented matrix pair ([AAT],[IBTB])\left(\begin{bmatrix}\begin{smallmatrix}&A\\ A^{T}&\end{smallmatrix}\end{bmatrix},\begin{bmatrix}\begin{smallmatrix}I&\\ &B^{T}B\end{smallmatrix}\end{bmatrix}\right) for BB of full column rank, computes the relevant eigenpairs, and recovers the approximate GSVD components from the converged eigenpairs. The authors [16] have shown that the error of the computed eigenvector is bounded by the size of the perturbations times a multiple κ(BTB)=κ2(B)\kappa(B^{T}B)=\kappa^{2}(B), where κ(B)=σmax(B)/σmin(B)\kappa(B)=\sigma_{\max}(B)/\sigma_{\min}(B) denotes the 22-norm condition number of BB with σmax(B)\sigma_{\max}(B) and σmin(B)\sigma_{\min}(B) being the largest and smallest singular values of BB, respectively. Consequently, with an ill-conditioned BB, the computed GSVD components may have very poor accuracy, which has been numerically confirmed [16]. The results in [16] show that if BB is ill conditioned but AA has full column rank and is well conditioned then the JDGSVD method can be applied to the matrix pair ([BBT],[IATA])(\begin{bmatrix}\begin{smallmatrix}&B\\ B^{T}&\end{smallmatrix}\end{bmatrix},\begin{bmatrix}\begin{smallmatrix}I&\\ &A^{T}A\end{smallmatrix}\end{bmatrix}) and computes the corresponding approximate GSVD components with high accuracy. Note that the two formulations require that BB and AA be rectangular or square, respectively. We should also realize that a reliable estimation of the condition numbers of AA and BB may be costly, so that it may be difficult to choose a proper formulation in applications.

Zwaan and Hochstenbach [39] present a generalized Davidson (GDGSVD) method and a multidirectional (MDGSVD) method to compute an extreme partial GSVD of (A,B)(A,B). These two methods involve no cross product matrices ATAA^{T}A and BTBB^{T}B or matrix-matrix products, and they apply the standard extraction approach, i.e., the Rayleigh–Ritz method [31] to (A,B)(A,B) directly and compute approximate GSVD components with respect to the given left and right searching subspaces, where the two left subspaces are formed by premultiplying the right one with AA and BB, respectively. At iteration kk of the GDGSVD method, the right searching subspace is spanned by the kk residuals of the generalized Davidson method [1, Sec. 11.2.4 and Sec. 11.3.6] applied to the generalized eigenvalue problem of (ATA,BTB)(A^{T}A,B^{T}B); in the MDGSVD method, an inferior search direction is discarded by a truncation technique, so that the searching subspaces are improved. Zwaan [38] exploits the Kronecker canonical form of a regular matrix pair [32] and shows that the GSVD problem of (A,B)(A,B) can be formulated as a certain (2m+p+n)×(2m+p+n)(2m+p+n)\times(2m+p+n) generalized eigenvalue problem without involving any cross product or any other matrix-matrix product. Such formulation currently is mainly of theoretical value since the nontrivial eigenvalues and eigenvectors of the structured generalized eigenvalue problem are always complex: the generalized eigenvalues are the conjugate quaternions (σj,σj,iσj,iσj)(\sqrt{\sigma_{j}},-\sqrt{\sigma_{j}},\mathrm{i}\sqrt{\sigma_{j}},-\mathrm{i}\sqrt{\sigma_{j}}) with i\mathrm{i} the imaginary unit, and the corresponding right generalized eigenvectors are

[ujT,xjT/βj,σjujT,σjvjT]T,[ujT,xjT/βj,σjujT,σjvjT]T,\displaystyle[u_{j}^{T},x_{j}^{T}/\beta_{j},\sqrt{\sigma_{j}}u_{j}^{T},\sqrt{\sigma_{j}}v_{j}^{T}]^{T},\qquad\qquad\hskip 1.19995pt[-u_{j}^{T},-x_{j}^{T}/\beta_{j},\sqrt{\sigma_{j}}u_{j}^{T},\sqrt{\sigma_{j}}v_{j}^{T}]^{T},
[iujT,ixjT/βj,σjujT,σjvjT]T,[iujT,ixjT/βj,σjujT,σjvjT]T.\displaystyle[-\mathrm{i}u_{j}^{T},\mathrm{i}x_{j}^{T}/\beta_{j},\sqrt{\sigma_{j}}u_{j}^{T},-\sqrt{\sigma_{j}}v_{j}^{T}]^{T},\qquad[\mathrm{i}u_{j}^{T},\mathrm{i}x_{j}^{T}/\beta_{j},-\sqrt{\sigma_{j}}u_{j}^{T},-\sqrt{\sigma_{j}}v_{j}^{T}]^{T}.

Clearly, the size of the generalized eigenvalue problem is much bigger than that of the GSVD of (A,B)(A,B). The conditioning of eigenvalues and eigenvectors of this problem is also unclear. In the meantime, no structure-preserving algorithm has been found for such kind of complicated structured generalized eigenvalue problem. Definitely, it will be extremely difficult and highly challenging to seek for a numerically stable structure-preserving algorithm for this problem.

The authors [15] have recently proposed a Cross Product-Free JDGSVD method, referred to as the CPF-JDGSVD method, to compute several GSVD components of (A,B)(A,B) corresponding to the generalized singular values closest to τ\tau. The CPF-JDGSVD method is cross products ATAA^{T}A and BTBB^{T}B free when constructing and expanding right and left searching subspaces; it premultiplies the right searching subspace by AA and BB to construct two left ones separately, and forms the orthonormal bases of those by computing two thin QR factorizations, as done in [39]. The resulting projected problem is the GSVD of a small matrix pair without involving any cross product or matrix-matrix product. Mathematically, the method implicitly deals with the equivalent generalized eigenvalue problem of (ATA,BTB)(A^{T}A,B^{T}B) without forming ATAA^{T}A or BTBB^{T}B explicitly. At the subspace expansion stage, an nn-by-nn correction equation is approximately solved iteratively with low or modest accuracy, and the approximate solution is used to expand the searching subspaces. Therefore, the subspace expansion is fundamentally different from that used in [39], where the dimension nn of the correction equations is no more than half of the dimension m+nm+n of those in [12].

Just like the standard Rayleigh–Ritz method for the matrix eigenvalue problem and the singular value decomposition (SVD) problem, the CPF-JDGSVD method suits better for the computation of some extreme GSVD components, but it may encounter some serious difficulties for the computation of interior GSVD components. Remarkably, adapted from the standard extraction approach for the eigenvalue problem and SVD problem to the GSVD computation, an intrinsic shortcoming of a standard extraction based method is that it may be hard to pick up good approximate generalized singular values correctly even if the searching subspaces are sufficiently good. This potential disadvantage may make the resulting algorithm expand the subspaces along wrong directions and converge irregularly, as has been numerically observed in [15]. To this end, inspired by the harmonic extraction based methods that suit better for computing interior eigenpairs and SVD components [11, 13, 14, 17, 23, 21, 27], we will propose two harmonic extraction based JDGSVD methods that are particularly suitable for the computation of interior GSVD components. One method is cross products ATAA^{T}A and BTBB^{T}B free, and the other is inversions (ATA)1(A^{T}A)^{-1} and (BTB)1(B^{T}B)^{-1} free. As will be seen, the derivations of the two harmonic extraction methods are nontrivial, and they are subtle adaptations of the harmonic extraction for matrix eigenvalue and SVD problems. In the sequel, we will abbreviate Cross Product-Free and Inverse-Free Harmonic JDGSVD methods as CPF-HJDGSVD and IF-HJDGSVD, respectively.

We first focus on the case =1\ell=1 and propose our harmonic extraction based JDGSVD type methods. Then by introducing the deflation technique in [15] into the methods, we present the methods to compute more than one, i.e., >1\ell>1, GSVD components. To be practical, combining the thick-restart technique in [30] and some purgation approach, we develop thick-restart CPF-HJDGSVD and IF-HJDGSVD algorithms to compute the \ell GSVD components associated with the generalized singular values of (A,B)(A,B) closest to τ\tau.

The rest of this paper is organized as follows. In Section 2, we briefly review the CPF-JDGSVD method proposed in [15]. In Section 3, we propose the CPF-HJDGSVD and IF-HJDGSVD methods. In Section 4, we develop thick-restart CPF-HJDGSVD and IF-HJDGSVD with deflation and purgation to compute \ell GSVD components of (A,B)(A,B). In Section 5, we report numerical experiments to illustrate the performance of CPF-HJDGSVD and IF-HJDGSVD, make a comparison of them and CPF-JDGSVD, and show the superiority of the former two to the latter one. Finally, we conclude the paper in Section 6.

Throughout this paper, we denote by ()\mathcal{R}(\cdot) the column space of a matrix, and by \|\cdot\| and 1\|\cdot\|_{1} the 22- and 11-norms of a matrix or vector, respectively. As in (1.1), we denote by IiI_{i} and 𝟎i,j\bm{0}_{i,j} the ii-by-ii identity and ii-by-jj zero matrices, respectively, with the subscripts ii and jj dropped whenever they are clear from the context.

2 The standard extraction based JDGSVD method

We review the CPF-JDGSVD method in [15] for computing the GSVD component (α,β,u,v,x):=(α1,β1,u1,v1,x1)(\alpha_{*},\beta_{*},u_{*},v_{*},x_{*}):=(\alpha_{1},\beta_{1},u_{1},v_{1},x_{1}) of (A,B)(A,B). Assume that a kk-dimensional right searching subspace 𝒳n\mathcal{X}\subset\mathbb{R}^{n} is available, from which an approximation to xx_{*} is extracted. Then we construct

(2.1) 𝒰=A𝒳and𝒱=B𝒳\mathcal{U}=A\mathcal{X}\qquad\mbox{and}\qquad\mathcal{V}=B\mathcal{X}

as the two left searching subspaces, from which approximations to uu_{*} and vv_{*} are computed. It is proved in [15] that the distance between uu_{*} and 𝒰\mathcal{U} (resp. vv_{*} and 𝒱\mathcal{V}) is as small as that between xx_{*} and 𝒳\mathcal{X}, provided that α\alpha_{*} (resp. β\beta_{*}) is not very small. In other words, for the extreme and interior GSVD components, 𝒰\mathcal{U} and 𝒱\mathcal{V} constructed by (2.1) are as good as 𝒳\mathcal{X} provided that the desired generalized singular values σ=αβ\sigma_{*}=\frac{\alpha_{*}}{\beta_{*}} are neither very small nor very small. It is also proved in [15] that 𝒰\mathcal{U} or 𝒱\mathcal{V} is as accurate as 𝒳\mathcal{X} for very large or small generalized singular values.

Assume that the columns of X~n×k\widetilde{X}\in\mathbb{R}^{n\times k} form an orthonormal basis of 𝒳\mathcal{X}, and compute the thin QR factorizations of AX~A\widetilde{X} and BX~B\widetilde{X}:

(2.2) AX~=U~RAandBX~=V~RB,A\widetilde{X}=\widetilde{U}R_{A}\qquad\mbox{and}\qquad B\widetilde{X}=\widetilde{V}R_{B},

where U~m×k\widetilde{U}\in\mathbb{R}^{m\times k} and V~p×k\widetilde{V}\in\mathbb{R}^{p\times k} are orthonormal, and RAk×kR_{A}\in\mathbb{R}^{k\times k} and RBk×kR_{B}\in\mathbb{R}^{k\times k} are upper triangular. Then the columns of U~\widetilde{U} and V~\widetilde{V} are orthonormal bases of 𝒰\mathcal{U} and 𝒱\mathcal{V}, respectively. With 𝒳\mathcal{X}, 𝒰\mathcal{U}, 𝒱\mathcal{V} and their orthonormal bases available, we can extract an approximation to the desired GSVD component (α,β,u,v,x)(\alpha_{*},\beta_{*},u_{*},v_{*},x_{*}) of (A,B)(A,B) with respect to them. The standard extraction approach in [15] seeks for positive pairs (α~,β~)(\tilde{\alpha},\tilde{\beta}) with α~2+β~2=1\tilde{\alpha}^{2}+\tilde{\beta}^{2}=1, normalized vectors u~𝒰\tilde{u}\in\mathcal{U}, v~𝒱\tilde{v}\in\mathcal{V}, and vectors x~𝒳\tilde{x}\in\mathcal{X} that satisfy the Galerkin type conditions:

(2.3) {Ax~α~u~𝒰,Bx~β~v~𝒱,β~ATu~α~BTv~𝒳.\left\{\begin{aligned} A\tilde{x}-\tilde{\alpha}\tilde{u}&\perp\mathcal{U},\\ B\tilde{x}-\tilde{\beta}\tilde{v}&\perp\mathcal{V},\\ \tilde{\beta}A^{T}\tilde{u}-\tilde{\alpha}B^{T}\tilde{v}&\perp\mathcal{X}.\end{aligned}\right.

Among kk pairs (α~,β~)(\tilde{\alpha},\tilde{\beta})’s, select θ~=α~/β~\tilde{\theta}=\tilde{\alpha}/\tilde{\beta} closest to τ\tau, and take (α~,β~,u~,v~,x~)(\tilde{\alpha},\tilde{\beta},\tilde{u},\tilde{v},\tilde{x}) as an approximation to (α,β,u,v,x)(\alpha_{*},\beta_{*},u_{*},v_{*},x_{*}). We call (α~,β~)(\tilde{\alpha},\tilde{\beta}) or θ~=α~β~\tilde{\theta}=\frac{\tilde{\alpha}}{\tilde{\beta}} a Ritz value and u~\tilde{u}, v~\tilde{v} and x~\tilde{x} the corresponding left and right Ritz vectors, respectively.

It follows from the thin QR factorizations (2.2) of AX~A\widetilde{X} and BX~B\widetilde{X} that RA=U~TAX~R_{A}=\widetilde{U}^{T}A\widetilde{X} and RB=V~TAX~R_{B}=\widetilde{V}^{T}A\widetilde{X}. Write u~=U~e~\tilde{u}=\widetilde{U}\tilde{e}, v~=V~f~\tilde{v}=\widetilde{V}\tilde{f} and x~=X~d~\tilde{x}=\widetilde{X}\tilde{d}. Then (2.3) becomes

(2.4) RAd~=α~e~,RBd~=β~f~,β~RATe~=α~RBTf~,R_{A}\tilde{d}=\tilde{\alpha}\tilde{e},\qquad R_{B}\tilde{d}=\tilde{\beta}\tilde{f},\qquad\tilde{\beta}R_{A}^{T}\tilde{e}=\tilde{\alpha}R_{B}^{T}\tilde{f},

which is precisely the GSVD of the projected matrix pair (RA,RB)(R_{A},R_{B}). Therefore, in the extraction phase, the standard extraction approach computes the GSVD of the kk-by-kk matrix pair (RA,RB)(R_{A},R_{B}), picks up the GSVD component (α~,β~,e~,f~,d~)(\tilde{\alpha},\tilde{\beta},\tilde{e},\tilde{f},\tilde{d}) with θ~=α~β~\tilde{\theta}=\frac{\tilde{\alpha}}{\tilde{\beta}} being the generalized singular value of (RA,RB)(R_{A},R_{B}) closest to the target τ\tau, and use

(α~,β~,u~,v~,x~)=(α~,β~,U~e~,V~f~,X~d~)(\tilde{\alpha},\tilde{\beta},\tilde{u},\tilde{v},\tilde{x})=(\tilde{\alpha},\tilde{\beta},\widetilde{U}\tilde{e},\widetilde{V}\tilde{f},\widetilde{X}\tilde{d})

as an approximation to (α,β,u,v,x)(\alpha_{*},\beta_{*},u_{*},v_{*},x_{*}) of (A,B)(A,B). It is straightforward from (2.3) that Ax~=α~u~A\tilde{x}=\tilde{\alpha}\tilde{u}, Bx~=β~v~B\tilde{x}=\tilde{\beta}\tilde{v} and

(ATAθ~2BTB)x~𝒳.(A^{T}A-\tilde{\theta}^{2}\ B^{T}B)\tilde{x}\perp\mathcal{X}.

That is, (θ~2,x~)(\tilde{\theta}^{2},\tilde{x}) is a standard Ritz pair to the eigenpair (σ2,x)(\sigma_{*}^{2},x_{*}) of the symmetric definite matrix pair (ATA,BTB)(A^{T}A,B^{T}B) with respect to the subspace 𝒳\mathcal{X}. Because of this, we call (α~,β~,u~,v~,x~)(\tilde{\alpha},\tilde{\beta},\tilde{u},\tilde{v},\tilde{x}) a standard Ritz approximation in the GSVD context.

Since Ax~=α~u~A\tilde{x}=\tilde{\alpha}\tilde{u} and Bx~=β~v~B\tilde{x}=\tilde{\beta}\tilde{v}, the residual of Ritz approximation (α~,β~,u~,v~,x~)(\tilde{\alpha},\tilde{\beta},\tilde{u},\tilde{v},\tilde{x}) is

(2.5) r=r(α~,β~,u~,v~,x~)=β~ATu~αBTv~.r=r(\tilde{\alpha},\tilde{\beta},\tilde{u},\tilde{v},\tilde{x})=\tilde{\beta}A^{T}\tilde{u}-\alpha B^{T}\tilde{v}.

Obviously, (α~,β~,u~,v~,x~)(\tilde{\alpha},\tilde{\beta},\tilde{u},\tilde{v},\tilde{x}) is an exact GSVD component of (A,B)(A,B) if and only if r=0\|r\|=0. The approximate GSVD component (α~,β~,u~,v~,x~)(\tilde{\alpha},\tilde{\beta},\tilde{u},\tilde{v},\tilde{x}) is claimed to have converged if

(2.6) r(β~A1+α~B1)tol,\|r\|\leq(\tilde{\beta}\|A\|_{1}+\tilde{\alpha}\|B\|_{1})\cdot tol,

where tol>0tol>0 is a user prescribed tolerance, and one then stops the iterations.

If (α~,β~,u~,v~,x~)(\tilde{\alpha},\tilde{\beta},\tilde{u},\tilde{v},\tilde{x}) has not yet converged, the CFP-JDGSVD method expands the right searching subspace 𝒳\mathcal{X} and constructs the corresponding left subspaces 𝒰\mathcal{U} and 𝒱\mathcal{V} by (2.1). Specifically, the CPF-JDGSVD seeks for an expansion vector tt in the following way: For the vector

(2.7) y~:=(ATA+BTB)x~=α~ATu~+β~BTv~\tilde{y}:=(A^{T}A+B^{T}B)\tilde{x}=\tilde{\alpha}A^{T}\tilde{u}+\tilde{\beta}B^{T}\tilde{v}

that satisfies y~Tx~=1\tilde{y}^{T}\tilde{x}=1, we first solve the correction equation

(2.8) (Iy~x~T)(ATAρ2BTB)(Ix~y~T)t=r(I-\tilde{y}\tilde{x}^{T})(A^{T}A-\rho^{2}B^{T}B)(I-\tilde{x}\tilde{y}^{T})t=-r

with the fixed ρ=τ\rho=\tau for ty~t\perp\tilde{y} until

(2.9) r(β~A1+α~B1)fixtol\|r\|\leq(\tilde{\beta}\|A\|_{1}+\tilde{\alpha}\|B\|_{1})\cdot fixtol

for a user prescribed tolerance fixtol>0fixtol>0, say, fixtol=104fixtol=10^{-4}, and then solve the modified correction equation with the dynamic ρ=α~/β~\rho=\tilde{\alpha}/\tilde{\beta} for ty~t\perp\tilde{y}. Note that Iy~x~TI-\tilde{y}\tilde{x}^{T} is an oblique projector onto the orthogonal complement of the subspace span{x}{\rm span}\{x\}.

With the solution tt of (2.8), we expand 𝒳\mathcal{X} to the new (k+1)(k+1)-dimensional 𝒳new=span{X~,t}\mathcal{X}_{\rm new}={\rm span}\{\widetilde{X},t\}, whose orthonormal basis matrix is

(2.10) X~new=[X~,x+]withx+=(IX~X~T)t(IX~X~T)t,\widetilde{X}_{\mathrm{new}}=[\widetilde{X},\ x_{+}]\qquad\mbox{with}\qquad x_{+}=\frac{(I-\widetilde{X}\widetilde{X}^{T})t}{\|(I-\widetilde{X}\widetilde{X}^{T})t\|},

where x+x_{+} is called an expansion vector. We then compute the orthonormal bases U~new\widetilde{U}_{\mathrm{new}} and V~new\widetilde{V}_{\mathrm{new}} of the expanded left searching subspaces

𝒰new=A𝒳new=span{U~,Ax+},𝒱new=B𝒳new=span{V~,Bx+}\mathcal{U}_{\mathrm{new}}=A\mathcal{X}_{\mathrm{new}}=\mathrm{span}\{\widetilde{U},Ax_{+}\},\qquad\mathcal{V}_{\mathrm{new}}=B\mathcal{X}_{\mathrm{new}}=\mathrm{span}\{\widetilde{V},Bx_{+}\}

by efficiently updating the thin QR factorizations of AX~new=U~newRA,newA\widetilde{X}_{\mathrm{new}}=\widetilde{U}_{\mathrm{new}}R_{A,\mathrm{new}} and BX~new=V~newRB,newB\widetilde{X}_{\mathrm{new}}=\widetilde{V}_{\mathrm{new}}R_{B,\mathrm{new}}, respectively, where

U~new=[U~,u+],RA,new=[RArAγA],V~new=[V~,v+],RB,new=[RBrBγB]\widetilde{U}_{\mathrm{new}}=[\widetilde{U},u_{+}],\quad R_{A,\mathrm{new}}=\begin{bmatrix}R_{A}&r_{A}\\ &\gamma_{A}\end{bmatrix},\quad\widetilde{V}_{\mathrm{new}}=[\widetilde{V},v_{+}],\quad R_{B,\mathrm{new}}=\begin{bmatrix}R_{B}&r_{B}\\ &\gamma_{B}\end{bmatrix}

with

rA=U~TAx+,γA=Ax+U~rA,u+=Ax+U~rAγA,\displaystyle r_{A}=\widetilde{U}^{T}Ax_{+},\qquad\gamma_{A}=\|Ax_{+}-\widetilde{U}r_{A}\|,\qquad u_{+}=\frac{Ax_{+}-\widetilde{U}r_{A}}{\gamma_{A}},
rB=V~TBx+,γB=Bx+V~rB,v+=Bx+V~rBγA.\displaystyle r_{B}=\widetilde{V}^{T}Bx_{+},\qquad\gamma_{B}=\|Bx_{+}-\widetilde{V}r_{B}\|,\qquad v_{+}=\frac{Bx_{+}-\widetilde{V}r_{B}}{\gamma_{A}}.

CPF-JDGSVD then computes a new approximate GSVD component of (A,B)(A,B) with respect to 𝒰new,𝒱new\mathcal{U}_{\rm new},\mathcal{V}_{\rm new} and 𝒳new\mathcal{X}_{\rm new}, and repeat the above process until the convergence criterion (2.6) is achieved. We call iterative solutions of (2.8) the inner iterations and the extractions of the approximate GSVD components with respect to 𝒰\mathcal{U}, 𝒱\mathcal{V} and 𝒳\mathcal{X} the outer iterations.

As has been shown in [15], it suffices to iteratively solve the correction equations approximately with low or modest accuracy and uses an approximate solution to update 𝒳\mathcal{X} in the above way, in order that the resulting inexact CPF-JDGSVD method and its exact counterpart with the correction equations solved accurately behave similarly. Precisely, for the correction equation (2.8), we adopt the inner stopping criteria in [15] and stop the inner iterations when the inner relative residual norm rin\|r_{in}\| satisfies

(2.11) rinmin{2cε~,0.01},\|r_{in}\|\leq\min\{2c\tilde{\varepsilon},0.01\},

where ε~[104,103]\tilde{\varepsilon}\in[10^{-4},10^{-3}] is a user prescribed parameter and cc is a constant depending on ρ\rho and the current approximate generalized singular values.

3 The harmonic extraction based JDGSVD methods

We shall make use of the principle of the harmonic extraction [31, 33] to propose the CPF-harmonic and IF-harmonic extraction based JDGSVD methods in Section 3.1 and Section 3.2, respectively. They compute new approximate GSVD components of (A,B)(A,B) with respect to the given left and right searching subspaces 𝒰\mathcal{U}, 𝒱\mathcal{V} and 𝒳\mathcal{X}, and suit better for the computation of interior GSVD components.

3.1 The CPF-harmonic extraction approach

If BB has full column rank with some special, e.g., banded, structure, from which the inversion (BTB)1(B^{T}B)^{-1} can be efficiently applied, we can propose our CPF-harmonic extraction approach to compute a desired approximate GSVD component as follows. For the purpose of derivation, assume that

(3.1) BTB=LLTB^{T}B=LL^{T}

is the Cholesky factorization of BTBB^{T}B with Ln×nL\in\mathbb{R}^{n\times n} being nonsingular and lower triangular, and define the matrix

(3.2) Aˇ=ALT.\check{A}=AL^{-T}.

We present the following result, which establishes the relationship between the GSVD of (A,B)(A,B) and the SVD of Aˇ\check{A} and will be used to propose the CPF-harmonic extraction approach.

Theorem 3.1.

Let (α,β,u,v,x)(\alpha_{*},\beta_{*},u_{*},v_{*},x_{*}) be a GSVD component of the regular matrix pair (A,B)(A,B) and σ=αβ\sigma_{*}=\frac{\alpha_{*}}{\beta_{*}}. Assume that BB has full column rank and BTBB^{T}B has the Cholesky factorization (3.1), and let Aˇ\check{A} be defined by (3.2) and the vector

(3.3) z=1βLTx.z_{*}=\frac{1}{\beta_{*}}L^{T}x_{*}.

Then (σ,u,z)(\sigma_{*},u_{*},z_{*}) is a singular triplet of Aˇ\check{A}:

(3.4) Aˇz=σuandAˇTu=σz.\check{A}z_{*}=\sigma_{*}u_{*}\qquad\mbox{and}\qquad\check{A}^{T}u_{*}=\sigma_{*}z_{*}.
{proof}

It follows from the GSVD (1.2) of (A,B)(A,B) that Bx=βvBx_{*}=\beta_{*}v_{*} with v=1\|v_{*}\|=1, meaning that Bx=β\|Bx_{*}\|=\beta_{*}. Making use of (3.1), we have

z=1βLTx=1βBx=1.\|z_{*}\|=\frac{1}{\beta_{*}}\|L^{T}x_{*}\|=\frac{1}{\beta_{*}}\|Bx_{*}\|=1.

By the definitions (3.2) and (3.3) of Aˇ\check{A} and zz_{*}, from Ax=αuAx_{*}=\alpha_{*}u_{*} we obtain

Aˇz=1βALTLTx=1βAx=αβu=σu,\check{A}z_{*}=\frac{1}{\beta_{*}}AL^{-T}L^{T}x_{*}=\frac{1}{\beta_{*}}Ax_{*}=\frac{\alpha_{*}}{\beta_{*}}u_{*}=\sigma_{*}u_{*},

that is, the first relation in (3.4) holds. From the GSVD (1.2), it is straightforward that ATu=σBTv=σβBTBxA^{T}u_{*}=\sigma_{*}B^{T}v_{*}=\frac{\sigma_{*}}{\beta_{*}}B^{T}Bx_{*}. Making use of this relation and (3.1) gives

AˇTu=L1ATu=σβL1BTBx=σβLTx=σz,\check{A}^{T}u_{*}=L^{-1}A^{T}u_{*}=\frac{\sigma_{*}}{\beta_{*}}L^{-1}B^{T}Bx_{*}=\frac{\sigma_{*}}{\beta_{*}}L^{T}x_{*}=\sigma_{*}z_{*},

which proves the second relation in (3.4).

Theorem 3.1 motivates us to propose our first harmonic extraction approach to compute the singular triplet (σ,u,z)(\sigma_{*},u_{*},z_{*}) of Aˇ\check{A} and then recover the desired GSVD component (α,β,u,v,x)(\alpha_{*},\beta_{*},u_{*},v_{*},x_{*}) of (A,B)(A,B).

Specifically, take the kk-dimensional 𝒰\mathcal{U} and 𝒵=LT𝒳\mathcal{Z}=L^{T}\mathcal{X} as the left and right searching subspaces for the left and right singular vectors uu_{*} and zz_{*} of Aˇ\check{A}, respectively. Then the columns of Z~=LTX~\widetilde{Z}=L^{T}\widetilde{X} form a basis of 𝒵\mathcal{Z}. Mathematically, we seek for positive ϕ>0\phi>0 and vectors uˇ𝒰\check{u}\in\mathcal{U} and zˇ𝒵\check{z}\in\mathcal{Z} such that

(3.5) [0AˇTAˇ0][zˇuˇ]ϕ[zˇuˇ]([0AˇTAˇ0]τI)([Z~U~]).\begin{bmatrix}0&\check{A}^{T}\\ \check{A}&0\end{bmatrix}\begin{bmatrix}\check{z}\\ \check{u}\end{bmatrix}-\phi\begin{bmatrix}\check{z}\\ \check{u}\end{bmatrix}\ \perp\ \left(\begin{bmatrix}0&\check{A}^{T}\\ \check{A}&0\end{bmatrix}-\tau I\right)\mathcal{R}\left(\begin{bmatrix}\widetilde{Z}&\\ &\widetilde{U}\end{bmatrix}\right).

This is the harmonic extraction approach for the eigenvalue problem of the augmented matrix

[0AˇTAˇ0]\begin{bmatrix}0&\check{A}^{T}\\ \check{A}&0\end{bmatrix}

for the given target τ>0\tau>0 [31, 33], where ϕ\phi is a harmonic Ritz value and [zˇT,uˇT]T[\check{z}^{T},\check{u}^{T}]^{T} is the harmonic Ritz vector with respect to the searching subspace

([Z~U~]).\mathcal{R}\left(\begin{bmatrix}\widetilde{Z}&\\ &\widetilde{U}\end{bmatrix}\right).

We pick up the ϕ\phi closest to τ\tau as the approximation to σ\sigma_{*} and take the normalized zˇ/zˇ\check{z}/\|\check{z}\| and uˇ/uˇ\check{u}/\|\check{u}\| as approximations to zz_{*} and uu_{*}, respectively. We will show how to obtain an approximation to xx_{*} afterwards.

Write zˇ=Z~dˇ\check{z}=\widetilde{Z}\check{d} and uˇ=U~eˇ\check{u}=\widetilde{U}\check{e} with dˇk\check{d}\in\mathbb{R}^{k} and eˇk\check{e}\in\mathbb{R}^{k}. Then [zˇuˇ]=[Z~U~][dˇeˇ]\begin{bmatrix}\begin{smallmatrix}\check{z}\\ \check{u}\end{smallmatrix}\end{bmatrix}=\begin{bmatrix}\begin{smallmatrix}\widetilde{Z}&\\ &\widetilde{U}\end{smallmatrix}\end{bmatrix}\begin{bmatrix}\begin{smallmatrix}\check{d}\\ \check{e}\end{smallmatrix}\end{bmatrix}, and requirement (3.5) amounts to the equation

[Z~TU~T][τIAˇTAˇτI][ϕIAˇTAˇϕI][Z~U~][dˇeˇ]=0.\begin{bmatrix}\widetilde{Z}^{T}&\\ &\widetilde{U}^{T}\end{bmatrix}\begin{bmatrix}-\tau I&\check{A}^{T}\\ \check{A}&-\tau I\end{bmatrix}\begin{bmatrix}-\phi I&\check{A}^{T}\\ \check{A}&-\phi I\end{bmatrix}\begin{bmatrix}\widetilde{Z}&\\ &\widetilde{U}\end{bmatrix}\begin{bmatrix}\check{d}\\ \check{e}\end{bmatrix}=0.

Decompose ϕ=τ+(ϕτ)\phi=\tau+(\phi-\tau), and rearrange the above equation. Then we obtain the generalized eigenvalue problem of a 2k2k-by-2k2k matrix pair:

(3.6) [Z~TAˇTAˇZ~+τ2Z~TZ~2τZ~TAˇTU~2τU~TAˇZ~U~TAˇAˇTU~+τ2I][dˇeˇ]=(ϕτ)[τZ~TZ~Z~TAˇTU~U~TAˇZ~τI][dˇeˇ].\begin{bmatrix}\widetilde{Z}^{T}\check{A}^{T}\check{A}\widetilde{Z}+\tau^{2}\widetilde{Z}^{T}\widetilde{Z}&-2\tau\widetilde{Z}^{T}\check{A}^{T}\widetilde{U}\\ -2\tau\widetilde{U}^{T}\check{A}\widetilde{Z}&\widetilde{U}^{T}\check{A}\check{A}^{T}\widetilde{U}+\tau^{2}I\end{bmatrix}\!\begin{bmatrix}\check{d}\\ \check{e}\end{bmatrix}=(\phi-\tau)\begin{bmatrix}-\tau\widetilde{Z}^{T}\widetilde{Z}&\widetilde{Z}^{T}\check{A}^{T}\widetilde{U}\\ \widetilde{U}^{T}\check{A}\widetilde{Z}&-\tau I\end{bmatrix}\!\begin{bmatrix}\check{d}\\ \check{e}\end{bmatrix}.

By (3.2), Z~=LTX~\widetilde{Z}=L^{T}\widetilde{X} and the thin QR factorization of AX~A\widetilde{X} in (2.2), we have

AˇZ~=AX~=U~RA,\check{A}\widetilde{Z}=A\widetilde{X}=\widetilde{U}R_{A},

showing that

Z~TAˇTAˇZ~=RATRAandZ~TAˇTU~=RAT.\widetilde{Z}^{T}\check{A}^{T}\check{A}\widetilde{Z}=R_{A}^{T}R_{A}\qquad\mbox{and}\qquad\widetilde{Z}^{T}\check{A}^{T}\widetilde{U}=R_{A}^{T}.

Moreover, exploiting the Cholesky factorization (3.1) of BTBB^{T}B and the thin QR factorization of BX~B\widetilde{X} in (2.2), we obtain

Z~TZ~\displaystyle\widetilde{Z}^{T}\widetilde{Z} =\displaystyle= X~TLLTX~=X~TBTBX~=RBTRB,\displaystyle\widetilde{X}^{T}LL^{T}\widetilde{X}=\widetilde{X}^{T}B^{T}B\widetilde{X}=R_{B}^{T}R_{B},
U~TAˇAˇTU~\displaystyle\widetilde{U}^{T}\check{A}\check{A}^{T}\widetilde{U} =\displaystyle= U~TA(LLT)1ATU~=U~TA(BTB)1ATU~.\displaystyle\widetilde{U}^{T}A(LL^{T})^{-1}A^{T}\widetilde{U}=\widetilde{U}^{T}A(B^{T}B)^{-1}A^{T}\widetilde{U}.

Substituting these two relations into (3.6) yields

(3.7) [RATRA+τ2RBTRB2τRAT2τRAU~TA(BTB)1ATU~+τ2I][dˇeˇ]=(ϕτ)[τRBTRBRATRAτI][dˇeˇ].\begin{bmatrix}R_{A}^{T}R_{A}+\tau^{2}R_{B}^{T}R_{B}&-2\tau R_{A}^{T}\\ -2\tau R_{A}&\widetilde{U}^{T}A(B^{T}B)^{-1}A^{T}\widetilde{U}+\tau^{2}I\end{bmatrix}\begin{bmatrix}\check{d}\\ \check{e}\end{bmatrix}\\ =(\phi-\tau)\begin{bmatrix}-\tau R_{B}^{T}R_{B}&R_{A}^{T}\\ R_{A}&-\tau I\end{bmatrix}\begin{bmatrix}\check{d}\\ \check{e}\end{bmatrix}.

For the brevity of presentation, we will denote the symmetric matrices

HA,B=U~TA(BTB)1ATU~H_{A,B^{{\dagger}}}=\widetilde{U}^{T}A(B^{T}B)^{-1}A^{T}\widetilde{U}

and

(3.8) Gc=[τRBTRBRATRAτI],Hc=[RATRA+τ2RBTRB2τRAT2τRAHA,B+τ2I].G_{\mathrm{c}}=\begin{bmatrix}-\tau R_{B}^{T}R_{B}&R_{A}^{T}\\ R_{A}&-\tau I\!\end{bmatrix},\qquad H_{\mathrm{c}}=\begin{bmatrix}R_{A}^{T}R_{A}+\tau^{2}R_{B}^{T}R_{B}&-2\tau R_{A}^{T}\\ -2\tau R_{A}&H_{A,B^{{\dagger}}}+\tau^{2}I\end{bmatrix}.

In implementations, we compute the generalized eigendecomposition of the symmetric positive definite matrix pair (Gc,Hc)(G_{\mathrm{c}},H_{\mathrm{c}}) and pick up the largest eigenvalue μ\mu in magnitude and the corresponding unit-length eigenvector [dˇeˇ]\begin{bmatrix}\begin{smallmatrix}\check{d}\\ \check{e}\end{smallmatrix}\end{bmatrix}. Then the harmonic Ritz approximation to the desired singular triplet (σ,uˇ,zˇ)(\sigma_{*},\check{u}_{*},\check{z}_{*}) of Aˇ\check{A} is

(3.9) (ϕ,uˇ,zˇ)=(τ+1μ,U~eˇeˇ,Z~dˇZ~dˇ).(\phi,\check{u},\check{z})=\left(\tau+\frac{1}{\mu},\frac{\widetilde{U}\check{e}}{\|\check{e}\|},\frac{\widetilde{Z}\check{d}}{\|\widetilde{Z}\check{d}\|}\right).

Since zˇ=Z~dˇZ~dˇ=LTX~dˇLTX~dˇ\check{z}=\frac{\widetilde{Z}\check{d}}{\|\widetilde{Z}\check{d}\|}=\frac{L^{T}\widetilde{X}\check{d}}{\|L^{T}\widetilde{X}\check{d}}\| is an approximation to the right singular vector zz_{*} of Aˇ\check{A}, from (3.3) the vector LTzˇ=X~dˇL^{-T}\check{z}=\widetilde{X}\check{d} after some proper normalization is an approximation to the right generalized singular vector xx_{*} of (A,B)(A,B), which we write as

(3.10) xˇ=1δˇX~dˇ,\check{x}=\frac{1}{\check{\delta}}\widetilde{X}\check{d},

where δˇ\check{\delta} is a normalizing factor. It is natural to require that the approximate right singular vector xˇ\check{x} be (ATA+BTB)(A^{T}\!A+B^{T}\!B)-norm normalized, i.e., xˇT(ATA+BTB)xˇ=1\check{x}^{T}(A^{T}\!A+B^{T}\!B)\check{x}=1, since the exact xx_{*} satisfies xT(ATA+BTB)x=1x_{*}^{T}(A^{T}A+B^{T}B)x_{*}=1 by (1.2). With this normalization, from (3.10), we have

1=1δˇ2dˇTX~T(ATA+BTB)X~dˇ=1δˇ2dˇT(RATRA+RBTRB)dˇ,1=\frac{1}{\check{\delta}^{2}}\check{d}^{T}\widetilde{X}^{T}(A^{T}A+B^{T}B)\widetilde{X}\check{d}=\frac{1}{\check{\delta}^{2}}\check{d}^{T}(R_{A}^{T}R_{A}+R_{B}^{T}R_{B})\check{d},

from which it follows that

(3.11) δˇ=RAdˇ2+RBdˇ2.\check{\delta}=\sqrt{\|R_{A}\check{d}\|^{2}+\|R_{B}\check{d}\|^{2}}.

Note that the approximate left generalized singular vector uˇ\check{u} defined by (3.9) is no longer collinear with AxˇA\check{x}, as opposed to the collinear u~\tilde{u} and Ax~A\tilde{x} obtained by the standard extraction approach in Section 2. To this end, instead of uˇ\check{u} in (3.9), we take new uˇ\check{u} and vˇ\check{v} defined by

(3.12) uˇ=AxˇAxˇandvˇ=BxˇBxˇ\check{u}=\frac{A\check{x}}{\|A\check{x}\|}\qquad\mbox{and}\qquad\check{v}=\frac{B\check{x}}{\|B\check{x}\|}

as the harmonic Ritz approximations to uu_{*} and vv_{*}, which are colinear with AxˇA\check{x} and BxˇB\check{x}, respectively. Correspondingly, define eˇ=RAdˇ\check{e}=R_{A}\check{d} and fˇ=RBdˇ\check{f}=R_{B}\check{d}. Then by (3.11), the parameter δˇ\check{\delta} in (3.10) becomes δˇ=eˇ2+fˇ2\check{\delta}=\sqrt{\|\check{e}\|^{2}+\|\check{f}\|^{2}}. Moreover, by definition (3.10) of xˇ\check{x} and the thin QR factorizations of AX~A\widetilde{X} and BX~B\widetilde{X} in (2.2), we obtain

Axˇ\displaystyle A\check{x} =\displaystyle= 1δˇAX~dˇ=1δˇU~RAdˇ=1δˇU~eˇ,\displaystyle\frac{1}{\check{\delta}}A\widetilde{X}\check{d}=\frac{1}{\check{\delta}}\widetilde{U}R_{A}\check{d}=\frac{1}{\check{\delta}}\widetilde{U}\check{e},
Bxˇ\displaystyle B\check{x} =\displaystyle= 1δˇBX~dˇ=1δˇV~RBdˇ=1δˇV~fˇ.\displaystyle\frac{1}{\check{\delta}}B\widetilde{X}\check{d}=\frac{1}{\check{\delta}}\widetilde{V}R_{B}\check{d}=\frac{1}{\check{\delta}}\widetilde{V}\check{f}.

Using them, we can efficiently compute the approximate generalized singular vectors

(3.13) uˇ=AxˇAxˇ=U~eˇeˇandvˇ=BxˇBxˇ=V~fˇfˇ\check{u}=\frac{A\check{x}}{\|A\check{x}\|}=\frac{\widetilde{U}\check{e}}{\|\check{e}\|}\qquad\mbox{and}\qquad\check{v}=\frac{B\check{x}}{\|B\check{x}\|}=\frac{\widetilde{V}\check{f}}{\|\check{f}\|}

without forming products of the vector xˇ\check{x} with the large AA and BB.

As for the approximate generalized singular value ϕ\phi in (3.9), we replace it by the Rayleigh quotient θˇ=αˇβˇ\check{\theta}=\frac{\check{\alpha}}{\check{\beta}} of (A,B)(A,B) with respect to the approximate left and right generalized singular vectors uˇ\check{u} and vˇ\check{v}, xˇ\check{x}, where

(3.14) αˇ=uˇTAxˇ=eˇδˇandβˇ=vˇTBxˇ=fˇδˇ.\check{\alpha}=\check{u}^{T}A\check{x}=\frac{\|\check{e}\|}{\check{\delta}}\qquad\mbox{and}\qquad\check{\beta}=\check{v}^{T}B\check{x}=\frac{\|\check{f}\|}{\check{\delta}}.

The reason is that θˇ\check{\theta} is a better approximation to σ\sigma_{*} than the harmonic Ritz value ϕ\phi in the sense that

(3.15) (ATAθˇ2BTB)xˇ(BTB)1(ATAϕ2BTB)xˇ(BTB)1.\|(A^{T}A-\check{\theta}^{2}B^{T}B)\check{x}\|_{(B^{T}B)^{-1}}\leq\|(A^{T}A-\phi^{2}B^{T}B)\check{x}\|_{(B^{T}B)^{-1}}.

We remark that the residual of (αˇ,βˇ,uˇ,vˇ,xˇ)(\check{\alpha},\check{\beta},\check{u},\check{v},\check{x}) can be defined similarly to (2.5), and a stopping criterion similar to (2.6) can be used.

The CPF-harmonic extraction approach does not need to form the cross product matrices ATAA^{T}A or BTBB^{T}B explicitly. To distinguish from the approximation obtained by the IF-harmonic extraction approach to be proposed in the next subsection, we call (αˇ,βˇ,uˇ,vˇ,xˇ)(\check{\alpha},\check{\beta},\check{u},\check{v},\check{x}) the CPF-harmonic Ritz approximation to (α,β,u,v,x)(\alpha_{*},\beta_{*},u_{*},v_{*},x_{*}) with respect to the left and right searching subspaces 𝒰\mathcal{U}, 𝒱\mathcal{V} and 𝒳\mathcal{X}, where (αˇ,βˇ)(\check{\alpha},\check{\beta}) or θˇ\check{\theta} is the CPF-harmonic Ritz value, and uˇ,vˇ\check{u},\check{v} and xˇ\check{x} are the left and right CPF-harmonic Ritz vectors, respectively. Particularly, if we expand 𝒰,𝒱\mathcal{U},\mathcal{V} and 𝒳\mathcal{X} in a similar manner to that described in Section 2, the resulting method is called the CPF-harmonic JDGSVD method, abbreviated as the CPF-HJDGSVD method.

From (3.7), we can efficiently update the projected matrix pair (Gc,Hc)(G_{\mathrm{c}},H_{\mathrm{c}}) as the subspaces are expanded. At each expansion step, one needs to solve the large symmetric positive definite linear equations with the coefficient matrix BTBB^{T}B and the multiple right-hand sides ATU~A^{T}\widetilde{U}. This can be done efficiently in parallel whenever the Cholesky factorization (3.1) of BTBB^{T}B can be computed efficiently, which is the case for some structured BB, e.g., banded structure.

However, for a general large and sparse BB, the calculation of the Cholesky factorization (3.1) of BTBB^{T}B may be costly and even computationally infeasible. In this case, we can compute (BTB)1ATU~(B^{T}B)^{-1}A^{T}\widetilde{U} using the Conjugate Gradient (CG) method for each column of ATU~A^{T}\widetilde{U}. For BB well conditioned, the CG method converges fast.

Finally, we remark that, when AA is of full column rank, the CPF-harmonic extraction approach proposed above can be directly applied to the matrix pair (B,A)(B,A), whose GSVD components are (βi,αi,vi,ui,xi)(\beta_{i},\alpha_{i},v_{i},u_{i},x_{i}), i=1,,qi=1,\dots,q.

3.2 The IF-harmonic extraction approach

As is clear from the previous subsection, CPF-HJDGSVD requires that the symmetric BTBB^{T}B be positive definite, namely, BB is square or rectangular and has full column rank. If the direct application of (BTB)1(B^{T}B)^{-1} is unaffordable or the CG method converges slowly, then the CPF-harmonic extraction approach is costly. Alternatively, we will propose an inverse-free (IF) harmonic extraction approach that avoids this difficulty and removes the above restriction on BB.

Given the right searching subspace 𝒳\mathcal{X}, the IF-harmonic extraction approach seeks for an approximate generalized singular value φ>0\varphi>0 and an approximate right generalized singular vector x^𝒳\hat{x}\in\mathcal{X} with x^ATA+BTB=1\|\hat{x}\|_{A^{T}A+B^{T}B}=1 such that

(3.16) (ATAφ2BTB)x^(ATAτ2BTB)𝒳,(A^{T}A-\varphi^{2}B^{T}B)\hat{x}\ \perp\ (A^{T}A-\tau^{2}B^{T}B)\mathcal{X},

namely, the residual of (φ2,x^)(\varphi^{2},\hat{x}) as an approximate generalized eigenpair of the matrix pair (ATA,BTB)(A^{T}A,B^{T}B) is orthogonal to the subspace (ATAτ2BTB)𝒳(A^{T}A-\tau^{2}B^{T}B)\mathcal{X}. This is precisely the harmonic Rayleigh–Ritz projection of (ATA,BTB)(A^{T}A,B^{T}B) onto 𝒳\mathcal{X} with respect to the target τ2\tau^{2}, and the kk pairs (φ2,x^)(\varphi^{2},\hat{x}) are the harmonic Ritz approximations of (ATA,BTB)(A^{T}A,B^{T}B) with respect to 𝒳\mathcal{X} for the given τ2\tau^{2}. One selects the positive φ\varphi closest to τ\tau and the corresponding x^\hat{x} as approximations to the desired generalized singular value σ\sigma closest to τ\tau and the corresponding right generalized singular vector xx.

Since the columns of (ATAτ2BTB)X~(A^{T}A-\tau^{2}B^{T}B)\widetilde{X} span the subspace (ATAτ2BTB)𝒳(A^{T}A-\tau^{2}B^{T}B)\mathcal{X}, requirement (3.16) is equivalent to

X~T(ATAτ2BTB)(ATAφ2BTB)X~d^=0withx^=1δ^X~d^,\displaystyle\widetilde{X}^{T}(A^{T}A-\tau^{2}B^{T}B)(A^{T}A-\varphi^{2}B^{T}B)\widetilde{X}\hat{d}=0\qquad\mbox{with}\qquad\hat{x}=\frac{1}{\hat{\delta}}\widetilde{X}\hat{d},

where δ^\hat{\delta} is a normalizing factor such that x^ATA+BTB=1\|\hat{x}\|_{A^{T}A+B^{T}B}=1.

Writing φ2=τ2+(φ2τ2)\varphi^{2}=\tau^{2}+(\varphi^{2}-\tau^{2}) and rearranging the above equation, we obtain

(3.17) X~T(ATAτ2BTB)2X~d^=(φ2τ2)X~T(ATAτ2BTB)BTBX~d^,\widetilde{X}^{T}(A^{T}A-\tau^{2}B^{T}B)^{2}\widetilde{X}\hat{d}=(\varphi^{2}-\tau^{2})\widetilde{X}^{T}(A^{T}A-\tau^{2}B^{T}B)B^{T}B\widetilde{X}\hat{d},

that is, μ=φ2τ2\mu=\varphi^{2}-\tau^{2} is a generalized eigenvalue of the matrix pair (Hτ,Gτ)(H_{\tau},G_{\tau}) and d^\hat{d} is the corresponding normalized generalized eigenvector, where

(3.18) Gτ=X~T(ATAτ2BTB)BTBX~andHτ=X~T(ATAτ2BTB)2X~.G_{\tau}=\widetilde{X}^{T}(A^{T}A-\tau^{2}B^{T}B)B^{T}B\widetilde{X}\qquad\mbox{and}\qquad H_{\tau}=\widetilde{X}^{T}(A^{T}A-\tau^{2}B^{T}B)^{2}\widetilde{X}.

We compute the generalized eigendecomposition of (Gτ,Hτ)(G_{\tau},H_{\tau}), pick up its largest generalized eigenvalue ν=1μ\nu=\frac{1}{\mu} in magnitude, and take φ=τ2+1ν\varphi=\sqrt{\tau^{2}+\frac{1}{\nu}} as an approximation to σ\sigma_{*}. Correspondingly, the harmonic Ritz pair to approximate (σ,x)(\sigma_{*},x_{*}) is

(3.19) (φ,x^)=(τ2+1ν,1δ^X~d^),(\varphi,\hat{x})=\left(\sqrt{\tau^{2}+\frac{1}{\nu}},\frac{1}{\hat{\delta}}\widetilde{X}\hat{d}\right),

where d^\hat{d} is the generalized eigenvector of (Gτ,Hτ)(G_{\tau},H_{\tau}) corresponding to the eigenvalue ν\nu.

As for the normalizing factor δ^\hat{\delta}, by the requirement that x^ATA+BTB\|\hat{x}\|_{A^{T}A+B^{T}B} =1=1, following the same derivations as in Section 3.1, we have

(3.20) δ^=e^2+f^2withe^=RAd^andf^=RBd^,\hat{\delta}=\sqrt{\|\hat{e}\|^{2}+\|\hat{f}\|^{2}}\quad\mbox{with}\quad\hat{e}=R_{A}\hat{d}\quad\mbox{and}\quad\hat{f}=R_{B}\hat{d},

where RAR_{A} and RBR_{B} are defined by (2.2). Analogously to that done in Section 3.1, rather than using the harmonic Ritz value φ\varphi to approximate σ\sigma_{*}, we recompute a new and better approximate generalized singular value and the corresponding left generalized singular vectors by

(3.21) α^=Ax^,β^=Bx^andu^=Ax^Ax^,v^=Bx^Bx^.\hat{\alpha}=\|A\hat{x}\|,\qquad\hat{\beta}=\|B\hat{x}\|\qquad\mbox{and}\qquad\hat{u}=\frac{A\hat{x}}{\|A\hat{x}\|},\qquad\hat{v}=\frac{B\hat{x}}{\|B\hat{x}\|}.

Since the new approximate generalized singular value θ^=α^β^\hat{\theta}=\frac{\hat{\alpha}}{\hat{\beta}} is the square root of the Rayleigh quotient of the matrix pair (ATA,BTB)(A^{T}A,B^{T}B) with respect to x^\hat{x}, as an approximation to σ\sigma_{*}, it is more accurate than φ\varphi in (3.19) in the sense of (3.15) when the CPF-harmonic approximations xˇ\check{x}, θˇ\check{\theta} and ϕ\phi are replaced by the IF-harmonic ones x^\hat{x}, θ^\hat{\theta} and φ\varphi, respectively.

It is straightforward to verify that (α^,β^,u^,v^,x^)(\hat{\alpha},\hat{\beta},\hat{u},\hat{v},\hat{x}) in (3.21) satisfies Ax^=α^uA\hat{x}=\hat{\alpha}u and Bx^=β^v^B\hat{x}=\hat{\beta}\hat{v} with u^=v^=1\|\hat{u}\|=\|\hat{v}\|=1 and α^2+β^2=1\hat{\alpha}^{2}+\hat{\beta}^{2}=1. By (2.2), (3.20) and (3.21), it is easily shown that

(3.22) α^=e^δ^,β^=f^δ^andu^=U~e^e^,v^=V~f^f^.\hat{\alpha}=\frac{\|\hat{e}\|}{\hat{\delta}},\qquad\hat{\beta}=\frac{\|\hat{f}\|}{\hat{\delta}}\qquad\mbox{and}\qquad\hat{u}=\frac{\widetilde{U}\hat{e}}{\|\hat{e}\|},\qquad\hat{v}=\frac{\widetilde{V}\hat{f}}{\|\hat{f}\|}.

Therefore, compared with (3.21), we can exploit formula (3.22) to compute α^,β^\hat{\alpha},\hat{\beta} and u^,v^\hat{u},\hat{v} more efficiently without using AA and BB to form matrix-vector products. We call (α^,β^,u^,v^,x^)(\hat{\alpha},\hat{\beta},\hat{u},\hat{v},\hat{x}) the IF-harmonic Ritz approximation to (α,β,u,v,x)(\alpha_{*},\beta_{*},u_{*},v_{*},x_{*}) with respect to the left and right searching subspaces 𝒰\mathcal{U}, 𝒱\mathcal{V} and 𝒳\mathcal{X}, where the pair (α^,β^)(\hat{\alpha},\hat{\beta}) or θ^=α^β^\hat{\theta}=\frac{\hat{\alpha}}{\hat{\beta}} is the IF-harmonic Ritz value, and u^,v^\hat{u},\hat{v} and x^\hat{x} are the left and right IF-harmonic Ritz vectors, respectively. Particularly, when expanding 𝒰,𝒱\mathcal{U},\mathcal{V} and 𝒳\mathcal{X} in a similar manner to that described in Section 2, the resulting method is called the IF-harmonic JDGSVD method, abbreviated as the IF-HJDGSVD method.

Based on the way that (α^,β^,u^,v^,x^)(\hat{\alpha},\hat{\beta},\hat{u},\hat{v},\hat{x}) is computed, the associated residual and stopping criterion are defined as (2.5) and designed as (2.6), respectively.

In computations, as 𝒰,𝒱\mathcal{U},\mathcal{V} and 𝒳\mathcal{X} are expanded, we first update the intermediate matrices

(3.23) HA=X~T(ATA)2X~,HB=X~T(BTB)2X~,HA,B=X~TATABTBX~H_{A}=\widetilde{X}^{T}(A^{T}A)^{2}\widetilde{X},\quad H_{B}=\widetilde{X}^{T}(B^{T}B)^{2}\widetilde{X},\quad H_{A,B}=\widetilde{X}^{T}A^{T}AB^{T}B\widetilde{X}

efficiently and then form the matrices

(3.24) Gτ=HA,Bτ2HBandHτ=HA+τ4HBτ2(HA,BT+HA,B).G_{\tau}=H_{A,B}-\tau^{2}H_{B}\qquad\mbox{and}\qquad H_{\tau}=H_{A}+\tau^{4}H_{B}-\tau^{2}(H_{A,B}^{T}+H_{A,B}).

Compared with the CPF-harmonic extraction, the IF-harmonic extraction does not involve (BTB)1(B^{T}B)^{-1}. Note that it uses BTBB^{T}B and ATAA^{T}A explicitly when forming the matrices GτG_{\tau} and HτH_{\tau} in (3.18). Fortunately, provided that the desired σ\sigma_{*} is not very small, then σ2\sigma_{*}^{2} is a well conditioned eigenvalue of (ATA,BTB)(A^{T}A,B^{T}B) and θ^\hat{\theta} is an approximation to σ\sigma_{*} with the accuracy (ATAθ^2BTB)x^\|(A^{T}A-\hat{\theta}^{2}B^{T}B)\hat{x}\| [32, Sect. 3, Chap. XI].

4 Thick-restart JDGSVD type algorithms with deflation and purgation

As the subspace dimension kk increases, the computational complexity of the proposed JDGSVD type algorithms will become prohibitive. For a maximum number k=kmaxk=k_{\max} allowed, if the algorithms do not yet converge, then it is necessary to restart them. In this section, we show how to effectively and efficiently restart CPF-HJDGSVD and IF-HJDGSVD proposed in Section 3, and how to introduce some efficient novel deflation and purgation techniques into them to compute more than one, i.e., >1\ell>1, GSVD components of (A,B)(A,B).

4.1 Thick-restart

We adopt a commonly used thick-restart technique, which was initially advocated in [30] and has been popularized in a number of papers, e.g., [14, 15, 30, 35, 36]. Adapting it to our case, we take three new initial searching subspaces to be certain kmink_{\min}-dimensional subspaces of the left and right searching subspaces at the current cycle, which aim to contain as much information as possible on the desired left and right generalized singular vectors and their few neighbors. Then we continue to expand the subspaces in the regular way described in Sections 23, and compute new approximate GSVD components with respect to the expanded subspaces. We check the convergence at each step, and if converged, stop; otherwise expand the subspaces until the subspace dimension reaches kmaxk_{\max}. Proceed in this way until the desired GSVD component is found. In what follows we describe how to efficiently implement thick-restart in our GSVD context, which turns out to be involved and is not as direct as in the context of the standard eigenvalue problem and SVD problem.

At the current extraction phase, either CPF-HJDGSVD or IF-HJDGSVD has computed kmink_{\min} approximate right generalized singular vectors, denoted by x~i=X~di\tilde{x}_{i}\!=\widetilde{X}d_{i} in a unified form, corresponding to the kmink_{\min} approximate generalized singular values closest to τ\tau, where x~1\tilde{x}_{1} is used to approximate the desired xx_{*}. Write X~1=[x~1,,x~kmin]\widetilde{X}_{1}=[\tilde{x}_{1},\dots,\tilde{x}_{k_{\min}}] and D1=[d1,,dkmin]D_{1}=[d_{1},\dots,d_{k_{\min}}], and take the new initial right searching subspace

𝒳new=span{X~1}=span{X~D1}.\mathcal{X}_{\rm new}={\rm span}\{\widetilde{X}_{1}\}={\rm span}\{\widetilde{X}D_{1}\}.

Compute the thin QR factorization of D1D_{1} to obtain its Q-factor Qdkmax×kminQ_{d}\in\mathbb{R}^{k_{\max}\times k_{\min}}. Then the columns of

(4.1) X~new=X~Qd\widetilde{X}_{\mathrm{new}}=\widetilde{X}Q_{d}

form an orthonormal basis of 𝒳new\mathcal{X}_{\mathrm{new}}. Correspondingly, we take the new initial left subspaces 𝒰new=A𝒳new\mathcal{U}_{\mathrm{new}}=A\mathcal{X}_{\mathrm{new}} and 𝒱new=B𝒳new\mathcal{V}_{\mathrm{new}}=B\mathcal{X}_{\mathrm{new}}. Notice that

AX~new=AX~Qd=U~RAQdandBX~new=BX~Qd=V~RBQd.A\widetilde{X}_{\mathrm{new}}=A\widetilde{X}Q_{d}=\widetilde{U}R_{A}Q_{d}\qquad\mbox{and}\qquad B\widetilde{X}_{\mathrm{new}}=B\widetilde{X}Q_{d}=\widetilde{V}R_{B}Q_{d}.

We compute the thin QR factorizations of the small matrices RAQdR_{A}Q_{d} and RBQdR_{B}Q_{d}:

RAQd=QeRA,newandRBQd=QfRB,new,R_{A}Q_{d}=Q_{e}R_{A,\mathrm{new}}\qquad\mbox{and}\qquad R_{B}Q_{d}=Q_{f}R_{B,\mathrm{new}},

where Qe,Qfkmax×kminQ_{e},Q_{f}\in\mathbb{R}^{k_{\max}\times k_{\min}} are orthonormal, and RA,newR_{A,\mathrm{new}} and RB,newkmin×kminR_{B,\mathrm{new}}\in\mathbb{R}^{k_{\min}\times k_{\min}} are upper triangular. Then the columns of

U~new=U~QeandV~new=V~Qf\widetilde{U}_{\mathrm{new}}=\widetilde{U}Q_{e}\qquad\mbox{and}\qquad\widetilde{V}_{\mathrm{new}}=\widetilde{V}Q_{f}

form orthonormal bases of 𝒰new\mathcal{U}_{\mathrm{new}} and 𝒱new\mathcal{V}_{\mathrm{new}}, and RA,newR_{A,\mathrm{new}} and RB,newR_{B,\mathrm{new}} are the R-factors of AX~new=U~newRA,newA\widetilde{X}_{\mathrm{new}}=\widetilde{U}_{\mathrm{new}}R_{A,\mathrm{new}} and BX~new=V~newRB,newB\widetilde{X}_{\mathrm{new}}=\widetilde{V}_{\mathrm{new}}R_{B,\mathrm{new}}, respectively.

For the CPF-harmonic extraction, we need to update the projection matrices GcG_{\mathrm{c}} and HcH_{\mathrm{c}} defined by (3.8). Concretely, we compute Gc,newG_{\mathrm{c},\mathrm{new}} and the (1,1)(1,1)-, (1,2)(1,2)- and (2,1)(2,1)-block submatrices of Hc,newH_{\mathrm{c},\mathrm{new}} by using RA,newR_{A,\mathrm{new}} and RB,newR_{B,\mathrm{new}}. The (2,2)(2,2)-block submatrix Hc2,new=HA,B,new+τ2IH_{\mathrm{c2},\mathrm{new}}=H_{A,B^{{\dagger}},\mathrm{new}}+\tau^{2}I of Hc,newH_{\mathrm{c},\mathrm{new}} is updated efficiently without involving (BTB)1(B^{T}B)^{-1}:

(4.2) HA,B,new=U~newTA(BTB)1ATU~new=QeTHA,BQeH_{A,B^{{\dagger}},\mathrm{new}}=\widetilde{U}_{\mathrm{new}}^{T}A(B^{T}B)^{-1}A^{T}\widetilde{U}_{\mathrm{new}}=Q_{e}^{T}{H_{A,B^{{\dagger}}}}Q_{e}

where HA,B=U~TA(BTB)1ATU~H_{A,B^{{\dagger}}}=\widetilde{U}^{T}A(B^{T}B)^{-1}A^{T}\widetilde{U} is part of the (2,2)(2,2)-block submatrix of HcH_{\mathrm{c}}. For the IF-harmonic extraction, we efficiently update the intermediate matrices HAH_{A}, HBH_{B} and HA,BH_{A,B} in (3.23) by

HA,new=QdTHAQd,HB,new=QdTHBQd,HA,B,new=QdTHA,BQd.H_{A,\mathrm{new}}=Q_{d}^{T}H_{A}Q_{d},\qquad H_{B,\mathrm{new}}=Q_{d}^{T}H_{B}Q_{d},\qquad H_{A,B,\mathrm{new}}=Q_{d}^{T}H_{A,B}Q_{d}.\qquad

4.2 Deflation and purgation

If the GSVD components (αi,βi,ui,vi,xi)(\alpha_{i},\beta_{i},u_{i},v_{i},x_{i}), i=1,,i\!=\!1,\dots,\ell of (A,B)(A,B) are required with σi=αiβi\sigma_{i}=\frac{\alpha_{i}}{\beta_{i}} labeled as in (1.3), we can adapt the efficient deflation and purgation techniques in [15] to our JDGSVD algorithms.

Assume that the jj approximate GSVD components (αi,c,βi,c,ui,c,vi,c,xi,c)(\alpha_{i,c},\beta_{i,c},u_{i,c},v_{i,c},x_{i,c}) have converged to the desired GSVD components (αi,βi,ui,vi,xi)(\alpha_{i},\beta_{i},u_{i},v_{i},x_{i}) with

(4.3) ri=βi,cATui,cαi,cBTvi,c(βi,cA1+αi,cB1)tol,i=1,,j.\|r_{i}\|=\|\beta_{i,c}A^{T}u_{i,c}-\alpha_{i,c}B^{T}v_{i,c}\|\leq(\beta_{i,c}\|A\|_{1}+\alpha_{i,c}\|B\|_{1})\cdot tol,\qquad i=1,\dots,j.

Write Cc=diag{α1,c,,αj,c}C_{c}=\mathop{\operator@font diag}\nolimits\{\alpha_{1,c},\dots,\alpha_{j,c}\}, Sc=diag{β1,c,,βj,c}S_{c}=\mathop{\operator@font diag}\nolimits\{\beta_{1,c},\dots,\beta_{j,c}\} and Uc=[u1,c,,uj,c]U_{c}=[u_{1,c},\dots,u_{j,c}], Vc=[v1,c,,vj,c]V_{c}=[v_{1,c},\dots,v_{j,c}], Xc=[x1,c,,xj,c]X_{c}=[x_{1,c},\dots,x_{j,c}]. Then (Cc,Sc,Uc,Vc,Xc)(C_{c},S_{c},U_{c},V_{c},X_{c}) is a converged approximate partial GSVD of (A,B)(A,B) that satisfies

AXc=UcCc,BXc=VcSc,Cc2+Sc2=IjAX_{c}=U_{c}C_{c},\qquad BX_{c}=V_{c}S_{c},\qquad C_{c}^{2}+S_{c}^{2}=I_{j}

and

RcF=ATUcScBTVcCcFj(A12+B12)tol.\|R_{c}\|_{F}=\|A^{T}U_{c}S_{c}-B^{T}V_{c}C_{c}\|_{F}\leq\sqrt{j(\|A\|_{1}^{2}+\|B\|_{1}^{2})}\cdot tol.

Proposition 4.1 of [15] proves that if tol=0tol=0 in (4.3) then the exact nontrivial GSVD components of the modified matrix pair

(4.4) (A(IXcYcT),B(IXcYcT))withYc=(ATA+BTB)Xc(A(I-X_{c}Y_{c}^{T}),B(I-X_{c}Y_{c}^{T}))\qquad\mbox{with}\qquad Y_{c}=(A^{T}A+B^{T}B)X_{c}

are (αi,βi,ui,vi,xi),i=j+1,,q(\alpha_{i},\beta_{i},u_{i},v_{i},x_{i}),\ i=j+1,\ldots,q, where YcY_{c} satisfies XcTYc=IjX_{c}^{T}Y_{c}=I_{j}. Therefore, we can apply either CPF-HJDGSVD or IF-HJDGSVD to the pair (4.4), and compute the next desired GSVD component (α,β,u,v,x):=(αj+1,βj+1,uj+1,vj+1,xj+1)(\alpha_{*},\beta_{*},u_{*},v_{*},x_{*}):=(\alpha_{j+1},\beta_{j+1},u_{j+1},v_{j+1},x_{j+1}).

To this end, we require that the converged XcX_{c} and YcY_{c} be bi-orthogonal, i.e., XcTYc=IX_{c}^{T}Y_{c}=I. Moreover, as the right searching subspace 𝒳\mathcal{X} is expanded, we require that 𝒳\mathcal{X} be always (ATA+BTB)(A^{T}A+B^{T}B)-orthogonal to the converged approximate right generalized singular vectors x1,c,,xj,cx_{1,c},\dots,x_{j,c}, i.e., X~TYc=𝟎\widetilde{X}^{T}Y_{c}=\bm{0}. Such an orthogonality can be guaranteed in computations, as shown below.

Assume that XcTYc=IjX_{c}^{T}Y_{c}=I_{j} and X~TYc\widetilde{X}^{T}\perp Y_{c}. At the extraction phase, we use the CPF-harmonic or IF-harmonic extraction to obtain an approximate GSVD component (α,β,u,v,x)(\alpha,\beta,u,v,x) of (A,B)(A,B). If (α,β,u,v,x)(\alpha,\beta,u,v,x) has not yet converged, we construct Xp=[Xc,x]X_{p}=[X_{c},x] and Yp=[Yc,y]Y_{p}=[Y_{c},y] with y=(ATA+BTB)x=αATu+βBTvy=(A^{T}A+B^{T}B)x=\alpha A^{T}u+\beta B^{T}v. Then it follows from XcTYc=IjX_{c}^{T}Y_{c}=I_{j} and xYcx\perp Y_{c} that XcTy=YcTx=𝟎X_{c}^{T}y=Y_{c}^{T}x=\bm{0}, xTy=1x^{T}y=1 and XpTYp=Ij+1X_{p}^{T}Y_{p}=I_{j+1}. Therefore, IYpXpTI-Y_{p}X_{p}^{T} is an oblique projector. At the subspace expansion phase, instead of (2.8), we use an iterative solver, e.g., the MINRES method [29], to approximately solve the modified symmetric correction equation

(4.5) (IYpXpT)(ATAρ2BTB)(IXpYpT)t=(IYpXpT)rfortYp(I-Y_{p}X_{p}^{T})(A^{T}A-\rho^{2}B^{T}B)(I-X_{p}Y_{p}^{T})t=-(I-Y_{p}X_{p}^{T})r\qquad\mbox{for}\qquad t\perp Y_{p}

with rr being the residual (2.5) of (α,β,u,v,x)(\alpha,\beta,u,v,x) and ρ=τ\rho=\tau or αβ\frac{\alpha}{\beta}. Having found an approximate solution t~Yp\tilde{t}\perp Y_{p}, we orthonormalize it against X~\widetilde{X} to obtain the expansion vector x+x_{+} and update X~\widetilde{X} by (2.10). By assumption and (4.5), both X~\widetilde{X} and t~\tilde{t} are orthogonal to YcY_{c}, which makes the expansion vector x+x_{+} and the expanded right searching subspace 𝒳\mathcal{X} orthogonal to YcY_{c}.

If (α,β,u,v,x)(\alpha,\beta,u,v,x) has already converged, we add it to the converged partial GSVD (Cc,Sc,Uc,Vc,Xc)(C_{c},S_{c},U_{c},V_{c},X_{c}) and set j:=j+1j:=j+1. By assumption, the old XcX_{c} and YcY_{c} are bi-orthogonal. Since the added xx is orthogonal to the old YcY_{c}, it is known that the new XcX_{c} and YcY_{c} are also bi-orthogonal. Proceed in this way until all the \ell desired GSVD components of (A,B)(A,B) are found.

Remarkably, when (α,β,u,v,x)(\alpha,\beta,u,v,x) has converged, the current searching subspaces usually contain reasonably good information on the next desired GSVD component. In order to make full use of such available information when computing the next (α,β,u,v,x)(\alpha_{*},\beta_{*},u_{*},v_{*},x_{*}), the authors in [14, 15] have proposed an effective and efficient purgation strategy. It can be adapted to our current context straightforwardly: We purge the newly converged x=X~dx=\widetilde{X}d from the current 𝒳\mathcal{X} and take the reduced subspace 𝒳new\mathcal{X}_{\mathrm{new}} as the initial right searching subspace for computing the next desired GSVD component of (A,B)(A,B). To achieve this, we compute the QR factorization of the k×1k\times 1 matrix d=(RATRA+RBTRB)dd^{\prime}=(R_{A}^{T}R_{A}+R_{B}^{T}R_{B})d to obtain its Q-factor [dd,QD]\left[\frac{d^{\prime}}{\|d^{\prime}\|},Q_{D}\right] such that the columns of QDk×(k1)Q_{D}\in\mathbb{R}^{k\times(k-1)} form an orthonormal basis of the orthogonal completement subspace of span{d}{\rm span}\{d^{\prime}\}. Then the columns of

X~new=X~QD\widetilde{X}_{\mathrm{new}}=\widetilde{X}Q_{D}

form an orthonormal basis of 𝒳new\mathcal{X}_{\mathrm{new}}, and X~new\widetilde{X}_{\mathrm{new}} is orthogonal to Yc,new=[Yc,y]Y_{c,\mathrm{new}}=[Y_{c},y] with y=(ATA+BTB)xy=(A^{T}A+B^{T}B)x because X~newTYc=𝟎\widetilde{X}_{\mathrm{new}}^{T}Y_{c}=\bm{0} and

X~newTy=QDTX~T(ATA+BTB)X~d=QDT(RATRA+RBTRB)d=QDTd=𝟎.\widetilde{X}_{\mathrm{new}}^{T}y=Q_{D}^{T}\widetilde{X}^{T}(A^{T}A+B^{T}B)\widetilde{X}d=Q_{D}^{T}(R_{A}^{T}R_{A}+R_{B}^{T}R_{B})d=Q_{D}^{T}d^{\prime}=\bm{0}.

Therefore, provided that QdQ_{d} in (4.1) is replaced by QDQ_{D}, just as done in Section 4.1, we can efficiently construct orthonormal base of the new initial searching left and right subspaces 𝒰new\mathcal{U}_{\rm new}, 𝒱new\mathcal{V}_{\rm new} and 𝒳new\mathcal{X}_{\rm new}. Therefore, the purgation can be done with very little cost. We then continue to expand the subspaces in a regular way until their dimensions reach kmaxk_{\max}.

5 Numerical experiments

In this section, we report numerical experiments on several problems to illustrate the performance of the two harmonic extraction based algorithms CPF-HJDGSVD, IF-HJDGSVD and the standard extraction based algorithm CPF-JDGSVD in [15], and make a comparison of them. All the numerical experiments were performed on an Intel Core (TM) i9-10885H CPU 2.40 GHz with 64 GB RAM using the Matlab R2021a with the machine precision ϵmach=2.22×1016\epsilon_{\mathrm{mach}}=2.22\times 10^{-16} under the Miscrosoft Windows 10 64-bit system.

Table 1: Basic properties of the test matrix pairs.
AA BB mm pp nn nnznnz κ([AB])\kappa(\begin{bmatrix}\begin{smallmatrix}A\\ B\end{smallmatrix}\end{bmatrix}) σmax\sigma_{\max} σmin\sigma_{\min}
nd3k TT 9000 9000 9000 3306688 9.33e+1 1.16e+2 1.77e-6
viscoplastic1 T 4326 4326 4326 74142 7.39e+1 5.26e+1 1.51e-4
rajat03 TT 7602 7602 7602 55457 5.10e+2 2.65e+2 8.07e-6
lp_bnl2T\mathrm{lp\_bnl2}^{T} TT 4486 2324 2324 21966 1.93e+2 1.10e+2 1.20e-2
Hamrle2 TT 5952 5952 5952 40016 1.04e+2 7.29e+1 4.12e-4
jendrec1T\mathrm{jendrec1}^{T} TT 4228 2109 2109 95933 8.95e+2 1.86e+3 7.86e-1
grid2 L1L_{1} 3296 3295 3296 19454 7.54e+1 1.93e+3 3.32e-17
dw1024 L1L_{1} 2048 2047 2048 14208 8.03 5.25e+2 2.55e-4
r05T\mathrm{r05}^{T} L1L_{1} 9690 5189 5190 114523 6.24e+1 1.19e+4 2.91e-1
p05T\mathrm{p05}^{T} L1L_{1} 9590 5089 5090 69223 4.40e+1 9.77e+3 2.91e-1
bibd_81_2 L2L_{2} 3240 3238 3240 12954 4.12 4.69e+5 2.50e-1
benzene L2L_{2} 8219 8217 8219 267320 5.58e+2 1.60e+7 2.89e-1
blckhole L2L_{2} 2132 2130 2132 21262 3.64e+1 1.32e+6 6.90e-4

Table 1 lists all the test problems together with some of their basic properties, where the matrices AA or their transpose(s) are sparse matrices from [8] with mnm\geq n, the matrices BB are taken to be (i) the symmetric tridiagonal Toeplitz matrices TT with p=np=n whose diagonal and subdiagonal elements are 33 and 11, respectively, and (ii)

L1=[1111]andL2=[121121],L_{1}=\begin{bmatrix}1&-1&&\\ &\ddots&\ddots&\\ &&1&-1\end{bmatrix}\qquad\mbox{and}\qquad L_{2}=\begin{bmatrix}-1&2&-1&&\\ &\ddots&\ddots&\ddots&\\ &&-1&2&-1\end{bmatrix},

which are the scaled discrete approximations of the first and second order derivative operators in dimension one with p=n1p=n-1 and p=n2p=n-2, respectively, nnznnz denotes the total numbers of the nonzero elements in AA and BB, and σmax\sigma_{\max} and σmin\sigma_{\min} denote the largest and smallest nontrivial generalized singular values of (A,B)(A,B), respectively. We mention that, for those matrix pairs (A,B)(A,B) with B=TB=T, all the generalized singular values of (A,B)(A,B) are nontrivial ones and, for the matrix pairs (A,B)(A,B) with B=L1B=L_{1} and L2L_{2}, there are one and two infinite generalized singular values, respectively.

For the three algorithms under consideration, we take the vectors 𝗈𝗇𝖾𝗌(n,1){\sf ones}(n,1) and 𝗆𝗈𝖽(1:n,4){\sf mod}(1:n,4) and normalize them to form one dimensional right searching subspaces for (A,B)(A,B) with B=TB=T and B=Li,i=1,2B=L_{i},\ i=1,2, respectively, where 𝗈𝗇𝖾𝗌{\sf ones} and 𝗆𝗈𝖽{\sf mod} are the Matlab built-in functions. When the dimensions of 𝒳\mathcal{X}, 𝒰\mathcal{U} and 𝒱\mathcal{V} reach the maximum number kmax=30k_{\max}=30 but the algorithms do not converge, we use the corresponding thick-restart algorithms by taking kmin=3k_{\min}=3. An approximate GSVD component is claimed to have converged if its relative residual norm satisfies (2.6) with tol=108tol=10^{-8}. We stop the algorithms if all the \ell desired GSVD components have been computed successfully or the total Kmax=nK_{\max}=n outer iterations have been used. For the correction equation (2.8), we first take ρ=τ\rho=\tau and then switch to ρ=θ\rho=\theta if the outer residual norm satisfies (2.9) with fixtol=104fixtol=10^{-4}. We take zero vectors as initial solution guesses for the inner iterations and use the Matlab built-in function minres to solve the correction equation (2.8) or (4.5) until the inner relative residual norm meets (2.11) with the stopping criterion ε~=104\tilde{\varepsilon}=10^{-4}. We comment that, as our extensive experience has demonstrated, preconditioning the correction equations by ILU type factorizations [29] has turned out to be ineffective and does not reduce the inner iterations for most of the test problems. The ineffectiveness is due to the (high) indefiniteness of correction equations. Therefore, we report only the results using the MINRES method without preconditioning.

In all the tables, for the ease of presentation, we further abbreviate the CPF-JDGSVD, CPF-HJDGSVD and IF-HJDGSVD algorithms as CPF, CPFH and IFH, respectively. We denote by IoutI_{out} and IinI_{in} the total numbers of outer and inner iterations that an underlying JDGSVD algorithm uses to achieve the convergence, respectively, and by TcpuT_{cpu} the total CPU time in seconds counted by the Matlab built-in commands tic and toc.

Example 5.1.

We compute one GSVD component of (A,B)=(nd3k,T)(A,B)=(\mathrm{nd3k},T) associated with the generalized singular value closest to the target τ=10\tau=10 that is highly clustered with some other ones of (A,B)(A,B).

Refer to caption
Fig. 1: Computing one GSVD component of (A,B)=(nd3k,T)(A,B)=(\mathrm{nd3k},T) with τ=10\tau=10.

For the matrix pairs (A,B)(A,B) in this and the next two examples, the matrices B=TB=T’s are well conditioned, and their Cholesky factorizations can be cheaply computed at the cost of 𝒪(n)\mathcal{O}(n) flops, so that each matrix-vector product with B1B^{-1} can be implemented using 𝒪(n)\mathcal{O}(n) flops. Therefore, at the expansion phase of each step of CPF-HJDGSVD, we use the Matlab recommended command \\backslash to carry out B1B^{-1}-vector products and update the matrix HA,BH_{A,B^{{\dagger}}} in (3.8). Purely for the experimental purpose and the illustration of the truly convergence behavior, when solving the inner linear systems (2.8) involved in the JDGSVD type algorithms, we compute the LU factorizations of ATAρ2BTBA^{T}A-\rho^{2}B^{T}B and use them to solve the linear systems. That is, we solve all the correction equations accurately in finite precision arithmetic. We will demonstrate how the CPF-harmonic and IF-harmonic extraction approaches behave. Figure 1 depicts the outer convergence curves of the three JDGSVD type algorithms.

As can be seen from Figure 1, compared with CPF-JDGSVD, the two harmonic JDGSVD algorithms have smoother outer convergence behavior, and IF-HJDGSVD uses four fewer outer iterations to reach the convergence than CPF-JDGSVD and CPF-HJDGSVD. This illustrates the advantage of IF-HJDGSVD over CPF-JDGSVD and CPF-HJDGSVD. Of CPF-JDGSVD and CPF-HJDGSVD, although they use the same number of outer iterations to converge, CPF-HJDGSVD should be favorable because of its much more regular convergence behavior.

Example 5.2.

We compute one GSVD component of (A,B)=(viscoplastic1,T)(A,B)=(\mathrm{viscoplastic1},T) with the generalized singular value closest to a small target τ=6.7e2\tau=6.7e-2 being clustered with some other ones of (A,B)(A,B). We should notice that τ\tau is fairly near to the left-end point σmin=1.51e4\sigma_{\min}=1.51e-4 of the generalized singular spectrum of (A,B)(A,B). This implies that the desired generalized singular vectors and the correction equations (2.8) are ill conditioned, causing that minres converges slowly.

Refer to caption
Fig. 2: Computing one GSVD component of (A,B)=(viscoplastic1,T)(A,B)=(\mathrm{viscoplastic1},T) with τ=6.7e2\tau=6.7e-2.

We draw the outer convergence curves of the three JDGSVD type algorithms in Figure 2. As the figure shows, both CPF-HJDGSVD and IF-HJDGSVD converge much more regularly than CPF-JDGSVD. Specifically, IF-HJDGSVD converges much faster than CPF-JDGSVD in the first sixteen outer iterations, and it has already reached the level of 𝒪(108)\mathcal{O}(10^{-8}) at iteration 16. Although it stagnates for the next several outer iterations, IF-HJDGSVD manages to converge two outer iterations more early than CPF-JDGSVD. On the other hand, CPF-HJDGSVD converges steadily in the first twenty-two outer iterations, and it then drops sharply and achieves the convergence criterion in the next two outer iterations. As the results indicate, CPF-HJDGSVD uses seven and nine fewer outer iterations than CPF-JDGSVD and IF-HJDGSVD, respectively.

Obviously, for this problem, both CPF-HJDGSVD and IF-HJDGSVD performs better than CPF-JDGSVD. Of the two harmonic algorithms, CPF-HJDGSVD is favorable for its faster overall convergence.

Example 5.3.

We compute ten GSVD components of the matrix pairs (A1,B1)=(rajat03,T)(A_{1},B_{1})=(\mathrm{rajat03},T), (A2,B2)=(lp_bnl2T,T)(A_{2},B_{2})=(\mathrm{lp\_bnl2}^{T},T), (A3,B3)=(Hamrle2,T)(A_{3},B_{3})=(\mathrm{Hamrle2},T) and (A4,B4)=(jendrec1T,T)(A_{4},B_{4})=(\mathrm{jendrec1}^{T},T) with the generalized singular values closest to the targets τ1=50\tau_{1}=50, τ2=17\tau_{2}=17, τ3=8\tau_{3}=8 and τ4=6.3\tau_{4}=6.3, respectively. The desired generalized singular values of (A1,B1)(A_{1},B_{1}) and (A2,B2)(A_{2},B_{2}) are the largest ones, which are fairly isolated one another, and those of (A3,B3)(A_{3},B_{3}) and (A4,B4)(A_{4},B_{4}) are highly clustered interior ones. In the expansion phase of the three algorithms, we use minres without preconditioning to solve all the correction equations.

Refer to caption
Fig. 3: Computing ten GSVD components of (A,B)=(rajat03,T)(A,B)=(\mathrm{rajat03},T) with τ=50\tau=50.

Figures 34 depict the convergence curves of the three JDGSVD algorithms for computing the ten desired GSVD components of (A1,B1)(A_{1},B_{1}) and (A2,B2)(A_{2},B_{2}), and Table 2 displays the results on the four test problems.

Refer to caption
Fig. 4: Computing ten GSVD components of (A,B)=(lp_bnl2T,T)(A,B)=(\mathrm{lp\_bnl2}^{T},T) with τ=17\tau=17.
Table 2: Results on the test matrix pairs in Example 5.3
AA    Algorithm Iout\ \ \ I_{out}\ \ \    IinI_{in}    TcpuT_{cpu}
rajat03 CPF 53 14695 3.70
CPFH 48 13082 3.48
IFH 45 13207 3.55
lp_bnl2T\mathrm{lp\_bnl2}^{T} CPF 75 4971 0.49
CPFH 67 4609 0.48
IFH 46 4477 0.42
Hamrle2 CPF 100 17210 3.50
CPFH 113 16330 3.60
IFH 72 17214 3.69
 jendrec1T\mathrm{jendrec1}^{T} CPF 102 13382 2.06
CPFH 62 9469 1.53
IFH 42 8848 1.31

For (A1,B1)(A_{1},B_{1}) and (A2,B2)(A_{2},B_{2}), we can observe from the figures and Table 2 that, regarding the outer convergence, CPF-HJDGSVD and especially IF-HJDGSVD outperform CPF-JDGSVD as they use a little bit fewer and substantially fewer outer iterations than the latter for (A1,B1)(A_{1},B_{1}) and (A2,B2)(A_{2},B_{2}), respectively. Specifically, for (A2,B2)(A_{2},B_{2}), we see from Figure 4 that the two harmonic algorithms CPF-HJDGSVD and IF-HJDGSVD have much smoother and faster outer convergence. We must remind the reader that, for =10\ell=10, each JDGSVD algorithm has ten convergence stages, which denote the one by one convergence processes of the desired ten GSVD components. In the meantime, we also see from Table 2 that, regarding the overall efficiency, CPF-HJDGSVD and IF-HJDGSVD outperform CPF-JDGSVD in terms of total inner iterations and total CPU time.

For (A3,B3)(A_{3},B_{3}), since the desired generalized singular values are highly clustered, the corresponding left and right generalized singular vectors are ill conditioned. As a result, it may be hard to compute the desired GSVD components using the standard and harmonic JDGSVD algorithms [18]. We observe quite irregular convergence behavior and sharp oscillations of CPF-JDGSVD and CPF-HJDGSVD, while IF-HJDGSVD converges much more smoothly and uses significantly fewer outer iterations, compared with CPF-JDGSVD and CPF-HJDGSVD, as shown in Table 2. Therefore, IF-HJDGSVD is preferable for this problem.

For the matrix pair (A4,B4)(A_{4},B_{4}), the three JDGSVD algorithms succeed in computing all the desired GSVD components. Among them, CPF-HJDGSVD outperforms CPF-JDGSVD considerably in terms of outer iterations and overall efficiency, and IF-HJDGSVD is slightly better than CPF-HJDGSVD as it uses quite fewer outer iterations and slightly fewer inner iterations and less CPU time than the latter one. Clearly, both CPF-HJDGSVD and IF-HJDGSVD are suitable for this problem and IF-HJDGSVD is favorable due to the faster outer convergence.

In summary, for the four test problems, IF-HJDGSVD performs best, CPF-HJDGSVD is the second, and both of them are considerably better than CPF-JDGSVD.

Example 5.4.

We compute the ten GSVD components of (A,B)=(grid2,L1)(A,B)\!=\!(\mathrm{grid2},L_{1}) with the desired generalized singular values closest to the target τ=4e+2\tau=4e+2. The desired generalized singular values are the largest ones and well separated one another.

Refer to caption
Fig. 5: Computing ten GSVD components of (A,B)=(grid2,L1)(A,B)=(\mathrm{grid2},L_{1}) with τ=4e+2\tau=4e+2.

For the matrix pairs (A,B)(A,B) with BB rank deficient, CPF-HJDGSVD cannot be applied. We only use CPF-JDGSVD and IF-HJDGSVD to compute the desired GSVD components of (A,B)(A,B) and report the results obtained. The outer iterations, inner iterations and CPU time used by CPF-JDGSVD are 48, 71317 and 6.6 seconds, respectively, and those used by IF-HJDGSVD are 42, 67463 and 6.3 seconds, respectively. In Figure 5, we draw the outer convergence curves of these two algorithms.

As can be seen from Figure 5 and the data listed above, IF-HJDGSVD outperforms CPF-JDGSVD in terms of the outer iterations, the overall efficiency and smooth convergence behavior.

Example 5.5.

We compute the ten GSVD components of the matrix pairs (A1,B1)=(dw1024,L1)(A_{1},B_{1})\\ =(\mathrm{dw1024},L_{1}), (A2,B2)=(r05T,L1)(A_{2},B_{2})\!=(\mathrm{\mathrm{r05}^{T}},L_{1}), (A3,B3)=(p05T,L1)(A_{3},B_{3})\!=(\mathrm{\mathrm{p05}^{T}},L_{1}), (A4,B4)=(bibd_81_2,L2)(A_{4},B_{4})=(\mathrm{bibd\_81\_2},\\ L_{2}), (A5,B5)=(benzene,L2)(A_{5},B_{5})=(\mathrm{benzene},L_{2}) and (A6,B6)=(blckhole,L2)(A_{6},B_{6})=(\mathrm{blckhole},L_{2}) with the generalized singular values closest to the targets τ1=30\tau_{1}=30, τ2=40\tau_{2}=40, τ3=300\tau_{3}=300, τ4=150\tau_{4}=150, τ5=3\tau_{5}=3 and τ6=400\tau_{6}=400, respectively. All the desired generalized singular values are interior ones and are fairly clustered, except for (A1,B1)(A_{1},B_{1}), whose desired generalized singular values are well separated one another.

Table 3: Results on test matrix pairs in Example 5.5
AA CPF-JDGSVD IF-HJDGSVD
  IoutI_{out} IinI_{in}    TcpuT_{cpu}   IoutI_{out} IinI_{in}    TcpuT_{cpu}
dw1024 62 61063 3.61 47 49560 2.86
r05T\mathrm{r05}^{T} 73 58292 14.9 44 56257 15.0
p05T\mathrm{p05}^{T} 48 111177 24.7 40 96114 22.5
 bibd_81_2 166 484601 39.9 112 314748 27.3
benzene 65 154109 88.9 41 109394 61.3
blckhole 180 356204 23.5 128 242227 16.1

Table 3 displays all the results obtained. As is observed from them, for the matrix pairs (A1,B1)(A_{1},B_{1}), (A3,B3)(A_{3},B_{3}), (A4,B4)(A_{4},B_{4}), (A5,B5)(A_{5},B_{5}) and (A6,B6)(A_{6},B_{6}) with the given targets, IF-HJDGSVD uses fewer outer and inner iterations and less CPU time to converge than CPF-JDGSVD, and it outperforms CPF-JDGSVD either slightly or significantly. For (A2,B2)(A_{2},B_{2}), however, IF-HJDGSVD uses much fewer outer iterations but comparable inner iterations and CPU time to compute all the desired GSVD components, compared with CPF-JDGSVD. In terms of a smoother and faster outer convergence, IF-HJDGSVD outperforms CPF-JDGSVD for this problem; almost the same overall efficiency, i.e., IinnerI_{inner} and TcpuT_{cpu}, is due to approximate solutions of correction equations using the MINRES method, whose convergence is complicated and depends on several factors, especially when a linear system is highly indefinite.

Summarizing all the numerical experiments, we conclude that (i) for the computation of large GSVD components, CPF-HJDGSVD and IF-HJDGSVD generally suit better than CPF-JDGSVD, (ii) for the computation of interior GSVD components, CPF-HJDGSVD and IF-HJDGSVD generally outperform CPF-JDGSVD, and, of them, IF-HJDGSVD is often favorable due to its faster and smoother convergence, higher overall efficiency and wider applicability, and (iii) for the computation of small GSVD components, if BB is of full column rank, then CPF-HJDGSVD performs slightly better than IF-HJDGSVD and both of them are preferable to CPF-JDGSVD.

6 Conclusions

In this paper, we have proposed two harmonic extraction based JDGSVD methods CPF-HJDGSVD and IF-HJDGSVD that are more suitable for the computation of interior GSVD components of a large matrix pair. The algorithms are ATAA^{T}A and BTBB^{T}B free and their inversions free, respectively. To be practical, we have developed their thick-restart algorithms with efficient deflation and purgation to compute more than one GSVD components of (A,B)(A,B) with a given target τ\tau. We have detailed a number of key issues on subtle efficient implementations.

We have made numerical experiments on a number of problems, illustrating that both IF-HJDGSVD and CPF-HJDGSVD outperform CPF-JDGSVD and can be much better than CPF-JDGSVD, especially for the computation of interior GSVD components. Furthermore, we have observed that IF-HJDGSVD is generally more robust and reliable than CPF-HJDGSVD and, therefore, is preferable but CPF-HJDGSVD is a better option when small GSVD components are required and BB has full column rank.

However, as we have observed, IF-HJDGSVD and CPF-HJDGSVD, though better than CPF-JDGSVD, may perform badly for some test problems, and they may exhibit irregular convergence behavior. This is most probably due to the intrinsic possible irregular convergence and even non-convergence of a harmonic extraction approach, which states that harmonic Ritz vectors may converge irregularly and even fail to converge even though the distances between desired eigenvectors or, equivalently, (generalized) singular vectors and searching subspaces tend to zero; see [19]. Such potential drawback has severe effects on effective expansions of searching subspaces and strongly affects the convergence of the resulting harmonic extraction based algorithms. To better solve the GSVD problem in this paper, a refined or refined harmonic extraction based JDGSVD type algorithm should be appealing. This will constitute our future work.

Statements and Declarations

This work was supported by the National Science Foundation of China (No. 12171273). The two authors declare that they have no financial interests, and the two authors read and approved the final manuscript. The datasets generated during and/or analysed during the current study are available from the corresponding author on reasonable request.

References

  • [1] Z. Bai, J. Demmel, J. Dongarra, A. Ruhe, and H. A. Van der Vorst, Templates for the Solution of Algebraic Eigenvalue Problems: A Practical Guide, SIAM, Philadelphia, PA, 2000.
  • [2] T. Betcke, The generalized singular value decomposition and the method of particular solutions, SIAM J. Sci. Comput., 30 (2008), pp. 1278–1295.
  • [3] Å. Björck, Numerical Methods for Least Squares Problems, SIAM, Philadelphia, PA, 1996.
  • [4] K.-W. E. Chu, Singular value and generalized singular value decompositions and the solution of linear matrix equations, Linear Algebra Appl., 88 (1987), pp. 83–98.
  • [5] K. Chui, Charles and J. Wang, Randomized anisotropic transform for nonlinear dimensionality reduction, Int. J. Geomath, 1 (2010), pp. 23–50.
  • [6] R. R. Coifman and S. Lafon, Diffusion maps, Appl. Comput. Harmon. Anal., 21 (2006), pp. 5–30.
  • [7] R. R. Coifman, S. Lafon, A. B. Lee, M. Maggioni, B. Nadler, F. Warner, and S. W. Zucker, Geometric diffusions as a tool for harmonic analysis and structure definition of data: Multiscale methods, PNAS, 21 (2006), pp. 5–30.
  • [8] T. A. Davis and Y. Hu, The University of Florida Sparse Matrix Collection, ACM Trans. Math. Software, 38 (2011), pp. 1–25. Data available online at http://www.cise.ufl.edu/research/sparse/matrices/.
  • [9] G. H. Golub and C. F. van Loan, Matrix Computations, 4th Ed., The John Hopkins University Press, Baltimore, 2012.
  • [10] P. C. Hansen, Rank-Deficient and Discrete Ill-Posed Problems: Numerical Aspects of Linear Inversion, SIAM, Philadelphia, PA, 1998.
  • [11] M. E. Hochstenbach, Harmonic and refined extraction methods for the singular value problem, with applications in least squares problems, BIT, 44 (2004), pp. 721–754.
  • [12] M. E. Hochstenbach, A Jacobi–Davidson type method for the generalized singular value problem, Linear Algebra Appl., 431 (2009), pp. 471–487.
  • [13] M. E. Hochstenbach and G. L. Sleijpen, Harmonic and refined Rayleigh–Ritz for the polynomial eigenvalue problem, Numer. Linear Algebra Appl., 15 (2008), pp. 35–54.
  • [14] J. Huang and Z. Jia, On inner iterations of Jacobi–Davidson type methods for large SVD computations, SIAM J. Sci. Comput., 41 (2019), pp. A1574–A1603.
  • [15] J. Huang and Z. Jia, A cross-product free Jacobi–Davidson type method for computing a partial generalized singular value decomposition (GSVD) of a large matrix pair, (2020). arXiv:2004.13975 [math.NA].
  • [16] J. Huang and Z. Jia, On choices of formulations of computing the generalized singular value decomposition of a matrix pair, Numer. Algor., 87 (2021), pp. 689–718.
  • [17] Z. Jia, The refined harmonic Arnoldi method and an implicitly restarted refined algorithm for computing interior eigenpairs of large matrices, Appl. Numer. Math., 42 (2002), pp. 489–512.
  • [18] Z. Jia, Some theoretical comparisons of refined Ritz vectors and Ritz vectors, Sci. China Ser. A, 47 (2004), pp. 222–233.
  • [19] Z. Jia, The convergence of harmonic Ritz values, harmonic Ritz vectors and refined harmonic Ritz vectors, Math. Comput., 74 (2005), pp. 1441–1456.
  • [20] Z. Jia and C. Li, Inner iterations in the shift-invert residual Arnoldi method and the Jacobi–Davidson method, Sci. China Math., 57 (2014), pp. 1733–1752.
  • [21] Z. Jia and C. Li, Harmonic and refined harmonic shift-invert residual Arnoldi and Jacobi–Davidson methods for interior eigenvalue problems, J. Comput. Appl. Math., 282 (2015), pp. 83–97.
  • [22] Z. Jia and H. Li, The joint bidiagonalization process with partial reorthogonalization, Numer. Algor., 88 (2021), pp. 965–992.
  • [23] Z. Jia and D. Niu, A refined harmonic Lanczos bidiagonalization method and an implicitly restarted algorithm for computing the smallest singular triplets of large matrices, SIAM J. Sci. Comput., 32 (2010), pp. 714–744.
  • [24] Z. Jia and Y. Yang, A joint bidiagonalization based algorithm for large scale general-form Tikhonov regularization, Appl. Numer. Math., 157 (2020), pp. 159–177.
  • [25] B. Kågström, The generalized singular value decomposition and the general (Aλ-\lambdaB)-problem, BIT, 24 (1984), pp. 568–583.
  • [26] M. E. Kilmer, P. C. Hansen, and M. I. Espanol, A projection-based approach to general-form Tikhonov regularization, SIAM J. Sci. Comput., 29 (2007), pp. 315–330.
  • [27] R. B. Morgan and M. Zeng, Harmonic projection methods for large non-symmetric eigenvalue problems, Numer. Linear Algebra Appl., 5 (1998), pp. 33–55.
  • [28] C. C. Paige and M. A. Saunders, Towards a generalized singular value decomposition, SIAM J. Numer. Anal., 18 (1981), pp. 398–405.
  • [29] Y. Saad, Iterative Methods for Sparse Linear Systems, 2nd ed., SIAM, Philadelphia, PA, 2003.
  • [30] A. Stathopoulos, Y. Saad, and K. Wu, Dynamic thick restarting of the Davidson, and the implicitly restarted Arnoldi methods, SIAM J. Sci. Comput., 19 (1998), pp. 227–245.
  • [31] G. W. Stewart, Matrix Algorithms II: Eigensystems, SIAM, Philadelphia, PA, 2001.
  • [32] G. W. Stewart and J. G. Sun, Matrix Perturbation Theory, Acadmic Press, Inc., Boston, 1990.
  • [33] H. Van der Vorst, Computational Methods for Large Eigenvalue Problems, Elsvier, Holland, 2002.
  • [34] C. F. Van Loan, Generalizing the singular value decomposition, SIAM J. Numer. Anal., 13 (1976), pp. 76–83.
  • [35] L. Wu, R. Romero, and A. Stathopoulos, PRIMME_SVDS: A high–performance preconditioned SVD solver for accurate large–scale computations, SIAM J. Sci. Comput., 39 (2017), pp. S248–S271.
  • [36] L. Wu and A. Stathopoulos, A preconditioned hybrid SVD method for accurately computing singular triplets of large matrices, SIAM J. Sci. Comput., 37 (2015), pp. S365–S388.
  • [37] H. Zha, Computing the generalized singular values/vectors of large sparse or structured matrix pairs, Numer. Math., 72 (1996), pp. 391–417.
  • [38] I. N. Zwaan, Cross product-free matrix pencils for computing generalized singular values, (2019). arXiv:1912.08518 [math.NA].
  • [39] I. N. Zwaan and M. E. Hochstenbach, Generalized Davidson and multidirectional-type methods for the generalized singular value decomposition, (2017). arXiv:1705.06120 [math.NA].