Skip to main content
Log in

A note on the multiplication of sparse matrices

  • Research Article
  • Published:
Central European Journal of Computer Science

Abstract

We present a practical algorithm for multiplication of two sparse matrices. In fact if A and B are two matrices of size n with m 1 and m 2 non-zero elements respectively, then our algorithm performs O(min{m 1 n, m 2 n, m 1 m 2}) multiplications and O(k) additions where k is the number of non-zero elements in the tiny matrices that are obtained by the columns times rows matrix multiplication method. Note that in the useful case, km 2 n. However, in Proposition 3.3 and Proposition 3.4 we obtain tight upper bounds for the complexity of additions. We also study the complexity of multiplication in a practical case where non-zero elements of A (resp. B) are distributed independently with uniform distribution among columns (resp. rows) of them and show that the expected number of multiplications is O(m 1 m 2/n). Finally a comparison of number of required multiplications in the naïve matrix multiplication, Strassen’s method and our algorithm is given.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. G. Strang, Introduction to Linear Algebra (Wellesley-Cambridge Press, Wellesley, USA, 2003)

    Google Scholar 

  2. V. Strassen, Gaussian elimination is not optimal, Numer. Math. 13, 354–356, 1969

    Article  MATH  MathSciNet  Google Scholar 

  3. A. Horrowithz, J. Sahny, Fundamentals of Data Structures (Computer Science Press, New York, 1983)

    Google Scholar 

  4. D. Coppersmith, S. Winograd, Matrix multiplication via arithmetic progression, J. Symb. Comput. 9, 251–280, 1990

    Article  MATH  MathSciNet  Google Scholar 

  5. R. Yuster, U. Zwick, Fast sparse matrix multiplication, ACM T. Alg. 1, 2–13, 2005

    MathSciNet  Google Scholar 

  6. D. Coppersmith, Rectangular matrix multiplication revisited, J. Complexity 13, 42–49, 1997

    Article  MATH  MathSciNet  Google Scholar 

  7. Z. Tang, R. Duraiswami, N. Gummerov, Fast algorithms to compute matrix-vector products for pascal matrices, Technical Reports from UMIACS UMIACS-TR-2004-08, 2004

    Google Scholar 

  8. A. Björck, Block bidiagonal decomposition and least square problems, Perspectives in numerical Analysis, Helsinki, May 27–29, 2008

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Keivan Borna.

About this article

Cite this article

Borna, K., Fard, S.A. A note on the multiplication of sparse matrices. centr.eur.j.comp.sci. 4, 1–11 (2014). https://doi.org/10.2478/s13537-014-0201-x

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.2478/s13537-014-0201-x

Keywords

Navigation