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.
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.
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.
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.
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.
You did not mention whether you wanted an open-source or a commercial software, so here is a list containing both:
There was also this previous question on the subject.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With