Constructing Matrices

Mathematica provides a range of methods for representing and constructing matrices. Especially powerful are symbolic representations, in terms of symbolic systems of equations, symbolic sparse or banded matrices, and symbolic geometric transformations.

ReferenceReference

Table construct a matrix from an expression

Array construct a matrix from a function

CoefficientArrays construct a matrix from a system of equations

SparseArray construct a sparse matrix from positions and values

Normal convert a sparse matrix to ordinary form

Band give values on any collection of bands, for tridiagonal etc. matrices

IdentityMatrix ▪ DiagonalMatrix ▪ ConstantArray

ArrayFlatten flatten a matrix of matrices to make a block matrix

Partition partition a list to make a matrix

Join join several matrices to make a matrix

PadLeft, PadRight pad out a ragged array to make a matrix

ArrayPad add padding around a matrix

HilbertMatrix ▪ HankelMatrix ▪ ToeplitzMatrix

Geometric Matrices »

RotationMatrix ▪ ScalingMatrix ▪ ShearingMatrix ▪ ...

Structure Matrices »

BoxMatrix ▪ CrossMatrix ▪ DiamondMatrix ▪ DiskMatrix ▪ GaussianMatrix ▪ ...

New to Mathematica? Find your learning path »
Have a question? Ask support »