2.1 Creating Matrices

A matrix object is created by calling the function matrix(). The arguments specify the values of the coefficients, the dimensions, and the type (integer, double or complex) of the matrix.

matrix( x[, size[, tc]])
size is a tuple of length two with the matrix dimensions. The number of rows and/or the number of columns can be zero.

tc stands for typecode. The possible values are 'i', 'd' and 'z', for integer, real (double) and complex matrices, respectively.

x can be a number, a sequence of numbers, a dense or sparse matrix, a two-dimensional numarray array, or a list of lists of matrices and numbers.