Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C libraries for mathematical matrix operations [closed]

I know there are some optimized algorithms around for all kind of matrix decompositions (QR decomposition, SVD,...), multiplications and the likes. Yet, I couldn't find a good overview. For C++, there is quite some useful information in this question, but I'm looking for those things in C.

like image 581
Joris Meys Avatar asked Dec 21 '10 16:12

Joris Meys


People also ask

Is there a matrix library in C?

This article develops a matrix algebra library in the C language. The library includes both basic and advanced functions that are defined in this regard. The library is properly coded to be fast and efficient by employing appropriate mathematical algorithms.

What is matrix operations in C?

Introduction to Matrix Multiplication in CTwo matrices can be multiplied only if the number of columns in the first matrix is equal to the number of rows in the second matrix. The product of the two matrices will have the order of a number of rows in the first row and the number of columns in the second matrix.

How do you know if a matrix operation is possible?

You can only multiply two matrices if their dimensions are compatible , which means the number of columns in the first matrix is the same as the number of rows in the second matrix. If A=[aij] is an m×n matrix and B=[bij] is an n×p matrix, the product AB is an m×p matrix.

What operations can be done on matrix?

Operations on MatricesAddition, subtraction and multiplication are the basic operations on the matrix. To add or subtract matrices, these must be of identical order and for multiplication, the number of columns in the first matrix equals the number of rows in the second matrix.


2 Answers

You did not mention whether you wanted an open-source or a commercial software, so here is a list containing both:

  • GNU Scientific Library (GSL)
  • Basic Linear Algebra Subprograms (BLAS)
  • Meschach
  • Numerical Algorithms Group (NAG)

There was also this previous question on the subject.

like image 188
gnuf Avatar answered Sep 27 '22 21:09

gnuf


You might want to take a look at BLAS and LAPACK. These are written in Fortran, but are callable from C, and are pretty much the standard libraries of this type.

Most serious linear algebra packages that I know of (MATLAB, Octave, NumPy) are built using these.

like image 28
NPE Avatar answered Sep 27 '22 20:09

NPE