10.8. Matrix Manipulation

ApplyOverMatrix
ApplyOverMatrix (a,func)

Apply a function over all entries of a matrix and return a matrix of the results.

ApplyOverMatrix2
ApplyOverMatrix2 (a,b,func)

Apply a function over all entries of 2 matrices (or 1 value and 1 matrix) and return a matrix of the results.

ColumnsOf
ColumnsOf (M)

Gets the columns of a matrix as a horizontal vector.

ComplementSubmatrix
ComplementSubmatrix (m,r,c)

Remove column(s) and row(s) from a matrix.

CompoundMatrix
CompoundMatrix (k,A)

Calculate the kth compund matrix of A.

CountZeroColumns
CountZeroColumns (M)

Count the number of zero columns in a matrix. For example Once you column reduce a matrix you can use this to find the nullity. See cref and Nullity.

DeleteColumn
DeleteColumn (M,col)

Delete a column of a matrix.

DeleteRow
DeleteRow (M,row)

Delete a row of a matrix.

DiagonalOf
DiagonalOf (M)

Gets the diagonal entries of a matrix as a column vector.

DotProduct
DotProduct (u,v)

Get the dot product of two vectors. The vectors must be of the same size. No conjugates are taken so this is a bilinear form even if working over the complex numbers.

See Planetmath for more information.

ExpandMatrix
ExpandMatrix (M)

Expands a matrix just like we do on unquoted matrix input. That is we expand any internal matrices as blocks. This is a way to construct matrices out of smaller ones and this is normally done automatically on input unless the matrix is quoted.

HermitianProduct
HermitianProduct (u,v)

Aliases: InnerProduct

Get the hermitian product of two vectors. The vectors must be of the same size. This is a sesquilinear form using the identity matrix.

See Mathworld for more information.

I
I (n)

Aliases: eye

Return an identity matrix of a given size, that is n by n.

See Planetmath for more information.

IndexComplement
IndexComplement (vec,msize)

Return the index complement of a vector of indexes.

IsDiagonal
IsDiagonal (M)

Is a matrix diagonal.

See Planetmath for more information.

IsLowerTriangular
IsLowerTriangular (M)

Is a matrix lower triangular. That is, are all the entries below the diagonal zero.

IsMatrixInteger
IsMatrixInteger (M)

Check if a matrix is a matrix of an integers (non-complex).

IsMatrixRational
IsMatrixRational (M)

Check if a matrix is a matrix of rational (non-complex) numbers.

IsMatrixReal
IsMatrixReal (M)

Check if a matrix is a matrix of real (non-complex) numbers.

IsMatrixSquare
IsMatrixSquare (M)

Check if a matrix is square, that is its width is equal to its height.

IsUpperTriangular
IsUpperTriangular (M)

Is a matrix upper triangular. That is, are all the entries above the diagonal zero.

IsValueOnly
IsValueOnly (M)

Check if a matrix is a matrix of numbers only.

IsVector
IsVector (v)

Is argument a horizontal or a vertical vector. Genius does not distinguish between a matrix and a vector and a vector is just a 1 by n or n by 1 matrix.

LowerTriangular
LowerTriangular (M)

Returns a copy of the matrix M with all the entries above the diagonal set to zero.

MakeDiagonal
MakeDiagonal (v,arg...)

Aliases: diag

Make diagonal matrix from a vector.

See Planetmath for more information.

MakeVector
MakeDiagonal (A)

Make column vector out of matrix by putting columns above each other. Returns null when given null.

MatrixProduct
MatrixProduct (a)

Calculate the product of all elements in a matrix. That is we multiply all the elements and return a number that is the product of all the elements.

MatrixSum
MatrixSum (a)

Calculate the sum of all elements in a matrix. That is we add all the elements and return a number that is the sum of all the elements.

MatrixSumSquares
MatrixSumSquares (a)

Calculate the sum of squares of all elements in a matrix.

OuterProduct
OuterProduct (u,v)

Get the outer product of two vectors.

ReverseVector
ReverseVector (v)

Reverse elements in a vector.

RowSum
RowSum (m)

Calculate sum of each row in a matrix.

RowSumSquares
RowSumSquares (m)

Calculate sum of squares of each row in a matrix.

RowsOf
RowsOf (M)

Gets the rows of a matrix as a vertical vector.

SetMatrixSize
SetMatrixSize (M,rows,columns)

Make new matrix of given size from old one. That is, a new matrix will be returned to which the old one is copied. Entries that don't fit are clipped and extra space is filled with zeros.

SortVector
SortVector (v)

Sort vector elements in an increasing order.

StripZeroColumns
StripZeroColumns (M)

Removes any all-zero columns of M.

StripZeroRows
StripZeroRows (M)

Removes any all-zero rows of M.

Submatrix
Submatrix (m,r,c)

Return column(s) and row(s) from a matrix.

SwapRows
SwapRows (m,row1,row2)

Swap two rows in a matrix.

UpperTriangular
UpperTriangular (M)

Returns a copy of the matrix M with all the entries below the diagonal set to zero.

columns
columns (M)

Get the number of columns of a matrix.

elements
elements (M)

Get the number of elements of a matrix.

ones
ones (rows,columns...)

Make an matrix of all ones (or a row vector if only one argument is given).

rows
rows (M)

Get the number of rows of a matrix.

zeros
zeros (rows,columns...)

Make an matrix of all zeros (or a row vector if only one argument is given).