- publishing free software manuals
 GNU Scientific Library Reference Manual - Third Edition (v1.12) by M. Galassi, J. Davies, J. Theiler, B. Gough, G. Jungman, P. Alken, M. Booth, F. RossiPaperback (6"x9"), 592 pages, 60 figuresISBN 0954612078RRP £24.95 (\$39.95)

8.4.10 Matrix operations

The following operations are defined for real and complex matrices.

Function: int gsl_matrix_add (gsl_matrix * a, const gsl_matrix * b)
This function adds the elements of matrix b to the elements of matrix a, a'(i,j) = a(i,j) + b(i,j). The two matrices must have the same dimensions.
Function: int gsl_matrix_sub (gsl_matrix * a, const gsl_matrix * b)
This function subtracts the elements of matrix b from the elements of matrix a, a'(i,j) = a(i,j) - b(i,j). The two matrices must have the same dimensions.
Function: int gsl_matrix_mul_elements (gsl_matrix * a, const gsl_matrix * b)
This function multiplies the elements of matrix a by the elements of matrix b, a'(i,j) = a(i,j) * b(i,j). The two matrices must have the same dimensions.
Function: int gsl_matrix_div_elements (gsl_matrix * a, const gsl_matrix * b)
This function divides the elements of matrix a by the elements of matrix b, a'(i,j) = a(i,j) / b(i,j). The two matrices must have the same dimensions.
Function: int gsl_matrix_scale (gsl_matrix * a, const double x)
This function multiplies the elements of matrix a by the constant factor x, a'(i,j) = x a(i,j).
Function: int gsl_matrix_add_constant (gsl_matrix * a, const double x)
This function adds the constant value x to the elements of the matrix a, a'(i,j) = a(i,j) + x.
 ISBN 0954612078 GNU Scientific Library Reference Manual - Third Edition (v1.12) See the print edition