ABS-Based Direct Method for Solving Complex Systems of Linear Equations

: Efﬁcient solution of linear systems of equations is one of the central topics of numerical computation. Linear systems with complex coefﬁcients arise from various physics and quantum chemistry problems. In this paper, we propose a novel ABS-based algorithm, which is able to solve complex systems of linear equations. Theoretical analysis is given to highlight the basic features of our new algorithm. Four variants of our algorithm were also implemented and intensively tested on randomly generated full and sparse matrices and real-life problems. The results of numerical experiments reveal that our ABS-based algorithm is able to compute the solution with high accuracy. The performance of our algorithm was compared with a commercially available software, Matlab’s mldivide ( \ ) algorithm. Our algorithm outperformed the Matlab algorithm in most cases in terms of computational accuracy. These results expand the practical usefulness of our algorithm.


Introduction
The problem of solving systems of linear equations plays a central role in diverse scientific fields such as signal processing, economics, computer science, and physics [1][2][3][4][5]. Often the problems arising from areas of practical life result in a system of equations with real coefficients, but there are important applications that lead to the following complex linear systems: where A ∈ C m,n , x ∈ C n and b ∈ C m .
Partial differential equations modelling dissipative processes usually involve complex coefficient functions or complex boundary conditions [6]. Other applications leading to complex linear systems include the discretization of time-dependent Schrödinger equations with implicit differential equations [7][8][9], inverse scattering problems, underwater acoustics, eddy current calculations [10], diffuse optical tomography [11], numerical calculations in quantum chromodynamics and numerical conformal mapping [12]. There are several methods to solve complex systems of linear equations. Moreover, a complex linear system with n unknowns can be reformulated to a linear system of equations with 2n real coefficients [13].
There are two basic popular approaches in solving complex linear systems of equations. The first one is when the preconditioned classical conjugate gradient method is used to solve the system of equations [14][15][16]. In most of these cases, the algorithms often do not work with the original general, i.e., non-Hermitian A coefficient matrix, but with a modified Hermitian positive definite normal equations where A H is the conjugate transpose of the A matrix. ( The second popular approach is to solve usually non-symmetric linear systems of equations using one of the generalized CG methods [17,18], such as GMRES ( [19] pp.  or other approaches based on the Arnoldi or the Lanczos biconjugate algorithms. These approaches generate an orthogonal basis for the Krylov subspaces associated with A and an initial vector v 1 . The usual way to obtain an approximation to the exact solution of (1) from this basis is to force a biconjugate gradient condition. In both cases, the resulting iterative methods tend to converge relatively slowly.
Mainly, two factors influence the practical usability of a method: the accuracy of the solutions and the computation cost of the method. There are two main classes of techniques for solving linear systems of equations: iterative and direct methods.
Iterative solvers are generally faster on large-scale problems, while direct ones give more accurate results. Not surprisingly, iterative methods have come to the fore in solving complex linear systems of equations and many new algorithms have been published in recent decades [20][21][22]. However, the robustness and the speed of the convergence of iterative algorithms significantly depend on the condition number of the coefficient matrices. To avoid convergence problems, robust preconditioners need to be used. In some cases, problem-specific preconditioners are highly effective, but they are often difficult to parallelize on modern high performance computing (HPC) platforms [23]. Moreover, Koric et al. [24] revealed that no iterative preconditioned solver combination could correctly solve the highly ill-conditioned systems of equations. Therefore, researchers often have to compromise between accuracy of the solutions and computational effort. Direct solvers typically do not have these limitations but require much more computational power to execute. Thus, today's high performance solutions such as parallel computing frameworks, may provide new possibilities for direct algorithms and they can be more suitable choices to ill-conditioned problems.
In this paper, we present a new ABS-based direct method that can solve large-scale problems. The ABS class of methods was originally introduced by Abaffy, Broyden and Spedicato (1984) developed to solve linear systems of equations where coefficients of the equations are real numbers [25]. These algorithms can also be used for various other purposes such as solving non-linear systems of equations or optimization problems [26][27][28]. ABS-based algorithms can be easily and effectively parallelised [29,30] which underlines the practical usefulness of these algorithms.
The remainder of this paper is organized as follows. In Section 2, we present our new scaled complex ABS algorithm, which can solve complex linear systems of equations and we prove some of its basic features. We also show a special choice of parameters of our algorithm, which ensures that the search vectors (p i ) are A H A conjugate. We provide a detailed numerical analysis of four variants of our algorithm in Section 3. Section 4 contains concluding remarks and a brief description of our plans on the application of the outcomes of this work.

The Scaled Complex ABS (scABS) Algorithm
In this section, we present our new ABS-based algorithm (scABS) that can solve systems of complex linear problems. Instead of the original system (1) let us consider the following scaled complex system of linear equations where V ∈ C m,n is an arbitrary, non-singular matrix. ( Note that the systems (1) and (3) are equivalent. Thus, if we want our algorithm to solve the original unscaled system of Equation (1), then by choosing the scaling matrix as the unit matrix we obtain the desired formulas and values. The sole role of the scaling matrix V is to provide significant flexibility to the algorithm [25] which allows us to reduce the computational inaccuracy [31] and also to reduce the computational complexity of the algorithm [27].
It is also of interest to note that our scaled complex ABS algorithm defines not one single algorithm, but a class of variants. Each particular variant is determined by the choice of the parameters H 1 , v i , z i , w i . These variants have different properties, e.g., by choosing H 1 = I unit matrix, v i = AH H i z i , and w i to be a multiple of z i , the ABS algorithm is a reformulation of the QR algorithm, as we will discuss in Section 2.2.
The state of the complex system of linear equations is checked by the variable s i = H i A H v i . An important property of our algorithm is that s i is zero if, and only if, the current row of matrix A is a linear combination of the previous rows. It depends on the value of the right-hand side whether our system is then a linear combination of the previous equations or even incompatible with them. We use the value of x i to distinguish between the two cases, namely whether it solves the ith equation or not. If it does, we simply skip the equation (x i+1 = x i , H i+1 = H i ), otherwise, we stop the algorithm. The state of the system is stored in the i f lag variable. If i f lag is zero, then neither linear dependency nor incompatibility is detected in the algorithm. If the value of i f lag is positive, then a number of linearly dependent equations are found. If the value of i f lag is negative then the −i f lagth equation is incompatible with the previous ones.
H 1 was selected to be a unit matrix for the sake of simplicity. However, H 1 could theoretically be any arbitrary unimodular nonsingular matrix provided that H 1 ∈ C n,n .

Algorithm 1: Scaled complex ABS (scABS) algorithm.
Input: Set x 1 ∈ C n , H 1 = I ∈ C n,n where I is the unit matrix, i = 1, and i f lag = 0. Output: Solution to (3) x i ∈ C n , if the solution exists, otherwise the −i f lagth equation incompatible with the previous ones. while (i ≤ m) and (i f lag ≥ 0) do Compute the scalar τ i = v H i r i ∈ C and the vector if (s i = 0) and (τ i = 0) and (i < m) then /* The ith equation linearly depends on the previous ones. */ where z i ∈ C n is arbitrary with the condition Let introduce the notation α i as the denominator of α i where v H i Ap i is the complex conjugate of v H i Ap i vector. Therefore, α i is a real number and the step size α i is given by Update the projection matrix. Compute where we use the notion w i as denominator of w i . w i ∈ C n is arbitrary with the condition follows immediately from Theorem 1 and it means that H m+1 = 0

Remark 2. H i A H v i computed by the scABS algorithm is zero only if
Remark 3. The scaled complex ABS algorithm is well defined.

Theorem 2.
Consider the matrices H i generated by (6) with the starting H 1 is nonsingular. For i = 1, . . . , m + 1 and 1 ≤ j ≤ i the following relations are true: Proof. We only prove (7) since the proof for (8) is similar. We proceed by induction. For again by the induction.   [30,31], which expands the practical usefulness of our algorithms. Theorem 3. Any vector y ∈ C n that solves the first i equations of (3) can be formulated as where s is a vector in C n .

Proof.
Decompose y ∈ C n as y = x i+1 + y + . As y solves the first i equations, Thus, where r ∈ C n according to the properties of the scaled complex ABS algorithm. So y + = H H i+1 r where r ∈ C n according to the properties of ABS.
Remark 6. Referring to the proofs of the original ABS algorithm [26], it can be shown that, for simplicity, assuming that the A matrix is full rank, . , a H i ) the transpose of the rows of the matrix A. If i = m, then the following semifactorization of the inverse can be obtained: This semi-factorization of the inverse of the A matrix may provide an opportunity to develop an ABS-based preconditioner to accelerate various Krylov subspace methods. For several choices of the matrix V, the matrix L is diagonal, hence formula (12) gives an explicit factorization of the inverse of the coefficient matrix A.

Remark 7.
Examining the properties of the scaled complex ABS algorithm in terms of practical usability, we have already mentioned in Remark 4 that the idempotent property of the H i matrix can be used to increase the computational accuracy of our algorithm by reprojection stepwise. Broyden showed [32] that the computation error in the solution is reduced up to 2 orders in for the real ABS algorithm. If the projection vectors (p i ) are re-projected with an additional computational cost, i.e., p i = H T i z i = H T i H T i z i , a more accurate result can be obtained due to the cancellation errors in computational accuracy [33,34]. Interestingly, our preliminary results showed that the scABS algorithm has similar properties. Increasing accuracy in this way will result in a significant increase in computational costs. One solution to speed up the algorithm may be to parallelize the processes. In a recent paper [30], we found that for a real ABS algorithm, parallelization yielded a significant gain in computational speed.

Special Choice of the Scaling Vector
We consider the following choice of the scaling vector: This selection of the scaling vector has many beneficial features such as where z i ∈ C n is arbitrary with condition AH H i z i = 0.  Update the approximate solution Let us introduce the notation α i as the denominator of α i where p H i A H Ap i is the complex conjugate of p H i A H Ap i vector. Therefore, α i is a real number and the step size α i is given by Update the projection matrix. Compute where we use the notion w i as denominator of w i . w i ∈ C n is arbitrary vector with the condition

Numerical Experiments
We were also interested in the numerical features of our scaled complex ABS algorithm. To this end, four variants of the orthogonally scaled complex ABS algorithm were implemented in MatlabR2013b (Mathworks, Inc., USA). The experiments were performed on a personal computer with Intel Core i7-2600 3.4GHz CPU with integrated graphics, 4 GB RAM running Microsoft Windows 10 Professional and MATLAB version R2013b. No software other than the operating system tasks, MATLAB and ESET NOD32 antivirus were running during the experiments.
The four implemented variants of the oscABS algorithm and the Matlab function used are as follows: We evaluated all methods in aspects of accuracy of the computed solution Ax n − b 2 , and execution time in seconds.

Randomly Generated Problems
In our first numerical experiments, we tested the variants of our algorithm on randomly generated dense and sparse matrices. These matrices were generated using the rand and sprand MATLAB functions. In general, we performed 10 separate tests on independent matrices to obtain each data point in this subsection. The mean values from those results are depicted in the following figures. The standard variation of the values usually fell within well below 5% of the mean value (data not shown). The solutions were randomly generated using the rand function and the right sides of the systems were calculated as the products of the matrix and the solution. In these experiments, we tested how the performance of our algorithm was affected by gradually increasing the dimension of the coefficient matrix from 10 × 10 to 1500 × 1500. As shown in Figure 1, each of the variants of the ABS-based algorithm was able to solve the systems of equations within 10 −10 accuracy, and overall, the S3ee variant was the most accurate. We did not see a large difference up to 1500 dimensions between the four variants of the orthogonally scaled complex ABS algorithm.
Our next aim was to compare the performance of the best variant of oscABS algorithm (S3ee) with a commercially available software able to solve complex linear systems of equations. We chose the mldivide (\) algorithm of the Matlab software package from MathWorks, Inc. for that purpose. Note that Matlab's mldivide algorithm is not one specific algorithm, but consists of several algorithms, from which it chooses depending on the property of the matrix A. The mldivide function performs several checks on the coefficient matrix to determine whether it has some special property (e.g., whether it is sparse or symmetric) and, knowing this, selects the appropriate matching solver. For example, if A is full but not a square matrix, then it uses the QR algorithm, if not, then depending on the properties of A, possibly the Hessenberg, Cholesky, LU, or even the LDL solver. This means that we compared our algorithm with different solvers, selected to be most appropriate for the given problem by the Matlab program [35].
The experiments were performed with the randomly generated matrices described above.
Our results are summarized in Figure 2. The S3ee algorithm outperformed Matlab algorithm in both full rank, indefinit and rank-deficient problems as well. It is clear from Figure 2 that the difference increases significantly as the dimension increases.  Our next set of experiments focused on the analysis of the computational accuracy of the algorithms under different matrix densities. These experiments were performed with uniformly distributed random numbers of the coefficient matrix at different densities. As shown in Figure 3, the S3ATA implementation calculated the solution most accurately and the S3rr the least accurately in most cases. The other two implementations of the orthogonally scaled complex ABS algorithms worked similar to S3ATA (i.e., within the same order of magnitude). Even at 1500 dimensions, these algorithms were able to calculate the result with an accuracy of 10 −11 . It is also worth noting that reducing the density from 100% to 1% resulted in a significant improvement in computational accuracy. The accuracy increased from 10 −11 to 10 −13 for the S3ATA, S3ee, and S3ep variants. Next, we compared the computational accuracy of our ABS-based algorithm with the Matlab algorithm on problems of different densities. As shown in Figure 4, the S3ee variant of orthogonally scaled complex ABS algorithms outperformed the Matlab algorithm again. It is worth noting that in the case of the Matlab algorithm, the change in matrix density resulted in a moderate improvement in the accuracy of the computations, as it increased from 10 −11 to 10 −12 .
In order to gain a deeper understanding of the numerical characteristics of the four variants of our algorithm, we compared the computational accuracy and execution time required to solve the 1500-dimensional systems of equations ( Figure 5).   Figure 5 shows that the numerical properties of the S3ee variant are the best, both in terms of computational accuracy and execution time. This may be explained by the fact that no computation is needed for parameter definitions (z i , w i ) since the appropriate unit vectors are used and the lack of computation may also explain the accuracy since round-off errors do not accumulate. This round-off error may also explain the relatively poor numerical performance of S3ATA and S3rr.
To obtain a more comprehensive view of the numerical properties of our algorithms, we also investigated their computational accuracy for large, i.e., more than 5000 dimension problems. The dimensions of these problems were determined according to Golub and Van Loan's suggestion [36] that for each problem, the q value, which is the characteristic of the problem, remains substantially below 1. The q = u · k ∞ (A), where u (The value of the unit round-off in Matlab is 2 −52 ) is unit round-off and k ∞ (A) condition number of the coefficient matrix A in infinity-norm. Our results for the high-dimensional problems are summarized in Figures S1 and S2 in the Supplementary Material. Our experiments in high dimensions clearly showed that the different variants of the ABS-based algorithm solved the random problems significantly more accurately than Matlab solver. This is especially true in the rank-deficient cases, where for 5000 dimensions the Matlab function was not able to solve any problem.

Chosen Test Problems from MATLAB Gallery
Our next experiments compared the computation accuracy of our algorithm on known complex matrices in the Matlab Gallery. Table 1 summarizes the problems we chose.

Name Description
Symmetric Toeplitz Diagonal-constant matrix using Matlab toeplitz(r) function where r is the first row. The vector r was randomly generated in this experiment. Non-symmetric Toeplitz Diagonal-constant matrix using Matlab toeplitz(c,r) function where c is first column, r is the first row of the matrix. The vector c, and the vector r were generated randomly. Hankel Symmetric and constant across the anti-diagonals matrix using Matlab hankel(c) function where c defines the first column of the matrix. The c column was generated randomly in this experiment.

Smoke
Complex matrix with a 'smoke ring' pseudospectrum using Matlab gallery('smoke',n) function where n is the dimension of the matrix.
For each matrix, we tested the dimensions between 10-1500. Experiments presented in Figure 6 revealed that all four variants of the complex ABS algorithm were able to solve the problems with an accuracy of approximately 10 −10 and in most cases the computation error remained significantly below 10 −11 . Examining the different variants of the orthogonally scaled complex ABS algorithm, we found that the S3ee and S3ep algorithms computed the problems with similar accuracy, with the S3ATA variant being the least accurate except for the Smoke problem.
Next, we compared the S3ee variant with the Matlab algorithm (see Figure 7). The ABSbased algorithm slightly outperformed the Matlab algorithm on all but the Smoke matrices.
In order to gain a deeper understanding of the numerical characteristics of the four variants of our algorithm, we compared the computational accuracy and execution time required to solve the 1500-dimensional systems of equations (see Figure 8).
For Matlab Gallery problems, the running properties of the algorithms are slightly different from those seen for randomly generated problems. For the first three matrix (Symmetric Toeplitz, Non-symmetric Toeplitz, Hankel) problems, we see similar results as for the randomly generated problems, the ABS-based variants giving more accurate results than the Matlab algorithm. However, for the fourth, Smoke matrix, for the first time Matlab's algorithm gave the most accurate result tested. This fact can be partly explained by the special structure of the Smoke matrix since the diagonal of the n-dimensional Smoke matrix consists of the set of all nth roots of unity, and 1's on its superdiagonal and 1 in the (n,1) position. It is interesting to note that the Matlab algorithm and the S3ATA variant behaved very similarly in these problems, both computing the solution with relatively large errors for the first three problems, but giving the most accurate solutions for the Smoke matrices. In the case of running speeds, it is clear that the lower computational demand of the S3ee variant in the 1500 dimension already resulted in significantly shorter running times.   We have also examined the behaviour of our ABS-based variants on large, i.e., more than 5000 dimensions of selected Matlab Gallery problems. Our results of the ABS-based variants are summarized in Figure S3, while the comparison of S3ee and Matlab results are summarized in Figure S4 in Supplementary Materials. For high dimensions, the numerical properties of the algorithms were very similar to those for low dimensions. Overall, of the ABS-based variants, the S3ee variant computed the most accurately and all ABS-based variants gave more accurate results than the Matlab algorithm except for the Smoke problem.

Real-Life Problems
We also wanted to examine how the four variants of our ABS-based algorithm work on real-life problems. Our next experiments focused on the performance of the algorithms on examples from the SuiteSparse matrix collection [37] and from the SWUFE-Math Test Matrices Library [38]. Table 2 summarizes the matrices we used and their key properties. The calculation accuracies are outlined in Panel A of Figure 9. It can be stated that each of the variants of the ABS-based algorithm was able to solve the problems with acceptable accuracy. For these problems, the S3rr algorithm performed best. It should be noted, however, that in most cases, the Matlab function calculated the solution most accurately. This may partly be explained by the fact that Matlab uses different solvers for different (i.e., sparse, dense) matrices. In addition to the accuracy of the solutions and execution times, we show the relative 2-norm of the residual vectors in the Panel C to ensure that the numerical properties of our ABS-based algorithm can be compared with other published algorithms [38][39][40] developed to solve linear systems of equations. These comparisons revealed that our method is significantly more accurate than expected for iterative solutions. Furthermore, some iterative methods achieved this accuracy of 10 −6 only after a relatively large number of iterations. In the case of the young1c problem, several algorithms needed nearly 400 steps to achieve an accuracy of 10 −6 [38,39], while our algorithm achieved an accuracy of 10 −14 in about twice as many steps.

Conclusions
In this paper, we presented a new ABS-based algorithm for solving complex linear systems of equations and we proved some of its basic features. We also showed a special choice of parameters of our algorithm, which ensures that the search vectors (p i ) are A H A conjugate. A detailed numerical analysis of four variants of the ABS-based orthogonally scaled algorithm has also been provided. These variants were tested on randomly generated full and rank deficient, different-density systems of linear equations. Furthermore, the computational accuracy of the algorithm was tested on real-life problems. These numerical experiments showed that the ABS-based algorithm solved the problem with acceptable accuracy in all cases and provided more accurate results than the MATLAB built-in function in most test cases. These numerical results demonstrate the practical usefulness of the algorithm in addition to its theoretical significance.
Additionally, a valuable numerical property of our algorithm is that if we want to compute a complex system of linear equations with several right-hand sides [40], it is not necessary to recompute the matrix H i . Instead, it is sufficient to store the vectors p i and recompute the updates x i , which can significantly reduce the computational cost. and thus our algorithm can be used effectively to solve such problems.