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

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 horizontal vector

DotProduct
DotProduct (u,v)

Aliases: InnerProduct

Get the dot product of two vectors

ExpandMatrix
ExpandMatrix (M)

Expands a matrix just like we do on unquoted matrix input

I
I (n)

Aliases: eye

Make an identity matrix of a given size

IndexComplement
IndexComplement (vec,msize)

Return the index complement of a vector of indexes

IsDiagonal
IsDiagonal (M)

Is a matrix diagonal

IsLowerTriangular
IsLowerTriangular (M)

Is a matrix lower triangular

IsMatrixInteger
IsMatrixInteger (M)

Check if a matrix is an integer (non-complex) matrix

IsMatrixRational
IsMatrixRational (M)

Check if a matrix is a rational (non-complex) matrix

IsMatrixReal
IsMatrixReal (M)

Check if a matrix is a real (non-complex) matrix

IsMatrixSquare
IsMatrixSquare (M)

Is a matrix square

IsUpperTriangular
IsUpperTriangular (M)

Is a matrix upper triangular

IsValueOnly
IsValueOnly (M)

Check if a matrix is a matrix of numbers

IsVector
IsVector (v)

Is argument a horizontal or a vertical vector

LowerTriangular
LowerTriangular (M)

Zero out entries above the diagonal

MakeDiagonal
MakeDiagonal (v,arg...)

Aliases: diag

Make diagonal matrix from a vector

MatrixProduct
MatrixProduct (a)

Calculate the product of all elements in a matrix

MatrixSum
MatrixSum (a)

Calculate the sum of all elements in a matrix

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

SortVector
SortVector (v)

Sort vector elements

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)

Zero out entries below the diagonal

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)

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)