General Purpose Matrix Operations


Matrix Home
General Purpose Routines
Arithmetic Routines
Systems of Linear Equations
Normed and Inner Product Spaces
Eigenvalues and Eigenvectors

Operations such as copying a matrix, extracting a row or column, replacing a row or column, extracting the diagonal, replacing the diagonal, interchanging two rows, interchanging two columns, forming a new matrix by joining two matrices along rows or columns, setting each component of a matrix to a constant, extracting a submatrix, replacing a submatrix and transposing a matrix depend only on the property that an object is a matrix and do not depend on the nature of the matrix elements themselves. The functionality of matrix routines in this collection are routines with this property but the implementation is for matrices declared as double A[M][N] or for dynamically defined matrices declared as double* A.

A vector is a simply an array which can be regarded as a 1×n matrix or an n×1 matrix. The term is borrowed from linear algebra where linear transformations operate on vectors, after choosing a basis for the domain and range, the linear transformations can be represented as matrices and the vectors as an n×1 matrix. Vectors are declared as double v[] or dynamically defined vectors are declared as double* v.