Skip to main content
Springer Nature - PMC COVID-19 Collection logoLink to Springer Nature - PMC COVID-19 Collection
. 2020 Jun 15;12138:225–236. doi: 10.1007/978-3-030-50417-5_17

Remarks on Kaczmarz Algorithm for Solving Consistent and Inconsistent System of Linear Equations

Xinyin Huang 15, Gang Liu 16,, Qiang Niu 16,17,
Editors: Valeria V Krzhizhanovskaya8, Gábor Závodszky9, Michael H Lees10, Jack J Dongarra11, Peter M A Sloot12, Sérgio Brissos13, João Teixeira14
PMCID: PMC7302833

Abstract

In this paper we consider the classical Kaczmarz algorithm for solving system of linear equations. Based on the geometric relationship between the error vector and rows of the coefficient matrix, we derive the optimal strategy of selecting rows at each step of the algorithm for solving consistent system of linear equations. For solving perturbed system of linear equations, a new upper bound in the convergence rate of the randomized Kaczmarz algorithm is obtained.

Keywords: Iterative methods, Kaczmarz method, Convergence rate, Orthogonal projection, Linear systems

Introduction

Kaczmarz algorithm [28] is an iterative method for solving system of linear equations of the form

graphic file with name M1.gif 1

where Inline graphic has full column rank, Inline graphic and Inline graphic. In the consistent case, the solution of (1) can be regarded as the coordinate of the common point of hyperplanes defined by each single equation in (1):

graphic file with name M5.gif 2

where Inline graphic, Inline graphic, denotes the ith row of A and Inline graphic is the ith element of vector b.

The idea of the Kaczmarz type algorithms is to exploit the geometric structure of the problem (1), and the using a sequential of projections to seek the solution. The recursive process can be formulated as follows. Let Inline graphic be an initial guess to the solution of (1), then the classical Kaczmarz algorithm iteratively generates a sequence of approximate solutions Inline graphic by the recursive formula:

graphic file with name M11.gif 3

where Inline graphic. For a given Inline graphic, from (3) we can see that Inline graphic satisfies the ith equation in (1), i.e., Inline graphic. The updating formula (3) implicitly produces a solution to the following constraint optimization problem [21, 37]

graphic file with name M16.gif

which is equivalent to finding the projection of Inline graphic from the hyperplane Inline graphic. Two geometric explanations of the above process can be illustrated by Fig. 1:

Fig. 1.

Fig. 1.

Geometric illustrations of the classical Kaczmarz iterations with Inline graphic.

By comparing the projection processes displayed in Fig. 1, it is natural to have the intuition that convergence of the classical Kaczmarz algorithm highly depends on the geometric positions of the associated hyperplanes. If the normal vectors of every two successive hyperplanes keep reasonably large angles, the convergence of the classical Kaczmarz algorithm will be fast, whereas two nearly parallel consecutive hyperplanes will make the convergence slow down. The Kaczmarz algorithm can be regarded as a special application of famous von Neumann’s alternating projection [35] originally distributed in 1933. The fundamental idea can even trace the history back to Schwarz [38] in 1870s.

In the past few years, the Karzmarz algorithm has been interpreted as successive projection methods [4, 7, 8, 1113], which are also known as projection onto convex sets (POCS) [9, 17, 18, 4244] in the optimization community. Notice that each iteration of the Kaczmarz algorithm just need Inline graphic flops and the cost is independent with the number of equations, this type of algorithms are well-suited to problems with Inline graphic. Due to its simplicity and generality, Kaczmarz algorithms find viable applications in the area of image processing and signal process [19, 20, 2426, 30, 36] under the name of algebraic reconstruction techniques (ART). Since 1980s, relaxation variants [11, 25, 41]

graphic file with name M22.gif 4

and the block versions [3, 33, 34]

graphic file with name M23.gif 5

of the Kaczmarz algorithm have been widely investigated, and some fruitful theoretical results have been obtained. In particular, for consistent linear systems, it is shown [5, 21, 31, 39] that the Kaczmarz iterations converges to the least square norm solution Inline graphic with any starting vector Inline graphic in the column space of Inline graphic. For inconsistent linear systems, the cyclic subsequences generated by the Kaczmarz algorithm converges to a weighted least squares solution when the relaxation parameter Inline graphic goes to zero [12].

As indicated in Fig. 1, convergence of the classical Kaczmarz algorithm depends on the sequence of successive projections, which relies upon the ordering of the rows in the matrix A. In some real applications, it is observed [25, 30] that instead of selecting rows of the matrix A sequentially at each step of the Kaczmarz algorithm, randomly selection can often improve its convergence. Recently, in the remarkable paper [39], Strohmer and Vershynin proved the rate of convergence for the following randomized Kaczmarz algorithm

graphic file with name M28.gif

where r(i) is chosen from Inline graphic with probabilities Inline graphic. In particular, the following bound on the expected rate of convergence for the randomized Kaczmarz method is proved

graphic file with name M31.gif 6

where Inline graphic, with Inline graphic be the scaled conditioned number of A introduced by J. Demmel [14]. Due to this pioneering work that characterized the convergence rate for the randomized Kaczmarz algorithms, the idea stimulated considerable interest in this area and various investigations [1, 2, 6, 10, 15] have been performed recently. In particular, some acceleration strategies have been proposed [6, 16, 22] and convergence analysis was performed in [21, 23, 27, 29, 31, 32]. See also [21, 23] for some comments on equivalent interpretations of the randomized Kaczmarz algorithms.

Optimal Row Selecting Strategy of the Kaczmarz Algorithm for Solving Consistent System of Linear Equations

In this section, we consider the case that system of linear equations (1) is consistent and x is a solution. If the ith row is selected at the Inline graphicth iteration of the Kaczmarz algorithm, i.e.,

graphic file with name M35.gif

then Inline graphic can be reformulated as

graphic file with name M37.gif

It follows that

graphic file with name M38.gif 7

and thus

graphic file with name M39.gif 8

From (7) and (8), we can see that

graphic file with name M40.gif 9

i.e.,

graphic file with name M41.gif 10

To this end, let us make the following orthogonal direct sum decomposition Inline graphic,

graphic file with name M43.gif 11

where Inline graphic and Inline graphic is a normalized vector orthogonal to Inline graphic. Then coefficients Inline graphic and Inline graphic can be written as

graphic file with name M49.gif
graphic file with name M50.gif

where Inline graphic is the angle between the vectors Inline graphic and Inline graphic.

Substituting the above decomposition (11) into (7) gives

graphic file with name M54.gif 12

It follows that

graphic file with name M55.gif 13

From (13) we can see that the error norms generated by the Kaczmarz algorithm are monotonically nonincreasing. Moreover, the convergence can be optimized if Inline graphic is minimized at every iteration, which is equivalent to selecting the row Inline graphic that solves the optimization problem

graphic file with name M58.gif

As x is the unknown solution, the above minimization problems seems unsolvable. However, noting that consistent linear system (1) implies

graphic file with name M59.gif

and Inline graphic is fixed at the Inline graphicth iteration. The minimization problem can be tackled by maximizing Inline graphic, i.e.,

graphic file with name M63.gif 14

where Inline graphic

It is clear from (14) that the optimal updating strategy for the Kaczmarz algorithm is to select the row Inline graphic that satisfies

graphic file with name M66.gif

i.e., the index where Inline graphic has the largest entry in absolute value. We refer to the above row selection method as the optimal selecting strategy, and call the Kaczmarz algorithm with the optimal selecting strategy as the optimal Kaczmarz algorithm.

Next, we analyze the convergence of the optimal Kaczmarz algorithm for solving consistent system of linear equations. To simplify the analysis, we introduce two notations

graphic file with name M68.gif

and

graphic file with name M69.gif

where Inline graphic and Inline graphic.

Based on (13), the Inline graphicth error can be bounded as follows

graphic file with name M73.gif 15

where Inline graphic.

Notice that

graphic file with name M75.gif

we can theoretically divide the convergence history of the Kaczmarz algorithm into two periods:

  • when Inline graphic, the algorithm converge exponentially,

  • when Inline graphic, we have
    graphic file with name M78.gif
    and thus,
    graphic file with name M79.gif
    This implies that Inline graphic, i.e., Inline graphic solves the system of linear equation (1).

In summary, for solving consistent system of linear equations (1), there exists a theoretical optimal selecting strategy or optimal randomization strategy for Kaczmarz algorithm. With the strategy, the algorithm converges exponentially and will achieve convergence when

graphic file with name M82.gif

Randomized Kaczmarz Algorithm for Solving Inconsistent System of Linear Equations

Suppose (1) is a consistent system of linear equations and its right hand side is perturbed with a noise vector r as follows:

graphic file with name M83.gif 16

where (16) can be either consistent or inconsistent. In this section, we give some remarks on the convergence of randomized Kaczmarz algorithm for solving (16), which was investigated by D. Needell [32].

Firstly, we recall the Lemma 2.2 in [32].

Lemma 1

Let Inline graphic be the affine subspaces of Inline graphic consisting of the solutions to unperturbed equations, Inline graphic. Let Inline graphic be the solution spaces of the noisy equations, Inline graphic. Then

graphic file with name M89.gif

where Inline graphic.

Remarks: If the Lemma 1 is used to interpret the Kaczmarz algorithm for solving the perturbed and unperturbed equations, we need to introduce a vector Inline graphic in the as the orthogonal complement of the vector Inline graphic, and write Inline graphic as

graphic file with name M94.gif

where Inline graphic is a solution generated by Kaczmarz algorithm for solving the unperturbed equations, and Inline graphic is a vector in the orthogonal complement of Inline graphic.

Example 1. Consider the Inline graphic system of linear equations

graphic file with name M99.gif

and the perturbed equations

graphic file with name M100.gif

i.e., Inline graphic, Inline graphic and Inline graphic.

Let

graphic file with name M104.gif

and

graphic file with name M105.gif

If we use Inline graphic as the same initial guess for the perturbed and unperturbed linear system, then

graphic file with name M107.gif

and

graphic file with name M108.gif

Note that Inline graphic Inline graphic and Inline graphic. We have

graphic file with name 500798_1_En_17_Equ51_HTML.gif

i.e.,

graphic file with name 500798_1_En_17_Equ52_HTML.gif

In order to derive the convergence rate of randomized Kaczmarz algorithm for solving the perturbed linear equations (16), we need to make use of the established convergence results [39] for the unperturbed linear system (1), together with the relationship between the approximate solutions generated by the Kaczmarz algorithm [39] for perturbed and unperturbed linear equations. In [32], D. Needell analyzed the convergence rate and error bound of the randomized Kaczmarz algorithm for solving the perturbed linear equations, in which the author take the approximate solution to the perturbed linear equations as the guess for the unperturbed system, which make the derivation process simplified. However, the approximate solutions generated by applying the randomized Kaczmarz algorithm to the perturbed linear system may not converge to the solution of the unperturbed linear system.

In what follows, we will consider the convergence rate of the randomized Kaczmarz algorithm for solving (16) from a different perspective. We try to bound the difference between the solution for the unperturbed linear system (1) and approximate solutions generated by applying the randomized Kaczmarz algorithm to the perturbed linear system.

In the following discussion, we use Inline graphic and Inline graphic to denote the approximate solutions generated by applying the randomized Kaczmarz algorithm to (1) and (16), respectively. The recursive formulas can be written as

graphic file with name M114.gif 17

and

graphic file with name M115.gif 18

where the subscript Inline graphic is used to denote that the Inline graphicth row is selected with probability Inline graphic at the kth iteration.

Suppose the same initial guess Inline graphic is used as the starting vector. Then

graphic file with name M120.gif

and potentially

graphic file with name M121.gif

It follows that

graphic file with name M122.gif 19

In the next iteration, we have

graphic file with name M123.gif

where Inline graphic with Inline graphic.

Continue the above process, we have

graphic file with name M126.gif 20

where Inline graphic and Inline graphic.

Subtracting x on both sides of (20) gives

graphic file with name M129.gif 21

Based on Jensen’s inequality and (6), we have

graphic file with name M130.gif 22

where Inline graphic, with Inline graphic.

Taking norm on both sides of (21) and using triangle inequality, we have

graphic file with name M133.gif

where Inline graphic.

In conclusion, we have derived the following theorem.

Theorem 1

Let A be a matrix full column rank and assume the system Inline graphic is consistent. Let Inline graphic be the kth iterate of the noisy randomized Kaczmarz method run with Inline graphic, and let Inline graphic denote the rows of A. Then we have

graphic file with name M139.gif

where Inline graphic and Inline graphic.

Conclusions

In this paper, we provide a new look at the Kaczmarz algorithm for solving system of linear equations. The optimal row selecting strategy of the Kaczmarz algorithm for solving consistent system of linear equations is derived. The convergence of the randomized Kaczmarz algorithm for solving perturbed system of linear equations is analyzed and a new bound of the convergence rate is obtained from a new perspective.

Footnotes

This work was supported by XJTLU research enhancement fund with no. REF-18-01-04 and Key Programme Special Fund (KSF) in XJTLU with nos. KSF-E-32, KSF-P-02 and KSF-E-21. Partial of the work was supported by the Qing Lan project of Jiangsu Province.

Contributor Information

Valeria V. Krzhizhanovskaya, Email: V.Krzhizhanovskaya@uva.nl

Gábor Závodszky, Email: G.Zavodszky@uva.nl.

Michael H. Lees, Email: m.h.lees@uva.nl

Jack J. Dongarra, Email: dongarra@icl.utk.edu

Peter M. A. Sloot, Email: p.m.a.sloot@uva.nl

Sérgio Brissos, Email: sergio.brissos@intellegibilis.com.

João Teixeira, Email: joao.teixeira@intellegibilis.com.

Gang Liu, Email: Gang.Liu@xjtlu.edu.cn.

Qiang Niu, Email: Qiang.Niu@xjtlu.edu.cn.

References

  • 1.Agaskar, A., Wang, C., Lu, Y.M.: Randomized Kaczmarz algorithms: exact MSE analysis and optimal sampling probabilities. In: Proceedings of the 2014 IEEE Global Conference on Signal and Information Processing (GlobalSIP), Atlanta, GA, 3–5 December, pp. 389–393 (2014)
  • 2.Ivanov AA, Zhdanov AI. Kaczmarz algorithm for Tikhonov regularization problem. Appl. Math. E-Notes. 2013;13:270–276. [Google Scholar]
  • 3.Ivanovy AA, Zhdanovz AI. The block Kaczmarz algorithm based on solving linear systems with arrowhead matrices. Appl. Math. E-Notes. 2017;17:142–156. [Google Scholar]
  • 4.Bai Z-Z, Liu X-G. On the Meany inequality with applications to convergence ananlysis of several row-action methods. Numer. Math. 2013;124:215–236. doi: 10.1007/s00211-012-0512-6. [DOI] [Google Scholar]
  • 5.Bai Z-Z, Wu W-T. On greedy randomized Kaczmarz method for solving large sparse linear systems. SIAM J. Sci. Comput. 2018;40:A592–A606. doi: 10.1137/17M1137747. [DOI] [Google Scholar]
  • 6.Bai Z-Z, Wu W-T. On relaxed greedy randomized Kaczmarz methods for solving large sparse linear systems. Appl. Math. Lett. 2018;83:21–26. doi: 10.1016/j.aml.2018.03.008. [DOI] [Google Scholar]
  • 7.Benzi M, Meyer CD. A direct projection method for sparse linear systems. SIAM J. Sci. Comput. 1995;16:1159–1176. doi: 10.1137/0916067. [DOI] [Google Scholar]
  • 8.Brenzinski C. Projection Methods for Systems of Equations. Amsterdam: Elsevier Science B.V.; 1997. [Google Scholar]
  • 9.Benzi M, Meyer CD. The relaxation method of finding the common point of convex sets and its application to the solution of problems in convex programming. USSR Comput. Math. Math. Phys. 1967;7:200–217. [Google Scholar]
  • 10.Cai J, Tang Y. A new randomized Kaczmarz based kernel canonical correlation analysis algorithm with applications to information retrieval. Neural Netw. 2018;98:178–191. doi: 10.1016/j.neunet.2017.11.013. [DOI] [PubMed] [Google Scholar]
  • 11.Censor Y. Row-action methods for huge and sparse systems and their applications. SIAM Rev. 1981;23:444–466. doi: 10.1137/1023097. [DOI] [Google Scholar]
  • 12.Censor Y, Eggermont PPB, Gordon D. Strong underrelaxation in Kaczmarz’s method for inconsistent systems. Numer. Math. 1983;41:83–92. doi: 10.1007/BF01396307. [DOI] [Google Scholar]
  • 13.Censor Y, Herman GT, Jiang M. A note on the behaviour of the randomized Kaczmarz algorithm of Strohmer and Vershynin. J. Fourier Anal. Appl. 2009;15:431–436. doi: 10.1007/s00041-009-9077-x. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Demmel J. The probability that a numerical analysis problem is difficult. Math. Comput. 1988;50:449–480. doi: 10.1090/S0025-5718-1988-0929546-7. [DOI] [Google Scholar]
  • 15.De Loera JA, Haddock J, Needell D. A sampling Kaczmarz-Motzkin algorithm for linear feasibility. SIAM J. Sci. Comput. 2017;39:S66–S87. doi: 10.1137/16M1073807. [DOI] [Google Scholar]
  • 16.Eldar YC, Needell D. Acceleration of randomized Kaczmarzmethod via the Johnson–Lindenstrauss lemma. Numer. Algorithms. 2011;58:163–177. doi: 10.1007/s11075-011-9451-z. [DOI] [Google Scholar]
  • 17.Feichtinger, H.G., Cenker, C., Mayer, M., Steier, H., Strohmer, T.: New variants of the POCS method using affine subspaces of finite codimension with applications to irregular sampling. In: VCIP. SPIE, pp. 299–310 (1992)
  • 18.Galántai A. On the rate of convergence of the alternating projection method in finite dimensional spaces. J. Math. Anal. Appl. 2005;310:30–44. doi: 10.1016/j.jmaa.2004.12.050. [DOI] [Google Scholar]
  • 19.Gordon R, Bender R, Herman GT. Algebraic Reconstruction Techniques (ART) for threedimensional electron microscopy and x-ray photography. J. Theor. Biol. 1970;29:471–481. doi: 10.1016/0022-5193(70)90109-8. [DOI] [PubMed] [Google Scholar]
  • 20.Gordon R, Herman GT, Johnson SA. Image reconstruction from projections. Sci. Am. 1975;233:56–71. doi: 10.1038/scientificamerican1075-56. [DOI] [PubMed] [Google Scholar]
  • 21.Gower RM, Richtárik P. Randomized iterative methods for linear systems. SIAM J. Matrix Anal. 2015;36:1660–1690. doi: 10.1137/15M1025487. [DOI] [Google Scholar]
  • 22.Hanke M, Niethammer W. On the acceleration of Kaczmarz’s method for inconsistent linear systems. Linear Algebra Appl. 1990;130:83–98. doi: 10.1016/0024-3795(90)90207-S. [DOI] [Google Scholar]
  • 23.Hefny A, Needell D, Ramdas A. Rows vs. columns: randomized Kaczmarz or gauss-seidel for ridge regression. SIAM J. Sci. Comput. 2016;39:S528–S542. doi: 10.1137/16M1077891. [DOI] [Google Scholar]
  • 24.Herman GT. Image Reconstruction from Projection, the Fundamentals of the Computerized Tomography. New York: Academic Press; 1980. [Google Scholar]
  • 25.Herman GT, Lent A, Lutz PH. Relaxation methods for image reconstruction. Commun. Assoc. Comput. Mach. 1978;21:152–158. [Google Scholar]
  • 26.Herman GT, Meyer LB. Algebraic reconstruction techniques can be made computationally efficient. IEEE Trans. Med. Imaging. 1993;12:600–609. doi: 10.1109/42.241889. [DOI] [PubMed] [Google Scholar]
  • 27.Jiao Y-L, Jin B-T, Lu X-L. Preasymptotic convergence of randomized Kaczmarz method. Inverse Prob. 2017;33:125012. doi: 10.1088/1361-6420/aa8e82. [DOI] [Google Scholar]
  • 28.Kaczmarz S. Angenäherte auflösung von systemen linearer gleichungen. Bull. Acad. Polon. Sci. Lett. A. 1933;35:355–357. [Google Scholar]
  • 29.Leventhal L, Lewis AS. Randomized methods for linear constraints: convergence rates and conditioning. Math. Oper. Res. 2010;35:641–654. doi: 10.1287/moor.1100.0456. [DOI] [Google Scholar]
  • 30.Natterer, F.: Themathematics of Computerized Tomography. SIAM (2001)
  • 31.Ma A, Needell D, Ramdas A. Convergence properties of the randomized extended Gauss-Seidel and Kaczmarz methods. SIAM J. Matrix Anal. Appl. 2015;36:1590–1604. doi: 10.1137/15M1014425. [DOI] [Google Scholar]
  • 32.Needell D. Randomized Kaczmarz solver for noisy linear systems. BIT. 2010;50:395–403. doi: 10.1007/s10543-010-0265-5. [DOI] [Google Scholar]
  • 33.Needell D, Zhao R, Zouzias A. Randomized block Kaczmarz method with projection for solving least squares. Linear Algebra Appl. 2015;484:322–343. doi: 10.1016/j.laa.2015.06.027. [DOI] [Google Scholar]
  • 34.Needell D, Tropp JA. Paved with good intentions: analysis of a randomized block Kaczmarz method. Linear Algebra Appl. 2014;441:199–221. doi: 10.1016/j.laa.2012.12.022. [DOI] [Google Scholar]
  • 35.von Neumann, J.: The Geometry of Orthogonal Spaces, vol. 2. Princeton University Press, Princeton (1950). This is a mimeographed lecture notes, first distributed in 1933
  • 36.Nutini, J., Sepehry, B., Laradji, I., Schmidt, M., Koepke, H., Virani, A.: Convergence rates for greedy Kaczmarz algorithms, and faster randomized Kaczmarz rules using the orthogonality graph, UAI (2016)
  • 37.Schmidt, M.: Notes on randomized Kaczmarz, Lecture notes, 9 April 2015
  • 38.Schwarz HA. Ueber einen Grenzübergang durch alternirendes Verfahren. Vierteljahrsschrift der Naturforschenden Gessellschaft in Zurich. 1870;15:272–286. [Google Scholar]
  • 39.Strohmer T, Vershynin R. A randomized Kaczmarz algorithm with exponential convergence. J. Fourier Anal. Appl. 2009;15:262–278. doi: 10.1007/s00041-008-9030-4. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 40.Strohmer, T.: Comments on the randomized Kaczmarz method (2009, unpublished manuscript)
  • 41.Tanabe K. Projection method for solving a singular system of linear equations and its applications. Numer. Math. 1971;17:203–214. doi: 10.1007/BF01436376. [DOI] [Google Scholar]
  • 42.Trussell, H., Civanlar, M.: Signal deconvolution by projection onto convex sets. In: IEEE International Conference on Acoustics, Speech, and Signal Processing, ICASSP 1984, vol. 9, pp. 496–499 (1984)
  • 43.Youla DC, Webb H. Image restoration by the method of convex projections: part 1 theory. IEEE Trans. Med. Imaging. 1982;1:81–94. doi: 10.1109/TMI.1982.4307555. [DOI] [PubMed] [Google Scholar]
  • 44.Youla DC, Webb H. Image restoration by the method of convex projections: part 2 applications and numerical results. IEEE Trans. Med. Imaging. 1982;1:95–101. doi: 10.1109/TMI.1982.4307555. [DOI] [PubMed] [Google Scholar]
  • 45.Zouzias A, Freris NM. Randomized extended Kaczmarz for solving least squares. SIAM J. Matrix Anal. 2013;34:773–793. doi: 10.1137/120889897. [DOI] [Google Scholar]

Articles from Computational Science – ICCS 2020 are provided here courtesy of Nature Publishing Group

RESOURCES